* ledger test *** income and expenses :PROPERTIES: :tangle: account.ledger :END: The property for this heading specifies where the tangled output of the ledger code blocks in what follows should end up. ***** income The first set of entries relates to income, either monthly pay or interest, all typically going into my bank account. #+begin_src ledger 2010/01/01 * Starting balance assets:bank:savings £1300.00 income:starting balances 2010/07/22 * Got paid assets:bank:chequing £1000.00 income:salary 2010/07/31 * Interest on bank savings assets:bank:savings £3.53 income:interest 2010/07/31 * Transfer savings assets:bank:savings £250.00 assets:bank:chequing 2010/08/01 got paid again assets:bank:chequing £1000.00 income:salary #+end_src ***** expenses The following entries relate to personal expenses (rent and food). #+begin_src ledger 2010/07/23 Rent expenses:rent £500.00 assets:bank:chequing 2010/07/24 Food expenses:food £150.00 assets:bank:chequing #+end_src *** Financial summary Assuming you have tangled the ledger entries (=C-c C-v t=), you can now perform all kinds of calculations ***** overall summary The overall balance of your account and expenditure with a breakdown according to category: #+begin_src ledger :cmdline -s bal :results value !include /home/ucecesf/s/test/account.ledger #+end_src #+results: #+begin_example £2653.53 assets:bank £1100.00 chequing £1553.53 savings £650.00 expenses £150.00 food £500.00 rent £-3303.53 income £-3.53 interest £-2000.00 salary £-1300.00 starting balances #+end_example ***** monthly register You can also generate a monthly register by executing the following: #+begin_src ledger :cmdline -M -w reg !include /home/ucecesf/s/test/account.ledger #+end_src #+results: #+begin_example 2010/01/01 - 2010/01/31 assets:bank:savings £1300.00 £1300.00 income:starting balances £-1300.00 0 2010/07/01 - 2010/07/31 assets:bank:chequing £100.00 £100.00 assets:bank:savings £253.53 £353.53 expenses:food £150.00 £503.53 expenses:rent £500.00 £1003.53 income:interest £-3.53 £1000.00 income:salary £-1000.00 0 2010/08/01 - 2010/08/01 assets:bank:chequing £1000.00 £1000.00 income:salary £-1000.00 0 #+end_example