Parameters
| iiPeriodYear | input | integer | |
| iiPeriodPeriod | input | integer | |
| iiDaysInterval | input | integer | |
| iiNumberOfPeriods | input | integer | |
| ocIntervalDates | output | character | chr(2)-separated list of dates, based on the provided period, interval and number of dates. |
| otPeriodEndDate | output | date | |
| oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program4/bcashreport.p)
assign oiReturnStatus = -98.
<Q-1 run PeriodByYearPeriod (first) (Read) (NoCache)
(input viCompanyId, (CompanyId)
input iiPeriodYear, (PeriodYear)
input iiPeriodPeriod, (PeriodPeriod)
input ?, (PeriodId)
output dataset tqPeriodByYearPeriod) in BPeriod >
find first tqPeriodByYearPeriod where
tqPeriodByYearPeriod.tiPeriodYear = iiPeriodYear and
tqPeriodByYearPeriod.tiPeriodPeriod = iiPeriodPeriod
no-lock no-error.
if not available(tqPeriodByYearPeriod)
then do:
if oiReturnStatus = -98
then oiReturnStatus = 0.
return.
end.
assign otPeriodEndDate = tqPeriodByYearPeriod.ttPeriodEndDate.
do viPeriodCounter = 1 to iiNumberOfPeriods:
assign ocIntervalDates = ocIntervalDates + chr(2) +
string(tqPeriodByYearPeriod.ttPeriodEndDate + iiDaysInterval * viPeriodCounter, "99/99/9999":U).
end.
if (ocIntervalDates <> "")
then assign ocIntervalDates = substring(ocIntervalDates, 2,-1,"CHARACTER":U).
if (oiReturnStatus = -98)
then oiReturnStatus = 0.