project QadFinancials > class BCMask > 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/bcmask.p)

<ANCESTOR-CODE>

/* calculate the journal type code */
for each tCMaskJournal where
         tCMaskJournal.tc_Status <> "D":U:
    
    /* calculate the journal type */
    do viCounter = num-entries({&JOURNALTYPES}, chr(2)) to 1 by -2:
        if entry(viCounter, {&JOURNALTYPES}, chr(2)) = tCMaskJournal.tcJournalTypeCode
        then do:
            assign tCMaskJournal.tcJournalTypeCode = entry(viCounter - 1, {&JOURNALTYPES}, chr(2)) no-error.
            leave.   
        end. /* if entry */
    end. /* do viCounter */

end.