I'm getting a failure to balance validation error, and I can't quite figure out why. Here is (a sanitized version of) what I'm getting from beandoctor:
** Unbooked Transaction --------------------------------
2020-01-01 * "Trade 412.47 BAR for 200 FOO"
Assets:FOO 200 FOO {19.62 USD}
Assets:BAR -412.47 BAR {} @ 10.41 USD
Income:CapGains
** Transaction --------------------------------
2020-01-01 * "Trade 412.47 BAR for 200 FOO"
Assets:FOO 200 FOO {19.62 USD, 2019-01-01} ; ...
Assets:BAR -412.47 BAR {10.41 USD, 2019-01-01} @ 10.41 USD ; ...
How can this not balance? I have a price for the acquired asset and a cost for the disposed asset and a capgains account to catch the difference.
Note: I am working with my locally tweaked version of the booking code. I don't see how my changes would affect this case, but if y'all agree the above should book, then I'll go debug my diffs more closely.