validation procedure
Description
Validation of the gl code, must be a bank gl
Parameters
iiTargetField | input | integer | Value of the business field to validate. |
icTargetFieldName | input | character | Name of the business field to validate. |
icRowid | input | character | Contents of field tc_Rowid, if the target field is a field of a component temp-table. |
icGLTypeCode | input | character | GL type code |
icGLCode | input | character | GL code |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
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.