project QadFinancials > class BYearClosing > method GetNumberingDateForYearClosing

Description

Get numbering date for year-end closing


Parameters


iiCompanyIDinputinteger
iiYearinputinteger
otNumberingDateoutputdate
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


unused


program code (program1/byearclosing.p)

if iiYear <= 0 or iiYear = ? or iiCompanyID <=0 or iiCompanyID = ?
then do:
    assign otNumberingDate = today.
end.

if viBPeriodYearClosingID = 0 or viBPeriodYearClosingID = ?
then do:
    <I-84 {bFcStartAndOpenInstance
         &CLASS                = "BPeriod"}>
end.
else do:
    <I-12 {bFcOpenInstance
         &CLASS           = "BPeriod"}>
end.

<Q-35 run PeriodByYearPeriod (all) (Read) (NoCache)
    (input iiCompanyID, (CompanyId)
     input iiYear, (PeriodYear)
     input ?, (PeriodPeriod)
     input ?, (PeriodId)
     output dataset tqPeriodByYearPeriod) in BPeriod >
     
for last tqPeriodByYearPeriod by tqPeriodByYearPeriod.tiPeriodPeriod:
    assign otNumberingDate = tqPeriodByYearPeriod.ttPeriodEndDate.
end.

<I-88 {bFcCloseInstance
      &CLASS           = "BPeriod"}>