ledger/test/baseline/opt-lots-actual.test
John Wiegley 266dee564f Price annotation no longer inject an implied cost
Consider the following transaction:

  2010-06-22 Sample
      Assets:Brokerage       10 AAPL {$30}
      Assets:Brokerage

Previously, this would have been equivalent to:

  2010-06-22 Sample
      Assets:Brokerage       10 AAPL @ $30
      Assets:Brokerage

However, this is not always what the user expects to happen.  When @ is
not being used, the transaction should reflect a mere transfer of
commodities.  This is now how it works, and thus the above transaction
is now equivalent to the following instead:

  2010-06-22 Sample
      Assets:Brokerage       10 AAPL {$30}
      Assets:Brokerage      -10 AAPL {$30}
2010-06-22 20:56:35 -04:00

25 lines
784 B
Text

reg --format '%(justify(scrub(total_expr), 40, 40, true))\n' --lots
<<<
D 1.0000s
2006/03/14 Opening Balances
Assets:Tajer 1339829c @ 1.86590975416s
Assets:Gruulmorg 248720c @ 10.051463493s
Equity:Gold -5000000s
>>>1
1339829c {1.86590975416s} [2006/03/14]
1339829c {1.86590975416s} [2006/03/14]
248720c {10.051463493s} [2006/03/14]
1339829c {1.86590975416s} [2006/03/14]
248720c {10.051463493s} [2006/03/14]
-1388.9h
>>>2
=== 0
reg --format '%(justify(scrub(total_expr), 40, 40, true))\n' --lots-actual
>>>1
1339829c
1588549c
1588549c
-1388.9h
>>>2
=== 0