When paying in the configured foreign currency, there are 8 centavos added to change due.
$15 due or L. 360
L. 400 tendered
Change due L. 40.08 not L. 40.00
Receipt for above transaction
Even at 10x the amount tried in the first image, there are still 8 centavos added to change due.
L. 500 tendered
L. 139.92 change not L. 140.00 an 8 centavos deduction on this transaction
Receipt for above transaction
Where should I start looking to fix this?
I played with
Currency Decimals and extended Database and Rate up to 10 decimal places with no change in the above behaviour.
The tax calculation, maybe it’s in there somewhere?
Truth be told, I don’t know. I would expect the difference to chance depending on the total, but I keep seeing +/- 0.08
I tested on a fresh install, no tax types setup - same issue:
If I multiply the change (1.67) by the exchange rate (24.0000000) I get 40.08. I’m guessing that it must have something to do with rounding? I assume that the 1.67 is actually 1.6666666666666… but rounded up to 1.67 (1.6666666666666…* 24 = 40)
What happens if you set Rounding to 0.0000000000000 or leave it blank?
FFS - rounding
That’s why I have the round up/down buttons to fudge things here and there - doesn’t work with change, though.
I swear, I’ve gone through that huge thread about rounding and foreign currencies many times over the last 18 months and it still makes my head spin. One day I’ll understand it all.
ANyhoo, rounding set to 0 or 0.00 doesn’t change the behavior. It can’t be blank as the column doesn’t accept NULL. Also, the column is set to two decimal points so 0.0000000000000 truncates to 0.00.
Thanks for your replies. I’ll approach with a fresh(ish) mind in the morning.
Well I’m back.
I went and updated product pricing to local currency. It’ll be easier for rounding that way.
Sooo, now it will not calculate change in either currency when paying in USD (now the foreign currency).
Any thoughts are much appreciated.
I figured I’d reuse this thread.
fresh DB - following the tutorial here: https://kb.sambapos.com/en/2-4-3-adding-different-currencies-and-foreign-exchange-working-system/
Here are the currencies configured:
Here are the payment types:
Here are the change payment types:
No payment/change works in dollars:
When paying in local currency, the change is properly calculated in dollars and the relevant account transactions are visible.
As I usually ask, what am I doing wrong? Thanx!
Buen dia. En la configuracion del programa en el menu principal se define los decimales. En este caso serian 2, 4 y 4. Si mal no recuerdo hay un icono de lapiz das click y defines en ese orden. Hoy estoy fuera pero te enviare la pantalla luego. Tuve el mismo problema y se resolvió.
Gracias por la respuesta. Para ahorita los empleadores necisitaria cambiar y entrar el efectivo manualmente porque es mas trabajo a selectar qual efectivo a pagar en retuorno cuando estamos llena de gentes. Buen dia!
I know this is old, but I found a solution so I wanted to post for anyone who may encounter the same issue.
It was indeed an issue with rounding the foreign currency. 1 USD is 24 Honduran Lempira. Instead of entering ‘24’ as the exchange rate, I played around with the inverse until the remainder was beyond the second decimal point. No more remainder.