opensourcepos icon indicating copy to clipboard operation
opensourcepos copied to clipboard

[Bug]: Taxes Summary Report totals don't line up

Open chunter2 opened this issue 1 year ago • 6 comments

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.
image 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

chunter2 avatar Nov 07 '24 01:11 chunter2

3.3.2 is a long way back. Can you check if this is still the case in latest version?

jekkos avatar Nov 07 '24 22:11 jekkos

Just tried on demo.opensourcepos.org and I see the same issue.

image

chunter2 avatar Nov 08 '24 22:11 chunter2

Its probably related to decimal.precision and rounding behavior, looking at the numbers, they do not seem to be off by a.lot

jekkos avatar Dec 24 '24 04:12 jekkos

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.

chunter2 avatar Dec 25 '24 13:12 chunter2

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.

jekkos avatar Dec 26 '24 12:12 jekkos

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

diego-ramos avatar Jan 30 '25 21:01 diego-ramos