The problem is the ceil() function that roundto() in turn uses.  That is a 
positive biased rounding function, which rounds up towards +∞, instead of 
rounding away from/toward zero.

On Tuesday, 29 December, 2020 at 6:48:50 pm UTC+5:30 Martin Michlmayr wrote:

> * Martin Michlmayr <[email protected]> [2020-12-24 13:43]:
> > = /^Pizza:/
> > Pizza:Taxes (roundto(amount * 0.0775, 2))
> > CreditCard (roundto(-amount * 0.0775, 2))
> > 
> > This does what you want.
>
> > Unfortunately, it leads to an error due to a bug, but if you e.g.
> > change the tax rate from 0.0775 to 0.0774 it works.
>
> I've now reported that issue:
> https://github.com/ledger/ledger/issues/1983
> -- 
> Martin Michlmayr
> https://www.cyrius.com/
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/0f8fb706-fe06-4bb8-bb83-319d88e564ccn%40googlegroups.com.

Reply via email to