project QadFinancials > class BDInvoice > business logic query DInvoiceStageByDueDate


Parameters


iiDInvoiceIDintegerDInvoice ID
itDueDatedateDue Date of DInvoice Staged


query condition


  each DInvoiceStage where
DInvoiceStage.DInvoice_ID = iiDInvoiceID AND
DInvoiceStage.DInvoiceStageDueDate <= itDueDate

      first PaymentConditionStaged (inner-join) where
PaymentConditionStaged.PaymentConditionStaged_ID = DInvoiceStage.PaymentConditionStaged_ID AND

          first PaymentCondition (inner-join) where
PaymentCondition.PaymentCondition_ID = PaymentConditionStaged.StagedPaymentCondition_ID AND


query sort order


DInvoiceStage.DInvoiceStageDueDate (ascending)


query resultset tqDInvoiceStageByDueDate


field namedata typedb fielddescription
tiDInvoice_IDintegerDInvoiceStage.DInvoice_IDLink to DInvoice
tiDInvoiceStage_IDintegerDInvoiceStage.DInvoiceStage_IDRecord ID
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.
ttDInvoiceStageDiscDatedateDInvoiceStage.DInvoiceStageDiscDateCInvoiceDiscDate Payment discount due date. When the invoice is paid before this date a payment discount can be given.
tdDInvoiceStageDiscPercdecimalDInvoiceStage.DInvoiceStageDiscPercCInvoiceDiscPerc Payment discount percent. When the invoice is paid before the discount due date, this is the discount percentage that can be given.
ttDInvoiceStageDueDatedateDInvoiceStage.DInvoiceStageDueDateDue Date. The date when this stage should end.
tlDInvoiceStageIsSelectedlogicalDInvoiceStage.DInvoiceStageIsSelectedUsed to indicate if a customer invoice stage is included on a payment selection.
tdDInvoiceStagePercentagedecimalDInvoiceStage.DInvoiceStagePercentagePercentage. CInvoiceStagePercent Staged payments credit terms details of the invoice. The percentage of the invoice total that this stage stands for.
tcPaymentConditionCodecharacterPaymentCondition.PaymentConditionCodeCredit Terms Code
tdPaymentConditionLateIntdecimalPaymentCondition.PaymentConditionLateIntDaily Overdue Int Percentage
tdPaymentConditionPercentagedecimalPaymentCondition.PaymentConditionPercentageDiscount Percentage
tiPaymentConditionStaged_IDintegerPaymentConditionStaged.PaymentConditionStaged_IDRecord ID
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(DInvoiceStage),rowid(PaymentConditionStaged),rowid(PaymentCondition)


Internal usage


QadFinancials
method BBankEntry.GetPossibleAllocationsDInvoice
method BDDocument.GetPossibleAllocationStages
method BDebtorFinanceCharge.ApplyFilter
method BDInvoice.CreateDInvoiceStageUpdate
method BDPaymentSelection.GetToPayObjectsStages
method BOpenItemAdjustment.OIAdjApplyFilterDebtor
method BSelfBill.ApiCreateInvPrepayPaymentSub
method BSelfBill.ApiCreateInvPrepayPaymentSubMov