Summary

PBooks Fiscal Periods manage the fiscal year for businesses. Fiscal periods can start at different times for different businesses.

Database

The PBooks database is specifically designed to scale well, so there won't be a need to delete and summarize any transactions. I would like to add a field to the entries and transactions tables for accounting periods, so it can be an easy and simple way to always filter out the closed books, but make a global change if you need to go back and review, or even make a copy of a past period and restate results. That might actually work really well. Say you need to restate earnings for 2006, you can copy the entire year to 2006-restated and then make the alterations you need, keeping the original intact. Again something for the future.

Another idea is to have separate tables and prefixes for each fiscal period. * pb_2007_entries * pb_2007_general_ledger

Closing Entries

The closing of the income and expense accounts and carrying over to retained earnings makes sense, as does the balance sheet accounts. An entry is made in each account where one side is the closing balance, and the other the starting balance. So you start the new fiscal period with 0 revenue, 0 expenses, and the same balances on your assets and liabilities as you ended the last period with, balanced out by the change in P/L to retained earnings.

I'm leaning towards the fiscal period field in the db as opposed to creating new db files. Just a simple flag to add to each db query. Any reason why there might be a need for spanning multiple fiscal periods? It could be designed in as a standard feature, but would slow down performance a little.