project QadFinancials > class BVATPeriod > method ValEndDateAfterStartDate

validation procedure

Description

End Date must be situated after Start Date


Parameters


itTargetFieldinputdateValue of the field to validate.
icTargetFieldNameinputcharacterName of the field to validate. Use the database field name or public data item name.
Example : 'Order.Order-Num'.
icRowidinputcharacterContents of field tc_Rowid, if the target field is a field of a component temp-table.
itStartDateinputdateStart Date
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
validation on tVatPeriod.VatPeriodEndDate


program code (program4/bvatperiod.p)

if itTargetField < itStartDate
then do:
    <M-1 run SetMessage
          (input  trim (#T-2'The end date ($1) must be after the start date ($2).':100(3860)t-2#) (icMessage), 
           input  string(itTargetField) + chr(2) + string(itStartDate) (icArguments), 
           input  icTargetFieldName (icFieldName), 
           input  string(ittargetField) (icFieldValue), 
           input  'E':U (icType), 
           input  3 (iiSeverity), 
           input  icRowid (icRowid), 
           input  'QADFIN-193':U (icFcMsgNumber), 
           input  '' (icFcExplanation), 
           input  '' (icFcIdentification), 
           input  '' (icFcContext), 
           output viFcReturnSuper (oiReturnStatus)) in BVATPeriod>
                     
    assign oiReturnStatus = -1.
end.