project QadFinancials > class BDInvoice > business logic query DInvoiceByDebtorIsOpen


Parameters


iiCompanyIdintegerCompany id
iiDebtorIdinteger
ilDInvoiceIsOpenlogical
icDInvoiceTypecharacter


query condition


  each DInvoice where
DInvoice.Company_Id = iiCompanyId AND
DInvoice.Debtor_ID = iiDebtorId AND
DInvoice.DInvoiceIsOpen = ilDInvoiceIsOpen AND
DInvoice.DInvoiceType = icDInvoiceType

      first CostCentre (outer-join) where
CostCentre.SharedSet_Id = vi_COSTCENTRE_sharedset(iiCompanyId) AND
CostCentre.CostCentre_ID = DInvoice.CostCentre_ID AND

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

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

      first Period (inner-join) where
Period.Company_Id = iiCompanyId AND
Period.Period_ID = DInvoice.Period_ID AND

      first Project (outer-join) where
Project.SharedSet_Id = vi_PROJECT_sharedset(iiCompanyId) AND
Project.Project_ID = DInvoice.Project_ID AND

      first Reason (inner-join) where
Reason.Reason_ID = DInvoice.Reason_ID AND


query sort order


DInvoice.DInvoiceDueDate (ascending)


query resultset tqDInvoiceByDebtorIsOpen


field namedata typedb fielddescription
tiCompany_IDintegerDInvoice.Company_IDLink to Company
tcCostCentreCodecharacterCostCentre.CostCentreCodeCost Center: A code that identifies the cost center.
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiDebtor_IDintegerDInvoice.Debtor_IDLink to Debtor
tiDInvoice_IDintegerDInvoice.DInvoice_IDRecord ID
tdDInvoiceBalanceCreditLCdecimalDInvoice.DInvoiceBalanceCreditLCBC 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.
tdDInvoiceBalanceCreditTCdecimalDInvoice.DInvoiceBalanceCreditTCTC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
tdDInvoiceBalanceDebitLCdecimalDInvoice.DInvoiceBalanceDebitLCBC 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.
tdDInvoiceBalanceDebitTCdecimalDInvoice.DInvoiceBalanceDebitTCTC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in transaction currency.
tdDInvoiceBalanceLCdecimalDInvoice.DInvoiceBalanceLCBC Balance. This field displays the sum of the debit and credit amounts of all posting lines in base currency.
This field is calculated by the system using the TC Balance and the Exchange rate.
tdDInvoiceBalanceTCdecimalDInvoice.DInvoiceBalanceTCBalance. This field displays the sum of the debit and credit amounts of all posting lines in transaction currency.
ttDInvoiceDueDatedateDInvoice.DInvoiceDueDateDue Date. This field displays the date when payment is due, calculated by the system based on the credit terms and the invoice date. User can modify the due date without affecting the credit terms.
If the credit terms have a base date specified, this is used in the due date calculations rather than the invoice creation date.
tlDInvoiceIsOpenlogicalDInvoice.DInvoiceIsOpenOpen.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
ttDInvoiceLastFinChargeDatedateDInvoice.DInvoiceLastFinChargeDateLast Finance Charge Date. Date last finance charge was applied
tcDInvoiceTypecharacterDInvoice.DInvoiceTypeInvoice Type. This field displays the invoice type.
Invoice Correction and Credit Note Correction display as choices only when the appropriate daybook types have already been defined.
api annotation:PartialUpdate = yes - defaults to Invoice
tiDInvoiceVoucherintegerDInvoice.DInvoiceVoucherVoucher.This field displays the numeric identifier assigned to the posting.
When the daybook of the journal entry is charged(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.
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tiPeriodYearintegerPeriod.PeriodYearGL Calendar Year
tcProjectCodecharacterProject.ProjectCodeProject
tcReasonCodecharacterReason.ReasonCodeInvoice Status Code


Internal usage


QadFinancials
method BDebtor.ApiCheckCreditLimit
method BDebtor.ApiGetCustomerInvoicePastDueTotal
method BDebtor.CalculateBOIforCompanies
method BDebtorFinanceCharge.ApplyFilter