Closing Periods / Period 13 Requires Change to Catalog

As well as having a "Period 0" to roll forward items from the previous year, it is also possible for Epicor to have closing periods used for various pieces of end of year reconciliation, adding of adjustments, revaluations etc...

These can be seen in the calendar screen setup here:

bf799fb0-24ae-43b8-b9c6-d64768083db0

It is worth noting that there can be more than one of these. So if for example, it were set to 2, there would be both "Period 13" and "Period 14".

However - these additional periods do not get created in the FiscalPer table in Epicor - meaning that when queried by FastClose, even though they are used in the filters, the descriptions don't appear in the grid. This is inconvenient in the Journals template, but in the Balances template it means you see nothing at all, as FastClose doesn't know where to place the data in its internal structures.

The solution is to override the Fiscal Period view in the default catalog, adding in the additional periods. We already do this for Period 0 as here:

<View name="FiscalPeriod">
<Columns>
<CalculatedColumn caption="Year and Period" dataType="String" name="YearAndPeriod">
<Expressions>
<Sql dialect="SqlServer">Convert(nvarchar(4),[FiscalYear]) + '-' + RIGHT('000' + Convert(nvarchar(3), [FiscalPeriod]),3)</Sql>
</Expressions>
</CalculatedColumn>
<CalculatedColumn caption="Year and Period Description" dataType="String" name="YearAndPeriodDescription">
<Expressions>
<Sql dialect="SqlServer">Convert(nvarchar(4),[FiscalYear]) + ' - Period ' + Convert(nvarchar(3), [FiscalPeriod])</Sql>
</Expressions>
</CalculatedColumn>
</Columns>
<Expressions>
<Sql dialect="SqlServer">
select Company, FiscalCalendarID, FiscalYear, FiscalYearSuffix, FiscalPeriod, 'Period ' + Convert(nvarchar(3), FiscalPeriod) as [Description], StartDate, EndDate from dbo.fiscalper
union all
select Company, FiscalCalendarID, FiscalYear, FiscalYearSuffix, 0 as FiscalPeriod, 'Period 0' as [Description], null as StartDate, null as EndDate from dbo.fiscalper where fiscalperiod = 1
</Sql>
</Expressions>
</View>

The solution is to duplicate the union all and following select, amending it for Period 13 etc, as below.

<View name="FiscalPeriod">
<Columns>
<CalculatedColumn caption="Year and Period" dataType="String" name="YearAndPeriod">
<Expressions>
<Sql dialect="SqlServer">Convert(nvarchar(4),[FiscalYear]) + '-' + RIGHT('000' + Convert(nvarchar(3), [FiscalPeriod]),3)</Sql>
</Expressions>
</CalculatedColumn>
<CalculatedColumn caption="Year and Period Description" dataType="String" name="YearAndPeriodDescription">
<Expressions>
<Sql dialect="SqlServer">Convert(nvarchar(4),[FiscalYear]) + ' - Period ' + Convert(nvarchar(3), [FiscalPeriod])</Sql>
</Expressions>
</CalculatedColumn>
</Columns>
<Expressions>
<Sql dialect="SqlServer">
select Company, FiscalCalendarID, FiscalYear, FiscalYearSuffix, FiscalPeriod, 'Period ' + Convert(nvarchar(3), FiscalPeriod) as [Description], StartDate, EndDate from dbo.fiscalper
union all
select Company, FiscalCalendarID, FiscalYear, FiscalYearSuffix, 0 as FiscalPeriod, 'Period 0' as [Description], null as StartDate, null as EndDate from dbo.fiscalper where fiscalperiod = 1
union all
select Company, FiscalCalendarID, FiscalYear, FiscalYearSuffix, 13 as FiscalPeriod, 'Period 13' as [Description], null as StartDate, null as EndDate from dbo.fiscalper where fiscalperiod = 1
</Sql>
</Expressions>
</View>

If you are an Epicor Cloud site, use the following instead:

<View name="FiscalPeriod" autoDiscoverFields="false">
<Columns>
<Column name="Company"/>
<Column name="FiscalCalendarID" />
<Column name="FiscalYear" dataType="Integer"/>
<Column name="FiscalYearSuffix" />
<Column name="FiscalPeriod" dataType="Integer"/>
<Column name="Description" />
<Column name="StartDate" dataType="Date" />
<Column name="EndDate" dataType="Date" />
<CalculatedColumn caption="Year and Period" dataType="String" name="YearAndPeriod">
<Expressions>
<Sql dialect="SqlServer">Convert(nvarchar(4),[FiscalYear]) + '-' + RIGHT('000' + Convert(nvarchar(3), [FiscalPeriod]),3)</Sql>
</Expressions>
</CalculatedColumn>
<CalculatedColumn caption="Year and Period Description" dataType="String" name="YearAndPeriodDescription">
<Expressions>
<Sql dialect="SqlServer">Convert(nvarchar(4),[FiscalYear]) + ' - Period ' + Convert(nvarchar(3), [FiscalPeriod])</Sql>
</Expressions>
</CalculatedColumn>
</Columns>
<Expressions>
<Sql dialect="SqlServer">
select Company, FiscalCalendarID, FiscalYear, FiscalYearSuffix, FiscalPeriod, 'Period ' + Convert(nvarchar(3), FiscalPeriod) as [Description], StartDate, EndDate
from
(
select Company, FiscalCalendarID, FiscalYear, FiscalYearSuffix, FiscalPeriod, 'Period ' + Convert(nvarchar(3), FiscalPeriod) as [Description], StartDate, EndDate from erp.fiscalper
union all
select Company, FiscalCalendarID, FiscalYear, FiscalYearSuffix,
case when fiscalperiod = 1 then 0 else 13 end as FiscalPeriod,
case when fiscalperiod = 1 then 'Period 0' else 'Period 13' end as [Description],
null as StartDate, null as EndDate
from erp.fiscalper where fiscalperiod IN (1, 12)
) fcfp
</Sql>
</Expressions>
</View>

Powered By