tn47 / goledger

Ledger implementation in golang
http://ledger-cli.org
MIT License
35 stars 13 forks source link

Stitch several journal files base on opening balance. #50

Closed prataprc closed 7 years ago

prataprc commented 7 years ago

This can be solved by creating a journal file that includes the other journal-files. Not required to stitch the journal files based on opening-balance.

prataprc commented 7 years ago

Wrong diagnosis. To explain better:

goledger facilitates a similar process by:

$ goledger -f journal-2014.ldg -fy 2014 equity > journal-2015.ldg

equity command does the job here, which creates a single transaction with necessary posting to accounts that have non-zero balance. Additionally it filters out accounts that are exclusively used for income and expense.

Now, have said this sometimes we want a consolidated report, with can be further utilized with differeng grouping-options, accross financial years.

For this, we propose the -stitch command line switch. If this is used, all transactions whose payee match "Opening Balance" will be skipped:

$ goledger -f 2015.ldg,2016.ldg balance