[Bug]: Taxes Summary Report totals don't line up
Bug Description?
The totals of the Taxes Summary Report don't add up to the individual lines in the report. Also, the subtotal plus the tax columns don't add up for each line.
I'm on a slightly modified 3.3.2
Steps to Reproduce?
Run the report
Expected Behavior?
Each line should add up and then each column should add up to the totals at the bottom of the page.
OpensourcePOS Version
opensourcepos 3.3.9
Php version
Php 7.4
What browsers are you seeing the problem on?
Chrome
Server Operating System and version
Ubuntu 20.04 Server
Database Management System and version
mariadb 10.3
Web Server and version
apache2.4.41
System Information Report (optional)
System Information Report
Unmodified copy of OpensourcePOS
- [X] I agree this copy has not been modified
3.3.2 is a long way back. Can you check if this is still the case in latest version?
Just tried on demo.opensourcepos.org and I see the same issue.
Its probably related to decimal.precision and rounding behavior, looking at the numbers, they do not seem to be off by a.lot
I would agree. I'm just not sure what the solution is. We were using this report to give us the total that we're supposed to pay to the government of the taxes we collected. It looks like the tax column is calculated based on the sub-total where maybe it should be a sum of the tax line on each sale.
Have not checked the code but the totals might be calculated direclty in SQL while the rows are coming from a different query. Would need to take a further look to confirm if this is indeed the case.
Demo version is still on 3.3.9 version I'm working on 3.4.
I have been testing this issue on 3.4 version local and online demo and line by line the totals are OK, I only found an issue with the summary when an Item have 2 different taxes, I'll check that.
Maybe in this could be a specific configuration issue, maybe if you could share what configuration are using or a copy of the database I'll can use it to replicate the whole bug