On 16/12/2016 16:06, Lifepillar wrote:
On 16/12/2016 15:43, Lifepillar wrote:
On 16/12/2016 12:22, Brian Exelbierd wrote:
In the ledger file at the bottom I set up a multi-level budget.  If I
run the commands below, everything works until I restrict to a third
level budget line.

your example might be fixed as follows:

~ Every year
   Budget                                           $10000
   Equity                                          -$10000

~Every year
   Budget                                          -$10000
   Department 1                                      $5000
   Department 2                                      $5000

~Every year
   Department 1                                     -$5000
   Dept 1:Project A                                  $2500
   Dept 1:Project B                                  $2500

2016-02-01  Fake txn
   Expense:foo                                        $500
   (Department 2)                                     $500
   Equity                                            -$500

2016-02-01  Fake txn
   Expense:foo                                        $500
   (Dept 1:Project A)                                 $500
   Equity                                            -$500

2016-02-01  Fake txn
   Expense:foo                                        $500
   (Dept 1:Project B)                                 $500
   Equity                                            -$500

In fact, renaming the top categories in the budget might be better:

~ Every year
   Budget                                           $10000
   Equity                                          -$10000

~Every year
   Budget                                          -$10000
   Department 1 Budget                               $5000
   Department 2 Budget                               $5000

~Every year
   Department 1 Budget                              -$5000
   Department 1:Project A                            $2500
   Department 1:Project B                            $2500

2016-02-01  Fake txn
   Expense:foo                                        $500
   (Department 2)                                     $500
   Equity                                            -$500

2016-02-01  Fake txn
   Expense:foo                                        $500
   (Department 1:Project A)                           $500
   Equity                                            -$500

2016-02-01  Fake txn
   Expense:foo                                        $500
   (Department 1:Project B)                           $500
   Equity                                            -$500

By doing so, you can continue using the exact same syntax for the
transactions and the queries. I don't know how well this generalizes to
more levels, though.

Btw, someone in this list has argued against unbalanced (virtual) transactions. I'd be curious how a budget like the above could be defined without virtual accounts.

Life.


--

--- You received this message because you are subscribed to the Google Groups "Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to