ledger/test/baseline/feature-fixated-prices.test
John Wiegley 1c7de0f9e4 Added "fixated commodity pricing"
If you put '=' before an annotated commodity's price, it will cause any
future market valuation of that commodity to use that price, and ignore
whatever changes may have happened since in the market price.  This can
be useful if you are tracking gas expenses based on a standard rate
which, although it changes over time, should not adjust the historical
valuation of how much the gas cost at the time it was purchased:

    2009/01/01 Payee
        Expenses:Gas                100 GAL {=$2}
        Liabilities:MasterCard        $-200
2009-03-02 16:39:26 -04:00

18 lines
539 B
Text

reg -V gas
<<<
2009/01/01 Payee
Expenses:Gas 100 GAL {=$2}
Liabilities:MasterCard $-200
2009/01/01 Payee
Expenses:Gas 100 FOO {$2}
Liabilities:MasterCard $-200
P 2009/03/01 12:00:00 GAL $3
P 2009/03/01 12:00:00 FOO $3
>>>1
09-Jan-01 Payee Expenses:Gas $200 $200
09-Jan-01 Payee Expenses:Gas $200 $400
09-Mar-02 Commodities revalued <Revalued> $100 $500
>>>2
=== 0