project QadFinancials > class BVATPeriod > method DataLoadMultiple

Description

Give the period records for a vat year


Parameters


iiVatYearinputintegerThe VAT year from which you want all the VAT period records
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


unused


program code (program1/bvatperiod.p)

if iiVatYear = 0
then do:
    assign vcMessage      = trim(#T-5'Enter the tax year you want to load.':255(3867)T-5#)
           oiReturnStatus = -1.
           
    <M-1 run SetMessage (input  vcMessage (icMessage),
                     input  '':U (icArguments),
                     input  '':U (icFieldName),
                     input  '':U (icFieldValue),
                     input  'E':U (icType),
                     input  3 (iiSeverity),
                     input  '':U (icRowid),
                     input  'QADFIN-216':U (icFcMsgNumber),
                     input  '' (icFcExplanation),
                     input  '' (icFcIdentification),
                     input  '' (icFcContext),
                     output viFcReturnSuper (oiReturnStatus)) in BVATPeriod>
                     
    return.
end.

<M-2 run ClearData (output viFcReturnSuper (oiReturnStatus)) in BVATPeriod>
    
if viFcReturnSuper <> 0
then do:
    assign oiReturnStatus = viFcReturnSuper.
    return.
end.

<Q-3 run VatPeriodByVatYearPeriod (all) (Read) (NoCache)
          (input viCompanyId, (CompanyId)
           input iiVatYear, (VatPeriodYear)
           input ?, (VatPeriodPeriod)
           output dataset tqVatPeriodByVatYearPeriod) in BVATPeriod >
                                   
for each tqVatPeriodByVatYearPeriod where
         tqVatPeriodByVatYearPeriod.tiCompany_ID    = viCompanyId and
         tqVatPeriodByVatYearPeriod.tiVatPeriodYear = iiVatYear:
    <M-4 run DataLoad
          (input  '':U (icRowids), 
           input  string(tqVatPeriodByVatYearPeriod.tiVatPeriod_ID) (icPkeys), 
           input  '':U (icObjectIds), 
           input  '' (icFreeform), 
           input  true (ilKeepPrevious), 
           output viFcReturnSuper (oiReturnStatus)) in BVATPeriod>
                   
    if viFcReturnSuper <> 0
    then do:
        assign oiReturnStatus = viFcReturnSuper.
        return.
    end.
end.