project QadFinancials > class BCreditorReport > business logic query CInvoiceMovement

Description

This gets all movements < selected period


Parameters


iiCinvoice_IDinteger
icCInvoiceMovementTypecharacter
iiToPeriodinteger
iiCompanyIdintegerCompany id


query condition


  each CInvoiceMovement where
CInvoiceMovement.Company_Id = iiCompanyId AND
CInvoiceMovement.CInvoice_ID = iiCinvoice_ID AND
CInvoiceMovement.CInvoiceMovementType = icCInvoiceMovementType

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

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

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

              first Journal (inner-join) where
Journal.SharedSet_Id = vi_JOURNAL_sharedset(iiCompanyId) AND
Journal.Journal_ID = Posting.Journal_ID AND

              first Period (inner-join) where
Period.Company_Id = iiCompanyId AND
Period.Period_ID = Posting.Period_ID AND
Period.PeriodYearPeriod < if iiToPeriod = -999 then 0 else iiToPeriod


query resultset tqCInvoiceMovement


field namedata typedb fielddescription
tiCInvoice_IDintegerCInvoiceMovement.CInvoice_IDLink to CInvoice
tiCInvoiceMovement_IDintegerCInvoiceMovement.CInvoiceMovement_IDRecord ID
tcCInvoiceMovementTypecharacterCInvoiceMovement.CInvoiceMovementTypeCInvoiceMovementType. "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).
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tiPeriodPeriodintegerPeriod.PeriodPeriodGL Period
tiPeriodYearintegerPeriod.PeriodYearGL Calendar Year
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_IDintegerCInvoiceMovement.PostingLine_IDLink to PostingLine
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
tiPostingLineSequenceintegerPostingLine.PostingLineSequenceSequence
tcPostingParentTextcharacterPosting.PostingParentTextContains the description field from the parent object that triggered the posting. When the posting is an invoice posting, this field contains the invoice description. When the posting is a banking entry posting, the description of the bank statement line is copied to this field, etc. Used for information purposes on reports and browses.
api annotation:Value for this field defaults to blank.
tiPostingVoucherintegerPosting.PostingVoucherVoucher is a sequential number that uniquely identifies the journal entry (within the combination of an entity and a daybook code).
api annotation:In create mode,enter 0 in this field - the voucher number is generated by the system. In Modify/Delete, the correct voucher number must be entered because this identifies the record.


Internal usage


QadFinancials
method BCreditorReport.CreditorPrepayments