project QadFinancials > class BBankEntry > method ValGL

validation procedure

Description

Validation of the gl code, must be a bank gl


Parameters


iiTargetFieldinputintegerValue of the business field to validate.
icTargetFieldNameinputcharacterName of the business field to validate.
icRowidinputcharacterContents of field tc_Rowid, if the target field is a field of a component temp-table.
icGLTypeCodeinputcharacterGL type code
icGLCodeinputcharacterGL code
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
validation on relation GLINBANKSTATE


program code (program5/bbankentry.p)

if iiTargetField <> ? and iiTargetField <> 0 and
      icGLTypeCode <> {&GLTYPECODE-BANK} and
      icGLTypeCode <> {&GLTYPECODE-CASH}
    then do:
        assign vcMessage      = trim(substitute(#T-1'GL account (&1) must be of type '&2' or '&3'.':155(14851)T-1#, icGLCode, {&GLTYPECODE-BANK-TR},{&GLTYPECODE-CASH-TR}))
               oiReturnStatus = -1.
        <M-2 run SetMessage (input  vcMessage (icMessage), 
                         input  '':U (icArguments), 
                         input  icTargetFieldName (icFieldName), 
                         input  icGLCode (icFieldValue), 
                         input  'E':U (icType), 
                         input  3 (iiSeverity), 
                         input  icRowid (icRowid), 
                         input  'QADFIN-3402':U (icFcMsgNumber), 
                         input  ? (icFcExplanation), 
                         input  ? (icFcIdentification), 
                         input  ? (icFcContext), 
                         output viFcReturnSuper (oiReturnStatus)) in BBankEntry>
    end.