project QadFinancials > class BClosingPostingsReport > method GetAmountFormat

Description

Get the format of the amount


Parameters


iiCurrencyIDinputinteger
icCurrencyCodeinputcharacter
ocFormatoutputcharacter
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BClosingPostingsReport.IsGLAutoBalClear


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.