I seem to be having trouble with automatic transactions involving elided 
amounts.  Possibly the problem is my understanding how this is supposed to work 
of course.

I see in the manual that "One thing you cannot do ... is elide amounts in an 
automated transaction" -- but the Huququ'llah example does use elided amounts 
in the explicitly written transactions that the automated transactions match 
on.  So it seems this restriction is intended to apply only to the automatic 
transactions themselves, not to the explicitly written transactions that 
trigger the automatic ones?

Here's a file test.ledger to demonstrate:

= expr ( commodity == 'VIFSX' )
    (Allocation:Equities:Domestic)             1.000

2015-01-01 * Buy VIFSX
    Assets:Broker                                100 VIFSX
    Assets:Cash                                $-1000

2015-01-02 * Adjustment
    Assets:Broker                                10 VIFSX
    Equity:Adjustments


Problems:

1. This prints 110 VIFSX as I expected:

    ledger -f test.ledger b Assets:Broker

However this prints 100 VIFSX:

    ledger -f test.ledger b Allocation

Why don't they both print 110 VIFSX?


2. If I change that file to remove the explicit Assets:Cash dollar amount 
$-1000 (so the elided value gets filled in by ledger as a VIFSX commodity 
amount), this prints nothing:

    ledger -f test.ledger b Allocation

Why doesn't it print 110 VIFSX?  It seems again to be related to the elided 
amount -- if I add "-10 VIFSX" explicitly to the second transaction, it does 
print 110 VIFSX.


I assume the answer in mechanical terms is along the lines of "elided amounts 
aren't compatible with automated transactions" -- but I don't understand why 
this restriction applies to explicitly written transactions as opposed to the 
automated transactions themselves, why this passes without any warning, and as 
I say the Huququ'llah example in the manual doesn't seem to follow this 
restriction?


Thanks!

-- 

--- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/7c8c0959-92da-42ef-87f9-92e02ada4c91%40www.fastmail.com.

Reply via email to