project QadFinancials > class BBill > method NextWorkingDay

Description

Get the next working day date from the input date.


Parameters


iiCompanyIdinputinteger
itInputDateinputdate
otOutputDateoutputdate
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BBill.ApiGetBillingDueDate
method BBill.NextWorkingDay


program code (program1/bbill.p)

<Q-69 run GetHolidayByDate (all) (Read) (NoCache)
   (input iiCompanyId, (CompanyId)
    input itInputDate, (InputDate)
    output dataset tqGetHolidayByDate) in BHoliday>


find first tqGetHolidayByDate NO-ERROR.

/* If InputDate is not a holiday, then OutputDate = InputDate */
if not available tqGetHolidayByDate then do: 
    assign otOutputDate = itInputDate.
end.
/* If InputDate is a holiday, then consider InputDate + 1 */
else do:
    <M-96 run NextWorkingDay
       (input  iiCompanyId (iiCompanyId), 
        input  itInputDate + 1 (itInputDate), 
        output otOutputDate (otOutputDate), 
        output oiReturnStatus (oiReturnStatus)) in BBill>
end.