Last active
October 9, 2019 20:28
-
-
Save adept/f8daa41f60b24a3f31074e7c9512786c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ hledger register -f transfer.journal cash | |
2019/01/01 Bought 1 share @ .. bank:cash £-100 £-100 | |
2019/02/01 Bought 1 share @ .. bank:cash £-300 £-400 | |
2019/03/01 Bought 1 share @ .. bank:cash £-300 £-700 | |
2019/03/01 Sold my shares @ .. bank:cash £600 £-100 | |
2019/03/01 Bough my shares b.. bank:cash £-600 £-700 | |
$ hledger register -f transfer.journal shares | |
2019/01/01 Bought 1 share @ .. assets:shares 1 1 | |
2019/02/01 Bought 1 share @ .. assets:shares 1 2 | |
2019/03/01 Bought 1 share @ .. assets:shares 1 3 | |
2019/03/01 Sold my shares @ .. assets:shares -3 0 | |
2019/03/01 Bough my shares b.. assets:shares 3 3 | |
$ hledger balance -f transfer.journal | |
3 assets:shares | |
£-700 bank:cash | |
-------------------- | |
3 | |
£-700 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ hledger register -f transfer.journal -O csv | |
"txnidx","date","code","description","account","amount","total" | |
"1","2019/01/01","","Bought 1 share @ £100","bank:cash","£-100","£-100" | |
"1","2019/01/01","","Bought 1 share @ £100","assets:shares","1","1, £-100" | |
"2","2019/02/01","","Bought 1 share @ £200","bank:cash","£-300","1, £-400" | |
"2","2019/02/01","","Bought 1 share @ £200","assets:shares","1","2, £-400" | |
"3","2019/03/01","","Bought 1 share @ £300","bank:cash","£-300","2, £-700" | |
"3","2019/03/01","","Bought 1 share @ £300","assets:shares","1","3, £-700" | |
"4","2019/03/01","","Sold my shares @ £200","bank:cash","£600","3, £-100" | |
"4","2019/03/01","","Sold my shares @ £200","assets:shares","-3","£-100" | |
"5","2019/03/01","","Bough my shares back @ £200","bank:cash","£-600","£-700" | |
"5","2019/03/01","","Bough my shares back @ £200","assets:shares","3","3, £-700" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2019-01-01 Bought 1 share @ £100 | |
bank:cash -£100 | |
assets:shares 1 @@ £100 | |
2019-02-01 Bought 1 share @ £200 | |
bank:cash -£300 | |
assets:shares 1 @@ £300 | |
2019-03-01 Bought 1 share @ £300 | |
bank:cash -£300 | |
assets:shares 1 @@ £300 | |
;; Transfer through sale at £200 per share | |
2019-03-01 Sold my shares @ £200 | |
bank:cash £600 | |
assets:shares -3 @ £200 | |
2019-03-01 Bough my shares back @ £200 | |
bank:cash -£600 | |
assets:shares 3 @ £200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment