You're setting IDR precision to zero digits, so it computes 14706 IDR/USD
Multiply it back, you get some very small error
Is Equity:Rounding to absorb this (maybe develop a plugin that asserts
their numbers are always a very small value since it's scary to absorb any
difference - I should have implemented that).




bean-doctor context 20251019.beancount 9
** Transaction Id --------------------------------

Hash:ece097107bd100ce28ec61a875ad4726
Location: /home/blais/q/beanbugs/user/tonyxiao/20251019.beancount:8


** Balances before transaction --------------------------------

  Assets:Cash

  Expenses:Other-Expense


** Unbooked Transaction --------------------------------

2022-08-25 * "Re install gate"
  Assets:Cash             -3000000 IDR              ;
 -3000000 IDR
  Expenses:Other-Expense       204 USD @ 14706 IDR  ;
2999999.999999999999999999999 IDR


** Transaction --------------------------------

2022-08-25 * "Re install gate"
  Assets:Cash             -3000000 IDR              ;
 -3000000 IDR
  Expenses:Other-Expense       204 USD @ 14706 IDR  ;
2999999.999999999999999999999 IDR


** Residual and Tolerances --------------------------------

Residual: (-0.000000000000000000001 IDR)
Tolerances: IDR=0, USD=0.02


** Balances after transaction --------------------------------

* Assets:Cash                                                  -3000000 IDR

* Expenses:Other-Expense                                            204 USD


On Sun, Oct 19, 2025 at 3:17 PM Tony Xiao <[email protected]> wrote:

> I feel like the following should be an extremely simple scenario, but for
> whatever reason, my transaction is not balancing. This is my bean file
>
>
> option "inferred_tolerance_default" "IDR:0"
> option "inferred_tolerance_default" "USD:0.02"
> option "inferred_tolerance_default" "*:0.001"
>
> plugin "beancount.plugins.auto_accounts"
>
> 2022-08-25 * "" "Re install gate"
> Assets:Cash -3000000 IDR
> Expenses:Other-Expense 204 USD @@ 3000000 IDR
>
> This is the error I get
> Transaction does not balance: (-0.000000000000000000001 IDR)Beancount(1)
>
> I must be missing something extremely obvious about beancount rounding?
>
> Tony
>
> ---
> Tony
>
>
> Sent via Superhuman <https://sprh.mn/[email protected]>
>
> --
> 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 [email protected].
> To view this discussion visit
> https://groups.google.com/d/msgid/beancount/mgy35mu1.3e56da89-794d-4145-afa3-65b661e9c5b5%40we.are.superhuman.com
> <https://groups.google.com/d/msgid/beancount/mgy35mu1.3e56da89-794d-4145-afa3-65b661e9c5b5%40we.are.superhuman.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhNEEs7uDmC1Vgk8K-5kka590Hn-zLCnAB9eqWtub4owEA%40mail.gmail.com.

Reply via email to