Parameters
iiDPaySelLineID | input | integer | |
icBankCurrencyCode | input | character | |
idBankExchangeRate | input | decimal | |
idBankExchangeRateScale | input | decimal | |
odTotalLineAmountBC | output | decimal | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program4/bdpaymentselection.p)
find first tDPaySelLine where tDPaySelLine.DPaySelLine_ID = iiDPaySelLineID.
if available tDPaySelLine
then do:
assign
vdLinePaymentAmount = 0
vdLineDiscountAmount = 0.
for each tDPaySelLineStg where tDPaySelLineStg.DPaySelLine_ID = tDPaySelLine.DPaySelLine_ID:
assign
vdLinePaymentAmount = vdLinePaymentAmount + tDPaySelLineStg.DPaySelLineStgPaymAmtTC
vdLineDiscountAmount = vdLineDiscountAmount + tDPaySelLineStg.DPaySelLineStgDiscAmtTC.
end. /* for each tDPaySelLineStg */
assign
tDPaySelLine.DPaySelLineAmountTC = vdLinePaymentAmount
tDPaySelLine.DPaySelLineDiscountTC = vdLineDiscountAmount.
odTotalLineAmountBC = <M-12 RoundAmount
(input vdLinePaymentAmount * tDPaySelLine.tdInvoiceRate * tDPaySelLine.tdInvoiceRateScale / (idBankExchangeRate * idBankExchangeRateScale) (idUnroundedAmount),
input '':U (iiCurrencyID),
input icBankCurrencyCode (icCurrencyCode)) in BApplicationProperty>.
end. /* for each tDPaySelLine */