project QadFinancials > class BDInvoice > method ValidateTaxPointDate

validation procedure

Description

Validates the tax point date : checks if tax point date falls in a valid vat period


Parameters


itDinvoiceTaxPointDateinputdatetax point date of the debtor invoice
icRowidinputcharacterContents of field tc_Rowid, if the target field is a field of a component temp-table.
blstartVatPeriodByStartDateinput-outputlogicalIs query tqVatPeriodByStartDate already started or not ?
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BDInvoice.ValidateComponentAllPost


program code (program5/bdinvoice.p)

<Q-1 assign vlFcQueryRecordsAvailable = VatPeriodByStartEndDate (NoCache)
   (input viCompanyId, (CompanyId)
    input itDinvoiceTaxPointDate, (Date)
    input ?, (Status)) in BVATPeriod >
if not vlFcQueryRecordsAvailable
then do:
    assign vcMessage      = trim(#T-3'No tax period is defined for the tax point date.':150(1115)t-3#)
           oiReturnStatus = -1.
    vcDatetemp =   <M-88 DisplayDate  (input  itDinvoiceTaxPointDate (itDate)) in BDInvoice>.
    <M-2 run SetMessage
       (input  vcMessage (icMessage), 
        input  '':U (icArguments), 
        input  'tDinvoice.DinvoiceTaxPointDate':U (icFieldName), 
        input  vcDatetemp (icFieldValue), 
        input  'E':U (icType), 
        input  3 (iiSeverity), 
        input  icRowid (icRowid), 
        input  'QADFIN-419':U (icFcMsgNumber), 
        input  '' (icFcExplanation), 
        input  '' (icFcIdentification), 
        input  '' (icFcContext), 
        output viFcReturnSuper (oiReturnStatus)) in BDInvoice>
end.