project QadFinancials > class BCInvoice > business logic query CInvoiceMovementForBounced


Parameters


iiCompanyIdintegerCompany id
icCompanyListcharacter
iiCreditorIdinteger
itFromPostingDatedate
itToPostingDatedate


query condition


  each CInvoiceMovement where
CInvoiceMovement.Company_Id = iiCompanyId AND
string(CInvoiceMovement.Company_ID) can-do icCompanyList AND
CInvoiceMovement.CInvoiceMovementType = {&MOVEMENTTYPE-MOVEMENT} AND
CInvoiceMovement.Creditor_ID = iiCreditorId AND
CInvoiceMovement.CInvoiceMovementPostDate >= itFromPostingDate AND
CInvoiceMovement.CInvoiceMovementPostDate <= itToPostingDate

      first CInvoice (inner-join) where
CInvoice.Company_Id = iiCompanyId AND
CInvoice.CInvoice_ID = CInvoiceMovement.CInvoice_ID AND

          first Company (inner-join) where
Company.Company_Id = iiCompanyId AND
Company.Company_ID = CInvoice.Company_ID AND

              each CompanyProperty (inner-join) where
CompanyProperty.Company_Id = iiCompanyId AND
CompanyProperty.Company_ID = Company.Company_ID AND

                  first Currency1 (inner-join) where
Currency1.Currency_ID = CompanyProperty.Currency_ID AND

          first Journal1 (inner-join) where
Journal1.SharedSet_Id = vi_JOURNAL_sharedset(iiCompanyId) AND
Journal1.Journal_ID = CInvoice.Journal_ID AND

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

          first Currency2 (inner-join) where
Currency2.Currency_ID = PostingLine1.Currency_ID AND

          first Posting (inner-join) where
Posting.Company_Id = iiCompanyId AND
Posting.Posting_ID = PostingLine1.Posting_ID AND
Posting.PostingDate >= itFromPostingDate AND
Posting.PostingDate <= itToPostingDate

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

              each PostingLine2 (inner-join) where
PostingLine2.Company_Id = iiCompanyId AND
PostingLine2.Posting_ID = Posting.Posting_ID AND

                  each CDocumentPostingLine (inner-join) where
CDocumentPostingLine.PostingLine_ID = PostingLine2.PostingLine_ID AND
CDocumentPostingLine.CDocumentStatus = {&DOCUMENTSTATUS-BOUNCED}


query resultset tqCInvoiceMovementForBounced


