validation procedure
Parameters
iiTargetField | input | integer | Value of the business field to validate. |
icTargetFieldCode | input | character | |
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. |
icGLAccountType | input | character | |
ilGLAccountIsActive | input | logical | |
ilGLAccountIsWithCC | input | logical | |
ilGLAccountIsWithProject | input | logical | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/bexpenseglmatrix.p)
/* ============================================= */
/* Check the properties of NoAnalysisGL */
/* ============================================= */
if icGLAccountType <> {&GLTYPECODE-STAN} or
ilGLAccountIsActive <> true or
ilGLAccountIsWithCC = true or
ilGLAccountIsWithProject = true
then do :
assign vcMessage = trim(substitute(#T-2'The non-analytical GL account &1 should be an active standard account with no cost center or project analysis (ID &2).':255(19)t-2#,icTargetFieldCode,string(iiTargetField))) + chr(10) +
trim(substitute(#T-3'Properties of account '&1':':255(7)T-3#,icTargetFieldCode)) + " ":U +
(if icGLAccountType <> {&GLTYPECODE-STAN} then trim(#T-4'Not standard':60(8)t-4#) else trim(#T-5'Standard':60(9)t-5#)) + ", ":U +
(if ilGLAccountIsActive <> true then trim(#T-6'Inactive':60(10)t-6#) else trim(#T-7'Active':60(11)t-7#)) + ", ":U +
(if ilGLAccountIsWithCC = true then trim(#T-8'Cost Center Enabled':60(13)T-8#) else trim(#T-9'Cost Center Disabled':60(12)T-9#)) + ", ":U +
(if ilGLAccountIsWithProject = true then trim(#T-10'Project Enabled':60(20)T-10#) else trim(#T-11'Project Disabled':60(21)T-11#))
oiReturnStatus = -1.
<M-1 run SetMessage (input vcMessage (icMessage),
input '':U (icArguments),
input icTargetFieldName (icFieldName),
input string(iiTargetField) (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input icRowid (icRowid),
input 'QADFIN-1579':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BExpenseGLMatrix>
end. /* if ilActive <> true */