Skip to main content

Change of Accounting Period – Fiscal Period

For example, for cases of extending the accounting period – fiscal period

Written by Petr Pech

Changing the accounting period to a fiscal period — for example, extending it from the end of 31 Dec 2018 to
31 Mar 2019 — using a query (directly in the database):

-- disables the trigger
ALTER TABLE nucetobdobi DISABLE TRIGGER nucetniobdobiupdate;
-- sets the new end date of the old period
UPDATE nucetobdobi set platidodata = '2019-03-31' WHERE iducetobdobi = 1;
-- sets the new start date of the new period
UPDATE nucetobdobi set platioddata = '2019-04-01' WHERE iducetobdobi = 2;
-- enables the trigger
ALTER TABLE nucetobdobi ENABLE TRIGGER nucetniobdobiupdate;
-- deletes turnovers of the old period except for the opening balance
DELETE FROM uobraty WHERE iducetobdobi = 1 AND obdobi > 0;
-- deletes turnovers of the old period
DELETE FROM uobraty WHERE iducetobdobi = 2 ;
-- rewrites card IDs from the new period to the old one
UPDATE dpolsklad as p set idkarty = (select idkarty FROM skarty as s WHERE s.idcenik = p.idcenik AND s.idskladu = p.idbspskl AND iducetobdobi = 1)
WHERE p.datvyst >= '2019-01-01' AND p.datvyst <= '2019-03-31'

Afterwards, the following steps must be performed:
-- recalculation of accounts in 2018
-- recalculation of cards in 2018
-- transfer to the new period in 2018
-- recalculation of accounts in 2019
-- recalculation of cards in 2019

Warning: If you use asset management, it is necessary to verify the turnovers. To reload the turnovers, you need to run the initialization of the following accounting period.

These modifications are not covered by technical support. If you are interested, a custom adjustment tailored to your needs can be arranged. Please contact us if you would like to proceed.

Did this answer your question?