field namedata typedb fielddescription
tcBaseCurrencyCodecharacterCurrency1.CurrencyCodeCurrency Code
tcCDocumentNumbercharactercalculated
tiCInvoice_IDintegerCInvoice.CInvoice_IDRecord ID
tdCInvoiceBalanceCreditCCdecimalCInvoice.CInvoiceBalanceCreditCCBC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
This field is calculated by the system using the TC Base Amount CR and the SC rate.
tdCInvoiceBalanceCreditLCdecimalCInvoice.CInvoiceBalanceCreditLCBC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
This field is calculated by the system using the TC Base Amount CR and the Exchange rate.
tdCInvoiceBalanceCreditTCdecimalCInvoice.CInvoiceBalanceCreditTCTC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
tdCInvoiceBalanceDebitCCdecimalCInvoice.CInvoiceBalanceDebitCCSC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in statutory currency.
This field is calculated by the system using the TC Base Amount DR and the SC rate.
tdCInvoiceBalanceDebitLCdecimalCInvoice.CInvoiceBalanceDebitLCBC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in transaction currency.
This field is calculated by the system using the TC Base Amount DR and the Exchange rate.
tdCInvoiceBalanceDebitTCdecimalCInvoice.CInvoiceBalanceDebitTCTC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in transaction currency.
tcCInvoiceCITextcharacterCInvoice.CInvoiceCITextCIDescription. A brief description for the SI posting.
api annotation:This field defaults from the CInvoiceDescription.
ttCInvoiceClosingDatedateCInvoice.CInvoiceClosingDateClosing Date. This field displays the date on which the open balance became zero.
tcCInvoiceDescriptioncharacterCInvoice.CInvoiceDescriptionDescription. A brief description of the invoice. The system generates a default description based on the Reference and Supplier Code.
ttCInvoiceDueDatedateCInvoice.CInvoiceDueDateDue Date.This field indicates the date when payment become due.
This field can be modified without affecting the credit terms.
This field is calculated by the system based on the credit terms and the invoice date.
tlCInvoiceIsOpenlogicalCInvoice.CInvoiceIsOpenOpen.This field indicates if the invoice has been completely paid.
This field is updated automatically when complete payment is confirmed.
This field is read-only.
api annotation:PartialUpdate = yes - defaults to true
tdCInvoiceMovementDiscountTCdecimalCInvoiceMovement.CInvoiceMovementDiscountTCCInvoiceMovementDiscountTC. The amount of payment discount in TC.
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).
tcCInvoiceNumbercharactercalculated
tdCInvoiceOriginalCreditCCdecimalCInvoice.CInvoiceOriginalCreditCCSC Invoice Amount (CR). This field displays the credit total invoice amount in the statutory currency.
This field is calculated by the system using the TC Invoice Amount(CR) and the SC Rate.
tdCInvoiceOriginalCreditLCdecimalCInvoice.CInvoiceOriginalCreditLCBC Invoice Amount(CR). This field displays the credit total invoice amount in the base currency.
This field is calculated by the system using the TC Invoice Amount(CR) and the Exchange rate.
tdCInvoiceOriginalCreditTCdecimalCInvoice.CInvoiceOriginalCreditTCTC Invoice Amount CR. This field displays the credit total invoice amount in the transaction currency.
If you modify this field, the system automatically recalculates the exchange rate to ensure that the BC Invoice Amount remains the same.
tdCInvoiceOriginalDebitCCdecimalCInvoice.CInvoiceOriginalDebitCCSC Invoice Amount (DR). This field displays the debit total invoice amount in the statutory currency.
This field is calculated by the system using the TC Invoice Amount(CR) and the SC Rate.
tdCInvoiceOriginalDebitLCdecimalCInvoice.CInvoiceOriginalDebitLCBC Invoice Amount(DR). This field displays the debit total invoice amount in the base currency.
This field is calculated by the system using the TC Invoice Amount(DR) and the Exchange rate.
tdCInvoiceOriginalDebitTCdecimalCInvoice.CInvoiceOriginalDebitTCTC AP Amount. This field displays the debit total invoice amount in the transaction currency.
If you modify this field, the system automatically recalculates the exchange rate to ensure that the TC Invoice Amount remains the same.
ttCInvoicePostingDatedateCInvoice.CInvoicePostingDatePosting Date. This filed indicates the date on which the invoice is to be posted.
api annotation:This field defaults from the invoice creation date.
tiCInvoicePostingYearintegerCInvoice.CInvoicePostingYearYear.This field indicates the accounting year for the invoice.
If you modify these fields, the posting and tax dates are changed correspondingly.
api annotation:This field defaults to the accounting year associated with the posting date.
tcCInvoiceReferencecharacterCInvoice.CInvoiceReferenceReference. An alphanumeric reference to help identify the invoice in the system.
This reference is typically the ID number of the invoice received from the supplier.
tiCInvoiceRegistrationNrintegerCInvoice.CInvoiceRegistrationNrRegistration number. This field displays the sequential number assigned to each invoice upon initial entry in the system.
tcCInvoiceTypecharacterCInvoice.CInvoiceTypeInvoice Type. This field identifies the invoice type.
The value can be Invoice Correction and Credit Note Correction type only when the appropriate daybook types have already been defined.
tiCInvoiceVoucherintegerCInvoice.CInvoiceVoucherVoucher. This field displays the numeric identifier assigned to the posting.
When the daybook of the journal entry is changed (after transfer), the voucher is cleared.
Voucher must be unique in one GL period.
When the user input is zero, the system automatically assign a value not used yet for this field.
tiCompany_IDintegerCInvoice.Company_IDLink to Company
tcCompanyCodecharacterCompany.CompanyCodeEntity Code
tiCreditor_IDintegerCInvoiceMovement.Creditor_IDLink to Creditor
tiCreditor_ID1integerCInvoice.Creditor_IDLink to Creditor
tiCurrency_IDintegerPostingLine1.Currency_IDCurrency Code
tcCurrencyCodecharacterCurrency2.CurrencyCodeCurrency Code
tcJournaInvoiceCodecharacterJournal1.JournalCodeA daybook code (maximum eight characters).
tcJournalCodecharacterJournal2.JournalCodeA daybook code (maximum eight characters).
tcJournalTypeCodecharacterJournal2.JournalTypeCodeA daybook type code.
api annotation:Value for this field defaults to "Journal Entries".
tdOpenAmountCCdecimalcalculated
tdOpenAmountLCdecimalcalculated
tdOpenAmountTCdecimalcalculated
tdOriginalAmountCCdecimalcalculated
tdOriginalAmountLCdecimalcalculated
tdOriginalAmountTCdecimalcalculated
tiOverdueDaysintegercalculated
tdPaymentAmountTCdecimalcalculated
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_IDintegerPostingLine1.PostingLine_IDRecord ID
tiPostingLine_ID1integerPostingLine2.PostingLine_IDRecord ID
tdPostingLineCreditCCdecimalPostingLine1.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
tdPostingLineCreditLCdecimalPostingLine1.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.
tdPostingLineCreditTCdecimalPostingLine1.PostingLineCreditTCTC Credit
tdPostingLineDebitCCdecimalPostingLine1.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.
tdPostingLineDebitLCdecimalPostingLine1.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.
tdPostingLineDebitTCdecimalPostingLine1.PostingLineDebitTCTC Debit
tdPostingLineExchangeRatedecimalPostingLine1.PostingLineExchangeRateExchange Rate
api annotation:Default value for this field depends on the exchang erate shared set specified for the current domain.
tcPostingTextcharacterPosting.PostingTextFree text describing the posting.
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.
tiPostingYearintegerPosting.PostingYearThe GL calendar year for the posting.
tiWeekNumbersintegercalculated


Internal usage


QadFinancials
method BCreditor.GetCInvoicePayment