Description
Get the format of the amount
Parameters
iiCurrencyID | input | integer | |
icCurrencyCode | input | character | |
ocFormat | output | character | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program7/bclosingpostingsreport.p)
find first tCurrencyRounding where
tCurrencyRounding.tiCurrencyID = iiCurrencyID or
tCurrencyRounding.tcCurrencyCode = icCurrencyCode
no-lock no-error.
if available tCurrencyRounding
then do:
assign ocFormat = "->>>,>>>,>>>,>>9":U
vdRemainder = tCurrencyRounding.tdRoundingMethodUnit.
do while vdRemainder - trunc(vdRemainder, 0) <> 0:
if vdRemainder = tCurrencyRounding.tdRoundingMethodUnit then assign ocFormat = ocFormat + ".":U.
assign ocFormat = ocFormat + "9":U
vdRemainder = vdRemainder * 10.
end.
end.
else assign ocFormat = "->>>,>>>,>>>,>>9.99":U.