project QadFinancials > class BDInvoice > business logic query DInvoiceMovementByDate

Description

Returns all Movements on a DInvoice that were entered after a specified date.


Parameters


iiCompanyIdintegerCompany id
iiInvoiceIDinteger
itFromPostingDatedate


query condition


  each DInvoice where
DInvoice.Company_Id = iiCompanyId AND
DInvoice.DInvoice_ID = iiInvoiceID

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

          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
Posting.PostingDate >= itFromPostingDate


query resultset tqDInvoiceMovementByDate


field namedata typedb fielddescription
tiCurrency_IDintegerPostingLine.Currency_IDCurrency Code
tiDInvoice_IDintegerDInvoice.DInvoice_IDRecord ID
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).
tiPosting_IDintegerPosting.Posting_IDRecord ID
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_IDintegerPostingLine.PostingLine_IDRecord ID
tdPostingLineCreditCCdecimalPostingLine.PostingLineCreditCCSC Credit
api annotation:Partial Update = yes - it will get a default value depending on the value of PostingLinCreditTC, PostingLineCCRate & PostingLineCCScale.
SC Amount = TC Amount * Exchange rate (TC/SC) * Scale Factor (TC/SC). If Partial Update is false, you should enter the correct value for this field
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
tdPostingLineDebitCCdecimalPostingLine.PostingLineDebitCCSC Debit
api annotation:Partial Update = yes - it will get a default value depending on the value of PostingLineDebitTC, PostingLineCCRate & PostingLineCCScale.
SC Amount = TC Amount * Exchange rate (TC/SC) * Scale Factor (TC/SC). If Partial Update is false, enter the correct value for this field.
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
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(DInvoice),rowid(DInvoiceMovement),rowid(PostingLine),rowid(Posting)


Internal usage


QadFinancials
method BCashReport.Recalculate
method BCashReport.RecalculateGLTypeCodeDebtorAmounts