project QadFinancials > class BDInvoice > business logic query DInvoiceStageByDebtorIsOpen


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 (inner-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

      each DInvoiceStage (inner-join) where
DInvoiceStage.DInvoice_ID = DInvoice.DInvoice_ID AND

      first Project (inner-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 resultset tqDInvoiceStageByDebtorIsOpen


field namedata typedb fielddescription
tcCostCentreCodecharacterCostCentre.CostCentreCodeCost Center: A code that identifies the cost center.
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiDebtor_IDintegerDInvoice.Debtor_IDLink to Debtor
tiDInvoice_IDintegerDInvoice.DInvoice_IDRecord ID
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
tdDInvoiceStageAmountTCdecimalDInvoiceStage.DInvoiceStageAmountTCTC Amount. CInvoiceStageAmountTC Staged payments credit terms details of the invoice. The amount to pay in TC for this stage.
tdDInvoiceStageAmtAppliedTCdecimalDInvoiceStage.DInvoiceStageAmtAppliedTCTC Applied Amount. CInvoiceStageAmtAppliedTC Staged payments credit terms details of the invoice. The amount paid in TC for this stage.
ttDInvoiceStageDueDatedateDInvoiceStage.DInvoiceStageDueDateDue Date. The date when this stage should end.
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.
tcProjectCodecharacterProject.ProjectCodeProject
tcReasonCodecharacterReason.ReasonCodeInvoice Status Code


Internal usage


QadFinancials
method BDebtor.ApiCheckCreditLimit
method BDebtorFinanceCharge.ApplyFilter