validation procedure
Description
Validates if the journal is active and of type creditor payment.
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. |
icJournalType | input | character | Journal Type |
ilActive | input | logical | Active flag |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program5/bcdocumentstatus.p)
if icJournalType <> {&JOURNALTYPE-CREDITORPAYMENT}
then do:
<M-5 run SetMessage
(input trim(#T-6'The daybook must be of type $1.':250(957)T-6#) (icMessage),
input {&JOURNALTYPE-CREDITORPAYMENT-TR} (icArguments),
input icTargetFieldName (icFieldName),
input string(iiTargetField) (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input icRowid (icRowid),
input 'QADFIN-2243':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BCDocumentStatus>
assign oiReturnStatus = -1.
end.
if not ilActive
then do:
<M-7 run SetMessage
(input trim(#T-7'You can only specify active daybooks.':250(14941)t-7#) (icMessage),
input '':U (icArguments),
input icTargetFieldName (icFieldName),
input string(iiTargetField) (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input icRowid (icRowid),
input 'QADFIN-3523':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BCDocumentStatus>
assign oiReturnStatus = -1.
end.