On Fri, Dec 16, 2016, at 04:23 PM, Lifepillar wrote:
> 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.

I was able to construct this for the levels I needed so far.  It is
ugly, but it works.  It'd be nice to not have to do this.  I am grateful
to you for thinking of it.

> 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.

I have been thinking about this too.  I don't know how to do this with
balanced transactions and I don't like the "three sided entry" I am
making.  That said, I can't think of a great way to accomplish this that
won't break something else.

For example, this:

2016-02-01  Fake txn
     Department 1:Project B:Expense:foo                                 
           $500
;    could also reasonably be Department 1:Project B:foo in many cases
     Equity                                            -$500

Leaves me unable to report on 'Expense:foo' across all budgets.

regards,

bex

-- 

--- 
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