Transaction does not Balance when it should

64 views
Skip to first unread message

Patrick Ruckstuhl

unread,
Jan 26, 2018, 4:22:04 PM1/26/18
to bean...@googlegroups.com

Hi,

I have the following transaction:


2014-01-13 * "Buy"
  Assets:Foo:BAR   45.8 BAR {{6739 CHF}}
  Assets:Foo:CHF         -6739 CHF


and I'm getting the error Transaction does not balance: (1E-24 CHF)


Is there any way (except of adding a "rounding error" account) to solve this?

It seems that what's happening is that the per share price is calculated and then there's rounding errors happening.


Thanks and Regards,
Patrick

yegle

unread,
Jan 26, 2018, 4:36:13 PM1/26/18
to Beancount
I think if you use integer for the amount (6739 CHF), the precision will be unlimited. Try use a float like 6739.00 CHF

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/4a06ef34-eb3e-d28f-d2e4-d6596513e539%40ch.tario.org.
For more options, visit https://groups.google.com/d/optout.



--

Patrick Ruckstuhl

unread,
Jan 26, 2018, 4:38:59 PM1/26/18
to bean...@googlegroups.com
Great, that solves it.

Thank you very much
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.

To post to this group, send email to bean...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages