project QadFinancials > class BClosingPostingsReport > method HistoryPostingsCheckValidate

Description

This method is used to do some validations on inputvalues for GL Balance versus Transactions report.


Parameters


oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BClosingPostingsReport.HistoryPostingsCheck


program code (program7/bclosingpostingsreport.p)

if viPeriodPeriodFilter = ? or
   viPeriodYearFilter   = ?
then do:
    <M-1 run SetMessage
       (input  #T-17'You must enter a GL calendar year/GL period.':50(14846)T-17# (icMessage), 
        input  '':U (icArguments), 
        input  '':U (icFieldName), 
        input  '':U (icFieldValue), 
        input  'E':U (icType), 
        input  3 (iiSeverity), 
        input  '':U (icRowid), 
        input  'QADFIN-4051':U (icFcMsgNumber), 
        input  #T-18'You must enter all mandatory filter fields.':100(14847)T-18# (icFcExplanation), 
        input  '':U (icFcIdentification), 
        input  '':U (icFcContext), 
        output oiReturnStatus (oiReturnStatus)) in BClosingPostingsReport>
    assign oiReturnStatus = -1.
end.

/* We need to check if there are still some transactions pending in the historydaemon */
if vlCheckHistoryUpdateFilter = ? or
   vlCheckHistoryUpdateFilter 
then do:
    <Q-19 assign vlFcQueryRecordsAvailable = QPostingLineByCompanyID (NoCache)  (input viCompanyId, (CompanyId)) in BQPosting >
    if vlFcQueryRecordsAvailable = true or
       vlFcQueryRecordsAvailable = ?
    then do:
       <M-20 run SetMessage
          (input  #T-19'Transaction history is not up to date.':50(14722)t-19# (icMessage), 
           input  '':U (icArguments), 
           input  '':U (icFieldName), 
           input  '':U (icFieldValue), 
           input  'E':U (icType), 
           input  3 (iiSeverity), 
           input  '':U (icRowid), 
           input  'QadFin-6954':U (icFcMsgNumber), 
           input  #T-20'There are still some transactions waiting to be processed by the History daemon, which causes inconsistencies.':150(14719)T-20# (icFcExplanation), 
           input  '':U (icFcIdentification), 
           input  '':U (icFcContext), 
           output oiReturnStatus (oiReturnStatus)) in BClosingPostingsReport>

        assign oiReturnStatus = -1.
    end.
end.