project QadFinancials > class BCInvoice > business logic query CInvoiceStageByDueDate


Parameters


iiCInvoice_IDinteger
itDueDatedate


query condition


  each CInvoiceStage where
CInvoiceStage.CInvoice_ID = iiCInvoice_ID AND
CInvoiceStage.CInvoiceStageDueDate <= itDueDate

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

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


query resultset tqCInvoiceStageByDueDate


field namedata typedb fielddescription
tiCInvoice_IDintegerCInvoiceStage.CInvoice_IDLink to CInvoice
tiCInvoiceStage_IDintegerCInvoiceStage.CInvoiceStage_IDRecord ID
tdCInvoiceStageAmountTCdecimalCInvoiceStage.CInvoiceStageAmountTCCInvoiceStageAmountTC Staged payments credit terms details of the invoice. The amount to pay in TC for this stage.
tdCInvoiceStageAmtAppliedTCdecimalCInvoiceStage.CInvoiceStageAmtAppliedTCCInvoiceStageAmtAppliedTC Staged payments credit terms details of the invoice. The amount paid in TC for this stage.
ttCInvoiceStageDiscDatedateCInvoiceStage.CInvoiceStageDiscDateCInvoiceDiscDate Payment discount due date. When the invoice is paid before this date a payment discount can be given.
tdCInvoiceStageDiscPercdecimalCInvoiceStage.CInvoiceStageDiscPercCInvoiceDiscPerc Payment discount percent. When the invoice is paid before the discount due date, this is the discount percentage that can be given.
ttCInvoiceStageDueDatedateCInvoiceStage.CInvoiceStageDueDateDue Date. The date when this stage should end.
tdCInvoiceStagePercentdecimalCInvoiceStage.CInvoiceStagePercentCInvoiceStagePercent Staged payments credit terms details of the invoice. The percentage of the invoice total that this stage stands for.
tcPaymentConditionCodecharacterPaymentCondition.PaymentConditionCodeCredit Terms Code
tdPaymentConditionPercentagedecimalPaymentCondition.PaymentConditionPercentageDiscount Percentage
tiPaymentConditionStaged_IDintegerCInvoiceStage.PaymentConditionStaged_IDDiscount Percentage
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(CInvoiceStage),rowid(PaymentConditionStaged),rowid(PaymentCondition)


Internal usage


QadFinancials
method BBankEntry.GetPossibleAllocationsCInvoice
method BCDocument.GetPossibleAllocationStages
method BCInvoice.CreateCInvoiceStageUpdate
method BOpenItemAdjustment.OIAdjApplyFilterCreditor
method BPaymentSelection.CreateProposedStagedLines