diff options
author | Martin Michlmayr <tbm@cyrius.com> | 2014-07-14 21:09:57 -0400 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2014-07-14 21:09:57 -0400 |
commit | 3f9fc276d3a802ebdd3c694029d56b948fecb841 (patch) | |
tree | 08ffacae3c1d72251d8ba25a446c5ea10140f40f /test/regress/713-b.test | |
parent | 511b17a21f79bbb19fe151402b07e3d0cc3948ec (diff) | |
parent | b88634206402814f63ba8db192e52d3e3bec2b38 (diff) | |
download | fork-ledger-3f9fc276d3a802ebdd3c694029d56b948fecb841.tar.gz fork-ledger-3f9fc276d3a802ebdd3c694029d56b948fecb841.tar.bz2 fork-ledger-3f9fc276d3a802ebdd3c694029d56b948fecb841.zip |
Merge pull request #310 from tbm/712-713-costs
Change the definition of cost
Diffstat (limited to 'test/regress/713-b.test')
-rw-r--r-- | test/regress/713-b.test | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/test/regress/713-b.test b/test/regress/713-b.test new file mode 100644 index 00000000..36685b27 --- /dev/null +++ b/test/regress/713-b.test @@ -0,0 +1,48 @@ + +2014-01-01 * Opening balances + Assets:Cash 100.00 GBP + Equity:Opening balances + +2014-02-01 * Buy 1 AAA for 10 GBP + Assets:Investments 1 AAA @ 10.00 GBP + Assets:Cash -10.00 GBP + +2014-03-01 * Buy 1 AAA for 20 GBP + Assets:Investments 1 AAA @ 20.00 GBP + Assets:Cash -20.00 GBP + +; Let's say the second purchase attracts an equalisation of 2.00 GBP. +; This means that the purchase price from now on should be 18.00 +; rather than 20.00 GBP. So we add a new share with that price and +; the original date, and remove the existing share at the old price; the +; difference of 2.00 GBP is the equalisation received, which is paid to +; the account. +2014-04-16 * Dividend (Equalisation) from AAA + Assets:Investments 1 AAA {18.00 GBP} [2014-03-01] @@ 18.00 GBP + Assets:Investments -1 AAA {20.00 GBP} [2014-03-01] @@ 20.00 GBP + Assets:Broker 2.00 GBP + +test bal -B Assets:Investment -p "until 2014-02-20" + 10.00 GBP Assets:Investments +end test + +test bal -B Assets:Investment -p "until 2014-03-20" + 30.00 GBP Assets:Investments +end test + +test bal -B Assets:Investment -p "until 2014-04-20" + 28.00 GBP Assets:Investments +end test + +test bal Assets:Investment -p "until 2014-02-20" + 1 AAA Assets:Investments +end test + +test bal Assets:Investment -p "until 2014-03-20" + 2 AAA Assets:Investments +end test + +test bal Assets:Investment -p "until 2014-04-20" + 2 AAA Assets:Investments +end test + |