summaryrefslogtreecommitdiff
path: root/test/regress/C0212EAC.test
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-20 18:54:21 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-20 20:29:53 -0400
commit82e43fe125a9b2158976fe5a3afccfa85d7a7574 (patch)
tree48d6b91a60e2a0d1f8f1f9ceb644c51568e35bb7 /test/regress/C0212EAC.test
parent6420390d36ee2f5fe074c48eb030b32fe63d6af5 (diff)
downloadfork-ledger-82e43fe125a9b2158976fe5a3afccfa85d7a7574.tar.gz
fork-ledger-82e43fe125a9b2158976fe5a3afccfa85d7a7574.tar.bz2
fork-ledger-82e43fe125a9b2158976fe5a3afccfa85d7a7574.zip
If fixated price commodities are mixed, show them
For example, if a Ledger file contains transactions with the use of both EUR and EUR {=PRICE}, then regular reports will always show the {=PRICE}, disabling the by-name commodity merging that takes place. In brief, fixated and non-fixated commodities are now non-mergable. If a file contains all of one, or all of the other, they will still be merged, since these separate usages do not conflict the way that fixated and non-fixated together do.
Diffstat (limited to 'test/regress/C0212EAC.test')
-rw-r--r--test/regress/C0212EAC.test33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/regress/C0212EAC.test b/test/regress/C0212EAC.test
new file mode 100644
index 00000000..da178054
--- /dev/null
+++ b/test/regress/C0212EAC.test
@@ -0,0 +1,33 @@
+reg
+<<<
+2007-01-01 Opening balances
+ Assets:Cash 10.00 EUR
+ Equity:Opening balances
+
+2008-01-01 Buy 5.00 GBP
+ Assets:Cash 5.00 GBP @ 1.4 EUR
+ Assets:Checking
+
+2009-01-01 Sell 5.00 GBP for 7.50 EUR that I bought for 7.00 EUR
+ Assets:Cash -5.00 GBP {=1.4 EUR} @ 1.5 EUR
+ Assets:Checking 7.50 EUR
+ Income:Gain
+
+P 2009-02-01 00:00:00 GBP 1.5 EUR
+>>>
+07-Jan-01 Opening balances Assets:Cash 10.00 EUR 10.00 EUR
+ Equit:Opening balances -10.00 EUR 0
+08-Jan-01 Buy 5.00 GBP Assets:Cash 5.00 GBP 5.00 GBP
+ Assets:Checking -7.00 EUR -7.00 EUR
+ 5.00 GBP
+09-Jan-01 Sell 5.00 GBP for 7.. Assets:Cash -5.00 GBP {=1.40 EUR} -7.00 EUR
+ 5.00 GBP
+ -5.00 GBP {=1.40 EUR}
+ Assets:Checking 7.50 EUR 0.50 EUR
+ 5.00 GBP
+ -5.00 GBP {=1.40 EUR}
+ Income:Gain -0.50 EUR 5.00 GBP
+ -5.00 GBP {=1.40 EUR}
+ Equity:Capital Gains 0.50 EUR 0.50 EUR
+ 5.00 GBP
+ -5.00 GBP {=1.40 EUR}