I am trying to use this entry that beangulp exports:
2023-12-22 * "Buy XYZ" "Buy 86.546 XYZ with 6987.69 USD @ 80.74 USD/XYZ"
Assets:Account:USD -6987.69 USD
Assets:Account:XYZ 86.546 XYZ @ 80.74 USD
 But when I run bean-check, I get: Transaction does not balance: (0.03404 
USD)

XYZ is tracked to 3 decimal places and USD is tracked to 2 decimals. 
The way the institution does the calculation is to divide the USD by the 
price to get the amount of XYZ, then rounds to 3 decimal places.

6987.69/80.74 = 86.5455783998 -> 86.546
However, it looks like beancount tries to multiply 86.546*80.74=6987.72404, 
which gives the 0.03404 error.

I would rather not have a
6987.69 USD @ 1/80.74 XYZ entry, as because I am using beangulp, I think it 
would convert it to an ugly decimal after exporting

Is there a way to let beancount allow this entry without destroying the 
tolerances for all the transactions?

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/ea826ebd-84de-4bd9-8221-33daf2ee2130n%40googlegroups.com.

Reply via email to