project QadFinancials > class BBLWIReport > business logic query DInvoiceMovementForBLWIReport

Description

Select DInvoiceMovements for BWLI


Parameters


icTypecharacter
iiYearPeriodinteger
icCountryCodecharacterCountry Code
iiCompanyIdintegerCompany id


query condition


  each DInvoiceMovement where
DInvoiceMovement.Company_Id = iiCompanyId AND
DInvoiceMovement.DInvoiceMovementType <> icType

      first DInvoice (inner-join) where
DInvoice.Company_Id = iiCompanyId AND
DInvoice.DInvoice_ID = DInvoiceMovement.DInvoice_ID AND

          first Country (inner-join) where
Country.Country_ID = DInvoice.TransactionEndCountry_ID AND
Country.CountryCode <> icCountryCode

              first BLWICountry (conditional-join) where
BLWICountry.BLWICountry_ID = Country.BLWICountry_ID AND

          first Currency (inner-join) where
Currency.Currency_ID = DInvoice.DInvoiceCurrency_ID AND

          first Period1 (inner-join) where
Period1.Company_Id = iiCompanyId AND
Period1.Period_ID = DInvoice.Period_ID AND
Period1.PeriodYearPeriod <= iiYearPeriod

      first PostingLine (inner-join) where
PostingLine.Company_Id = iiCompanyId AND
PostingLine.PostingLine_ID = DInvoiceMovement.PostingLine_ID AND

          first Posting (inner-join) where
Posting.Company_Id = iiCompanyId AND
Posting.Posting_ID = PostingLine.Posting_ID AND

              first Period2 (inner-join) where
Period2.Company_Id = iiCompanyId AND
Period2.Period_ID = Posting.Period_ID AND
Period2.PeriodYearPeriod > iiYearPeriod


query resultset tqDInvoiceMovementForBLWIReport


field namedata typedb fielddescription
tcBLWICountryCodecharacterBLWICountry.BLWICountryCodeBLWI Country Code
tiCountry_IDintegerCountry.Country_IDRecord ID
tcCountryCodecharacterCountry.CountryCodeCountry Code
tcCountryDescriptioncharacterCountry.CountryDescriptionDescription
tlCountryIsActivelogicalCountry.CountryIsActiveActive
tlCountryIsEUCountrylogicalCountry.CountryIsEUCountryEU Member
tiCurrency_IDintegerCurrency.Currency_IDRecord ID
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tcCurrencyDescriptioncharacterCurrency.CurrencyDescriptionCurrency Description
tiDInvoice_IDintegerDInvoiceMovement.DInvoice_IDLink to DInvoice
tcDInvoiceMovementTypecharacterDInvoiceMovement.DInvoiceMovementTypeCInvoiceMovementType. "Initial" indicates that the movement represents the initial creation of the invoice, "movement" stands for all subsequent modifications of the invoice balance (payments, adjustments etc).
tiPeriodYearPeriodintegerPeriod2.PeriodYearPeriodGL Calendar Year/GL Period
ttPostingDatedatePosting.PostingDateThe accounting date on which the journal entry is posted. The posting date must be a valid calendar date and must be within the GL calendar year (PostingYear) and period (PostingPeriod).
tiPostingLine_IDintegerDInvoiceMovement.PostingLine_IDLink to PostingLine
tdPostingLineCreditLCdecimalPostingLine.PostingLineCreditLCBC Credit
api annotation:Partial Update = yes - it will get a default value depends on the value of PostingLineCreditTC, PostingLineExchangeRate & PostingLineRateScale.
BC Amount = TC Amount * Exchange rate (TC/BC) * Scale Factor (TC/BC). If Partial Update is false, enter a value for this field.
tdPostingLineCreditTCdecimalPostingLine.PostingLineCreditTCTC Credit
tdPostingLineDebitLCdecimalPostingLine.PostingLineDebitLCBC Debit
api annotation:Partial Update = yes - it will get a default value depending on the value of PostingLineDebitTC, PostingLineExchangeRate and PostingLineRateScale.
BC Amount = TC Amount * Exchange rate (TC/BC) * Scale Factor (TC/BC). If Partial Update = false, enter the correct value into this field.
tdPostingLineDebitTCdecimalPostingLine.PostingLineDebitTCTC Debit


Internal usage


QadFinancials
method BBLWIReport.CreateBWLIReportFromDInvoiceMovement