validation procedure
Description
Validate the Period : only open GL Periods and Periods open for Sales Ledger are allowed.
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. |
icPeriodStatus | input | character | Period Status |
ilIsPostingSalesAllowed | input | logical | Is Posting Sales Allowed |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program5/bdinvoice.p)
if icPeriodStatus <> {&PERIODSTATUS-OPEN}
then do:
assign vcMessage = trim(#T-3'You can only use open GL periods.':150(1095)t-3#)
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-409':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BDInvoice>
end.
/* BDInvoice.ValPeriodId (ModularityFlag will be checked only in BPosting.ValPeriod)
if not ilIsPostingSalesAllowed
then do:
assign vcMessage = trim("Only Accounting Periods open for Sales Ledger are allowed":L150)
oiReturnStatus = -1.
<M-2 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-410':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BDInvoice>
end.
*/