Hi there,

I've been trying to work through a reporting scenario with tags and haven't 
found a solution. Sometimes a customer will pay multiple invoices at one 
time and I'd like to be able to report on invoices individually or 
collectively:
$ cat foo.dat 
2017/01/01 Opening Balance
    Assets:Checking:FOO                      $250.00
    Equity:Opening Balances

2017/01/31=2017/03/07 Customer invoice 
    ; INV: 0001
    Assets:Accounts Receivable:Customer            $1000.00
    Income:Customer

2017/02/28=2017/03/07 Customer invoice 
    ; INV: 0002
    Assets:Accounts Receivable:Customer            $1200.00
    Income:Customer

2017/03/07 (1000) Check from Customer
    Assets:Checking:FOO                            $2200.00
    ; INV: 0001
    Assets:Accounts Receivable:Customer           $-1000.00
    ; INV: 0002
    Assets:Accounts Receivable:Customer           $-1200.00
 
This balances correctly:
$ ledger -f foo.dat bal
            $2450.00  Assets:Checking:FOO
            $-250.00  Equity:Opening Balances
           $-2200.00  Income:Customer
--------------------
                   0

The output for individual invoices gets a little confusing:
$ ledger -f foo.dat bal '--account=tag("INV")'
            $2200.00  0001
            $3200.00    Assets
            $1000.00      Accounts Receivable:Customer
            $2200.00      Checking:FOO
           $-1000.00    Income:Customer
           $-1000.00  0002
             $200.00    Assets:Accounts Receivable:Customer
           $-1200.00    Income:Customer
            $-950.00  Assets
           $-1200.00    Accounts Receivable:Customer
             $250.00    Checking:FOO
            $-250.00  Equity:Opening Balances
--------------------
                   0
Is there a way to accomplish this in a single transaction and have the 
respective amounts applied to the invoices? Appreciate the help.

Justin

-- 

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