hoostus / beancount-asset-transfer-plugin Goto Github PK
View Code? Open in Web Editor NEWPlugin for beancount, the plaintext accounting software.
License: Other
Plugin for beancount, the plaintext accounting software.
License: Other
Hello,
There's a bug where you can't sell an asset after transferring if you didn't have enough of that asset before the transfer.
option "operating_currency" "USD"
option "booking_method" "LIFO"
option "insert_pythonpath" "TRUE"
plugin "asset_transfer.transfer"
2021-01-01 open Assets:Bank:USD USD
2021-01-01 open Assets:Brokerage:VTI VTI
2021-01-01 open Assets:Brokerage:VWO VWO
2021-01-01 open Assets:New-Brokerage:VWO VWO
2021-01-01 open Assets:New-Brokerage:VTI VTI
2021-01-02 * "Buy 1 VTI"
Assets:Brokerage:VTI 1 VTI {100.00 USD}
Assets:Bank:USD
2021-01-15 * "Buy 1 VWO"
Assets:Brokerage:VWO 1 VWO {1.00 USD}
Assets:Bank:USD
2021-02-02 * "Buy 2 VTI"
Assets:Brokerage:VTI 2 VTI {200.00 USD}
Assets:Bank:USD
2021-02-15 * "Buy 2 VWO"
Assets:Brokerage:VWO 2 VWO {2.00 USD}
Assets:Bank:USD
2021-03-03 * "Buy 3 VTI"
Assets:Brokerage:VTI 3 VTI {300.00 USD}
Assets:Bank:USD
2021-03-15 * "Buy 3 VWO"
Assets:Brokerage:VWO 3 VWO {3.00 USD}
Assets:Bank:USD
2021-03-17 * "Buy 2 VTI"
Assets:New-Brokerage:VTI 1.5 VTI {150.00 USD}
Assets:Bank:USD
2021-04-03 custom "transfer" 3.2 VTI Assets:Brokerage:VTI Assets:New-Brokerage:VTI
2021-04-04 * "Sell 3 VTI"
Assets:New-Brokerage:VTI -2.9 VTI {} @ 100.00 USD
Assets:Bank:USD 435.000 USD
The plugin correctly sets the balances but it doesn't work regardless
------------ Balances before transaction
Assets:Brokerage:VTI 1 VTI {100.00 USD, 2021-01-02}
Assets:Brokerage:VTI 2 VTI {200.00 USD, 2021-02-02}
Assets:Brokerage:VTI 3 VTI {300.00 USD, 2021-03-03}
Assets:New-Brokerage:VTI 1.5 VTI {150.00 USD, 2021-03-17}
------------ Transaction
2021-04-03 T "Automatically generated by asset transfer plugin" #in-kind-transfer
Assets:Brokerage:VTI -3.0 VTI {300.00 USD, 2021-03-03} ; -900.00 USD
Assets:New-Brokerage:VTI 3.0 VTI {300.00 USD, 2021-03-03} ; 900.00 USD
Assets:Brokerage:VTI -0.2 VTI {200.00 USD, 2021-02-02} ; -40.000 USD
Assets:New-Brokerage:VTI 0.2 VTI {200.00 USD, 2021-02-02} ; 40.000 USD
Tolerances: VTI=0.05
------------ Balances after transaction
Assets:Brokerage:VTI 1 VTI {100.00 USD, 2021-01-02}
* Assets:Brokerage:VTI 1.8 VTI {200.00 USD, 2021-02-02}
Assets:New-Brokerage:VTI 1.5 VTI {150.00 USD, 2021-03-17}
* Assets:New-Brokerage:VTI 3 VTI {300.00 USD, 2021-03-03}
* Assets:New-Brokerage:VTI 0.2 VTI {200.00 USD, 2021-02-02}
error:
Not enough lots to reduce "-2.9 VTI {}": 1.5 VTI {150.00 USD, 2021-03-17}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.