Previous: Finances, Up: Finances


7.3.1 Ledger

planner-ledger.el provides integration between planner and John Wiegley's ledger accounting program, which can be found at http://newartisans.com/johnw/ledger.tar.gz.

To use planner-ledger to insert a ledger balance overview and a list of pending transactions into planner day pages, make sure that your day page includes sections that match planner-ledger-balance-regexp and planner-ledger-pending-regexp. Example:

     * Tasks
     
     * Ledger
     
     ** Pending transactions
     
     * Notes
     

You can manually update ledger sections with the planner-ledger-insert-maybe command.

You can also automatically update ledger sections with the following hook:

     (add-hook 'planner-goto-hook 'planner-ledger-insert-maybe)

You can create ledger entries from specially-formatted tasks using planner-ledger-add-entry-from-task. Tasks should be of the form ‘payment due: payee, amount [comment]’. Example:

     #A1 _ payment due: foobar, $1000.00 some comment here
     #A2 _ payment due: baz, 1000.00

Options

— User Option: planner-ledger-balance-accounts

List of accounts to be included or excluded from the balance overview. ‘+’ includes all matching accounts, and ‘-’ excludes matching accounts. See the documentation for ledger-run-ledger for more details.

— User Option: planner-ledger-balance-regexp

Regular expression matching section for ledger balance. Do not store other data in this section, as it will be overwritten.

— User Option: planner-ledger-pending-regexp

Regular expression matching section for ledger balance. Do not store other data in this section, as it will be overwritten.

— User Option: planner-ledger-payment-task-regexp

Regular expression matching special ledger tasks.

Functions

— Function: planner-ledger-insert-maybe

Update any ledger sections on the current page.

— Function: planner-ledger-add-entry-from-task

Create a ledger entry based on the task at point. Task should match planner-ledger-payment-task-regexp.