713-b.test 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. 2014-01-01 * Opening balances
  2. Assets:Cash 100.00 GBP
  3. Equity:Opening balances
  4. 2014-02-01 * Buy 1 AAA for 10 GBP
  5. Assets:Investments 1 AAA @ 10.00 GBP
  6. Assets:Cash -10.00 GBP
  7. 2014-03-01 * Buy 1 AAA for 20 GBP
  8. Assets:Investments 1 AAA @ 20.00 GBP
  9. Assets:Cash -20.00 GBP
  10. ; Let's say the second purchase attracts an equalisation of 2.00 GBP.
  11. ; This means that the purchase price from now on should be 18.00
  12. ; rather than 20.00 GBP. So we add a new share with that price and
  13. ; the original date, and remove the existing share at the old price; the
  14. ; difference of 2.00 GBP is the equalisation received, which is paid to
  15. ; the account.
  16. 2014-04-16 * Dividend (Equalisation) from AAA
  17. Assets:Investments 1 AAA {18.00 GBP} [2014-03-01] @@ 18.00 GBP
  18. Assets:Investments -1 AAA {20.00 GBP} [2014-03-01] @@ 20.00 GBP
  19. Assets:Broker 2.00 GBP
  20. test bal -B Assets:Investment -p "until 2014-02-20"
  21. 10.00 GBP Assets:Investments
  22. end test
  23. test bal -B Assets:Investment -p "until 2014-03-20"
  24. 30.00 GBP Assets:Investments
  25. end test
  26. test bal -B Assets:Investment -p "until 2014-04-20"
  27. 28.00 GBP Assets:Investments
  28. end test
  29. test bal Assets:Investment -p "until 2014-02-20"
  30. 1 AAA Assets:Investments
  31. end test
  32. test bal Assets:Investment -p "until 2014-03-20"
  33. 2 AAA Assets:Investments
  34. end test
  35. test bal Assets:Investment -p "until 2014-04-20"
  36. 2 AAA Assets:Investments
  37. end test