Hi,

I've been using ledger for a couple weeks now and I'm loving it.  Thank
you for such excellent software.

I've found the periodic transactions for budgeting aren't fine-grained
enough for my needs, so I've been experimenting with creating virtual
transactions to describe my planned expenditures.  One of those
expenditures is an upcoming trip to Mexico; here is a simplified version
of that transaction:

    2013/09/03  Budget for travel to Mexico
        [Assets:Budgeted]
        [Budget:Travel]   M$2500.00  ; buses, tourist card
        [Budget:Fees]        $50.00  ; atm/exchange

As you can see, the transaction tries to virtually withdrawn two
different currencies from the same account using an elided amount. That
works, but only one of the withdrawals shows up as virtual. Here's the
command and output (note the final line):

    $ ledger --init-file /dev/null -f test.ledger reg
    13-Sep-03 Budget for travel t.. [Assets:Budgeted]           $-50.00      
$-50.00
                                    [Budget:Travel]           M$2500.00      
$-50.00
                                                           M$2500.00
                                    [Budget:Fees]                $50.00    
M$2500.00
                                    Assets:Budgeted          M$-2500.00         
   0

The dollar amount is withdrawn from the source account as a virtual
transaction, but the peso amount is withdrawn as a non-virtual automatic
transaction. This goofs up my ledger reports as I can't use --real to
see my actual balances:

    $ ledger --init-file /dev/null -f test.ledger reg --real
    13-Sep-03 Budget for travel t.. Assets:Budgeted          M$-2500.00   
M$-2500.00

To see the actual balances, I have to also disable automatic transactions:

    $ ledger --init-file /dev/null -f test.ledger reg --real --actual
    # (null output)

All of the above commands were run using master commit 0ec4291013 from
21 August 2013.  I also had the same problem with the version of Ledger
in Debian Experimental (labeled 3.0.0~20130313+b608ed2-1).  Ledger
passed all tests in its test suite here.

I have two questions about this behavior:

1. Is it intentional or is it a bug? If it is intentional, could you
   please briefly explain the logic or point me at a doc (or source code
   file) which can help me figure it out?

2. Why doesn't ledger complain about a non-balancing transaction? The
   "hard" bracketed virtual line items in the register output above
   don't balance against each other, nor does the automatic non-virtual
   line item balance against itself. Are there other situations where I
   have to worry about unbalanced automatic and hard-bracketed
   transactions?

I want to repeat that I'm extraordinarily impressed by ledger.  My only
wish is that I had discovered it earlier.[1]

Thank you for your assistance,

-Dave

[1] I do marketing for a living and we pay very close attention to how
    people find products. For those who care, I heard about ledger from
    the Software Freedom Conservancy's request for donations for an
    improved accounting system, and I heard about that request through
    Joey Hess's request for donations for Git Annex. I'd been using
    GnuCash for over a decade and ledger 2's native support for GnuCash
    files made trying it too easy to resist, especially after I saw
    Bradley Kuhn's posts to this list.  (I remember attending a speech by
    Kuhn years ago where he mentioned that he helped setup the polling
    system which choose GnuCash's current name---although he also had
    some wry comments about GnuCash as a serious name.  I figure the man
    is a bit of an accounting geek, the same as me.)
-- 
David A. Harding

-- 

--- 
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/groups/opt_out.

Reply via email to