2012-10-01 60 views

回答

3

A DataAreaId标识法律实体(CompanyInfo表中的记录)。每个法律实体都有一个分类帐(Ledger表中的一条记录,其中PrimaryForLegalEntity字段是CompanyInfo记录的RecId)。总帐由FiscalCalendar字段绑定到FiscalCalendar记录。 FiscalCalendarPeriod记录也基于FiscalCalendar字段属于特定的FiscalCalendar

有一个帮助类FiscalCalendars有许多方法来处理会计日历。例如,以下是获取公司'CEU'当前期间结束日期的一种方法:

RecId fiscalCalendarRecId=Ledger::fiscalCalendar(CompanyInfo::find('CEU').RecId); 
date currentDate=SystemDateGet(); 
date endDate=FiscalCalendars::findPeriodEndDateByDate(fiscalCalendarRecId,currentDate); 
info(date2StrUsr(endDate));