Given a tax of 9.75%
Sale of 1.00 shows total of 1.10 (correct)
Sale of 2.00 shows 2.19 (incorrect, computed tax is 0.195, should round up to 2.20)
Sale of 3.00 shows 3.29 (correct)
Sale of 4.00 shows 4.39 (correct)
Sale of 5.00 shows 5.49 (correct)
Sale of 6.00 shows 6.59 (correct, even though computed tax is 0.585, it rounds up to 0.59)
And so forth.
Our laws state that any tax computation >= 0.xx5 must round up to the next 0.xx value. That is, the PHP_ROUND_HALF_UP behavior.
How can I get SMA to observe this convention/requirement?
We actually do quite a few sales in the 2.00 range, so this error results in several manual corrections daily.
- MSAnswered
Thank you for reporting this. Frontend code is not rounding it. I will fix in coming update.
- SSAnswered
Yes, but it’s more than just a front end display problem.
When entering via Add Sale it will say total due is 2.19, but if submitted and then viewed in List Sales it will show as 2.20 due. Add Payment will also say the due amount is 2.20. That’s just a display issue on the input front end then.
When entering via POS it will say total due is 2.19, but when going to enter the payment it will still say the amount due is 2.19. It will then insist on a 2.19 payment, and entering 2.20 will result in showing 0.01 change due.
So, in order to have things balance, the POS sales requires a 2.19 payment, but a manually entered sale requires 2.20. Most of our sales come in via POS.
I hope you have that update soon as the owner is beating me up over the incorrect amounts. If things don’t balance exactly with zero errors, he is not at all happy.
Thanks
- MSAnswered
Yes, once rounded at frontend it will calculate the same as backend so there won’t be any and disturbance. Now frontend calculating 2.19 but backend calculate 2.20 It will be fixed soon. Thank you
- SSAnswered
I just loaded the most recent update, which says this is corrected.
It does not appear to be corrected. See the attached image.
Attachments - MSAnswered
How are you testing? My test if attached. Are you testing it on live demo?
- SSAnswered
As I stated, I loaded the most recent update (prior to today’s as I see there’s another update now.) The test was made using the 3.4.34 version.
Not sure why I’d test on a live demo instead of an actual install. I have to run with the code available to me, not on the demo.
- MSAnswered
You need to test on live server so that we know is it bug or your installation issue. If bug we check locally otherwise you need to update. Today’s update isn’t doing anything related to calculation.
- SSAnswered
That’s not possible since on the live demo I cannot access settings and therefore cannot set a tax rate of 9.75%. I can’t test the issue without setting the affected variables.
I have downloaded the latest 3.4.35 version from Code Canyon and updated my installation. I have attached captures of what happens when entering a $2 purchase. First in the sequence is entering the order, which shows a total of $2.20 due, but a payment due of $2.19, and then entering the recommended payment of $2.19, and the resulting receipt and record in the list POS sales. After that I captured what happens entering a $2 order and changing the payment to $2.20 instead of the system-generated $2.19. ALL VERY STRANGE.
While you review this, I am creating a completely new installation, new config, new database, etc, so I can confirm whether the issue is present in a fresh install as well, or if it is perhaps an artifact of upgrade vs. new install.
As this system permits only 5 attachments, additional captures will following in next post.
- SSAnswered
Additional captures
- SSAnswered
The error is present in a 100% clean install from the 3.4.35 source.
I will add that a $1.99 purchase computes correctly with $0.19 tax and $2.18 total, as does $2.01 with $0.20 tax and $2.21 total.
The error is only present when the rounded tax is $0.195. In some fields, it is rounded correctly to $0.20 and in others incorrectly to $0.19.
I say only when tax is $0.195; however, I have not tested other cases where the tax might include a 0.005 component.
- Login to Reply