At the end of the year, it's common practice to carry on this year's balance into the new financial year. The idea of this script is to have something like newledger -f lastyear.ledger -o thisyear.ledger, setting up the accounts properly.
If no input file is given, then allow key-value pairs to be given to setup the equity account. Example: newledger -o thisyear.ledger -a Assets:Cash -v '100.00 EUR' -a Liabilities:Loan -v '200.00 EUR'. Example output would be:
2024/01/01 Opening Balance
Assets:Cash 100.00 EUR
Liabilities:Loan 200.00 EUR
Equity
At the end of the year, it's common practice to carry on this year's balance into the new financial year. The idea of this script is to have something like
newledger -f lastyear.ledger -o thisyear.ledger, setting up the accounts properly.If no input file is given, then allow key-value pairs to be given to setup the equity account. Example:
newledger -o thisyear.ledger -a Assets:Cash -v '100.00 EUR' -a Liabilities:Loan -v '200.00 EUR'. Example output would be:2024/01/01 Opening Balance Assets:Cash 100.00 EUR Liabilities:Loan 200.00 EUR Equity