project QadFinancials > class BBankStateImport > 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/bbankstateimport.p)

<ANCESTOR-CODE>

/***********************************************************************/
/* Save latest saved values                                            */
for each tBankStateImport:
    
    /***********************************************************************/
    /* Retrieve the name of the user                                       */
    if tBankStateImport.Usr_ID <> 0 and 
       tBankStateImport.Usr_ID <> ?
    then do :
        /* MERGECHECK
        <Q-1 run UserById (all) (Read) (NoCache)
          (input tBankStateImport.Usr_ID, (UsrId)
           output dataset tqUserById) in BUser >
        find first tqUserById no-lock no-error.
        if available tqUserById
        then assign vcUserName = tqUserById.tcUsrLogin.
        * MERGECHECK*/
    end.
    else assign vcUserName = "":U.
    /***********************************************************************/    
    /* Assign the last used fields                                         */
    assign tBankStateImport.tcLastBankStateImportTime = string(trunc(tBankStateImport.BankStateImportTime / 3600,0),"99":U)  + ":":U + 
                                                        string(trunc((tBankStateImport.BankStateImportTime - trunc(tBankStateImport.BankStateImportTime / 3600,0) * 3600) / 60,0),"99":U) + ":":U + 
                                                        string(tBankStateImport.BankStateImportTime - trunc(tBankStateImport.BankStateImportTime / 60,0) * 60,"99":U)
                                                        no-error.
    assign tBankStateImport.tcLastBankStateImportFile = tBankStateImport.BankStateImportFile
           tBankStateImport.ttLastBankStateImportDate = tBankStateImport.BankStateImportDate
           tBankStateImport.tcLastBankStateImportUser = vcUserName
           tBankStateImport.BankStateImportFile       = '':U
           tBankStateImport.BankStateImportDate       = today
           tBankStateImport.BankStateImportTime       = time
           tBankStateImport.Usr_ID                    = viUsrId no-error.
end.