This works at the cost of some complexity, external to Ledger I have
to keep track of ERids.  For actual expense reports that's probably
not much of a price to pay since the ER will have an ID and the
reimbursement notice will probably reference that ID for you.

Seems entry is a little problematic.  Typos could mean you have
multiple categories like Airefare and Airfare, or maybe a CATEGORY:
Airfare and a CATGORY: Airfare.  You could probably have your entry
tool (Emacs?) help there, though.  Does ledger catch this for you, say
by making you declare your meta variables up front?

If you assume every ER is associated with at most one project, is
there anything to be gained by using an ER: meta-value vs. just a sub
account or is it just six of one, half-dozen of another?  As in:
-----------------------------------
2011/11/01 Airplane ride
    Source:VISA                   -$1000.00
    Dest:Project:ER0001
        ; CATEGORY: Airfare
        ; PROJECT: Test

2011/11/02 Hotel overnight
    Source:VISA                    -$200.00
    Dest:Project:ER0001
        ; CATEGORY: Lodging
        ; PROJECT: Test
--------------------------

Or heck, just going all out with sub accounts:

---------------
2011/11/01 Airplane ride
    Source:VISA                   -$1000.00
    Dest:Project:Test:ER0001:Airfare

2011/11/02 Hotel overnight
    Source:VISA                    -$200.00
    Dest:Project:Test:ER0001:Lodging
---------------

Would you be able to do the same queries as you listed, albeit with
some regex work?

Thanks,
Rick

On Nov 10, 11:29 am, Russell Adams <[email protected]> wrote:
> On Thu, Nov 10, 2011 at 04:44:37AM -0800, Rick F wrote:
> > How does one track in ledger *which* expenses go with which
> > reimbursements?  I've searched the archives and read the manual, but
> > can't find the answer.
>
> > Let's say I have a reimbursement account with a bunch of expenses in
> > it and a bunch of reimbursements.  If that account has a balance, I'd
> > like to know which expenses make up that balance.  In other words,
> > which expenses have I not been paid for?  Maybe an expense report got
> > lost and I need to track it down.  Maybe I just plain forgot to submit
> > a particular expense.
>
> > This is the exact same problem as tracking invoices.  Say I've sent a
> > customer lots of invoices and I've received lots of payments, but the
> > customer still owes a balance.  I need to be able to contact the
> > customer and say "Hey, you haven't paid me for invoices x and y yet."
>
> I do this with my expense reports via metadata.
>
> The issue is we need something that spans transactions in order to
> link them together, I use an expense report number.
>
> I also add additional metadata for later reporting. Note that the
> metadata tags are indented under the Dest account, not under the main
> payee line. This means ONLY the Dest portion of the txn has metadata
> assigned. None of the Source accounts have metadata.
>
> You can specify metadata for the entire txn under the payee line, or
> specifics under an individual posting. It is indentation specific.
>
> So often my transactions look like this.
>
> --duh.dat-----------------------------------------------------------------
> 2011/11/01 Airplane ride
>     Source:VISA                   -$1000.00
>     Dest:Project
>         ; ER: ER0001
>         ; CATEGORY: Airfare
>         ; PROJECT: Test
>
> 2011/11/02 Hotel overnight
>     Source:VISA                    -$200.00
>     Dest:Project
>         ; ER: ER0001
>         ; CATEGORY: Lodging
>         ; PROJECT: Test
>
> 2011/11/03 Airplane ride
>     Source:VISA                   -$1500.00
>     Dest:Project
>         ; ER: ER0002
>         ; CATEGORY: Airfare
>         ; PROJECT: Bob
>
> 2011/11/04 Hotel overnight
>     Source:VISA                    -$250.00
>     Dest:Project
>         ; ER: ER0002
>         ; CATEGORY: Lodging
>         ; PROJECT: Bob
>
> 2011/11/05 Reimbursement
>     Source:VISA                    $1200.00
>     Dest:Project
>         ; ER: ER0001
> ----------------------------------------------------------------------
>
> Then I can start asking intelligent questions.
>
> How much is my balance?
>
> $ ./ledger -f duh.dat bal
>             $1750.00  Dest:Project
>            $-1750.00  Source:VISA
> --------------------
>                    0
>
> How much is outstanding (not yet reimbursed) on all my ER's?
>
> $ ./ledger -f duh.dat -sEV bal --pivot ER
>             $1750.00  ER
>                    0    ER0001:Dest:Project
>             $1750.00    ER0002:Dest:Project
>            $-1750.00  Source:VISA
> --------------------
>                    0
>
> For project cost accounting, how much did I spend on project Bob?
>
> $ ./ledger -f duh.dat -sEV bal %PROJECT=Bob
>             $1750.00  Dest:Project
>
> How much have I spent on different categories?
>
> $ ./ledger -f duh.dat -sEV bal --pivot CATEGORY
>             $2950.00  CATEGORY
>             $2500.00    Airfare:Dest:Project
>              $450.00    Lodging:Dest:Project
>            $-1200.00  Dest:Project
>            $-1750.00  Source:VISA
> --------------------
>                    0
>
> I hope this helps!
>
> ------------------------------------------------------------------
> Russell Adams                            [email protected]
>
> PGP Key ID:     0x1160DCB3          http://www.adamsinfoserv.com/
>
> Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

Reply via email to