project QadFinancials > class BCInvoice > method ValPeriodId

validation procedure

Description

Validate the Accounting Year/ Period, only open periods are allowed


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.
icPeriodStatusinputcharacterStatus of the Accounting Period
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
validation on relation PERIODINCINVOICE


program code (program5/bcinvoice.p)

if icPeriodStatus <> {&PERIODSTATUS-OPEN}
then do:
    <M-1 run SetMessage
       (input  trim(#T-4'You can only use open GL periods.':150(1095)t-4#) (icMessage), 
        input  '':U (icArguments), 
        input  icTargetFieldName (icFieldName), 
        input  string(iiTargetField) (icFieldValue), 
        input  'E':U (icType), 
        input  3 (iiSeverity), 
        input  icRowid (icRowid), 
        input  'QADFIN-342':U (icFcMsgNumber), 
        input  '':U (icFcExplanation), 
        input  '':U (icFcIdentification), 
        input  '':U (icFcContext), 
        output viFcReturnSuper (oiReturnStatus)) in BCInvoice>

    assign oiReturnStatus = -1.
end.