project QadFinancials > class BDDocument > method GetAllocAmountByInvoice

Description

Get the alloc amount for the specified invoice in the payment.


Parameters


iiInvoiceIDinputinteger
iiDDocumentIDinputinteger
bdAllocAmountinput-outputdecimal
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BBankImportLine.GetInvoicesByBankImpLine


program code (program6/bddocument.p)

assign oiReturnStatus = -98.

for each t_oDDocument where t_oDDocument.DDocument_ID = iiDDocumentID:
    for each t_oDDocumentInvoiceXref where t_oDDocumentInvoiceXref.tc_ParentRowid = t_oDDocument.tc_Rowid
                                            and t_oDDocumentInvoiceXref.DInvoice_ID = iiInvoiceID :
        assign bdAllocAmount = bdAllocAmount + t_oDDocumentInvoiceXref.DDocumentInvoiceXrefAlloTC.
    end.
end.
assign oiReturnStatus = 0.