project QadFinancials > class BBankEntry > method ValPeriodId

validation procedure

Description

Period must be open for transactions


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.
ilPeriodIsPostingGLAllowedinputlogicalIs Posting GL Allowed
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
validation on relation PERIODINBANKSTATE


program code (program5/bbankentry.p)

if not ilPeriodIsPostingGLAllowed
    then do:
        assign vcMessage      = trim(#T-2'You can only specify GL periods that are open for general ledger transactions.':150(322)t-2#)
               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-2366':U (icFcMsgNumber),
                     input  '' (icFcExplanation),
                     input  '' (icFcIdentification),
                     input  '' (icFcContext),
                     output viFcReturnSuper (oiReturnStatus)) in BBankEntry>
    end.