Wednesday, August 29, 2018

New plugin sheets : Balance sheet and Income statement

I published more than four days of work for #2510. The following is a summary of the changes.

Fiscal years are now stored in the database instead of being a choicelist. lino_xl.lib.accounting.FiscalYear is now a model.

New plugin lino_xl.lib.sheets documented in sheets : Balance sheet and Income statement. Changes in accounting: General accounting.

I discovered a cool and well-hidden bug. The virtual fields debit and credit said the opposite of what they should say. A movement with dc having True was shown in the “Credit” column and vice versa. As a result, the lino_xl.lib.accounting.Journal.dc in demo data were wrong because I configured their value based on the debit and credit in generated movements. And consequently all dc fields theoretically need to get inverted. In a later commit I changed the values of DEBIT and CREDIT. Otherwise I would have had to write a script for Lino Tera which inverts the dc of all existing movements and vouchers and journals in existing production sites.

TODO:

  • Add a summary table with one row per AccountingPeriod and Account? IOW do with AccountingPeriod the same as with FiscalYear.

  • Add a feature to explicitly specify the app_label of a DetailLayout. This would make it possible that sheets redefines the default accounts.AccountDetail.

Side effects

Later I also merged lino_xl.lib.accounts into lino_xl.specs.accounting (#2514).