project QadFinancials > class BPaymentFormat > method Calculate

Description

Add code here to initialize the calculated fields of the class temp-tables after loading existing records from the application database.


Parameters


oiReturnStatusoutputinteger


Internal usage


unused


program code (program/bpaymentformat.p)

<ANCESTOR-CODE>

assign vcListPair = {&PAYMENTFORMATS}
       vcListCode = ?
       vcListTr   = ?.       


do viIndex = 2 to num-entries(vcListPair, chr(2)) by 2:
    assign vcListCode = if vcListCode = ?
                        then entry(viIndex, vcListPair, chr(2))
                        else vcListCode + chr(2) + entry(viIndex, vcListPair,chr(2))
           vcListTr   = if vcListTr = ? 
                        then entry(viIndex - 1, vcListPair,chr(2))
                        else vcListTr + chr(2) + entry(viIndex - 1, vcListPair,chr(2)).
end.

for each tPayFormatType:
    assign viIndex = lookup(tPayFormatType.PayFormatTypeCode, vcListCode, chr(2)) no-error.
    if viIndex > 0
    then assign tPayFormatType.tcPayFormatTypeCodeTr =  entry(viIndex, vcListTr, chr(2)) no-error.
end.