Forums / Currencies & Sales Taxes, VAT, GST, etc. / Item on sale and its rounding problem. It breaks my Quickbooks import

Item on sale and its rounding problem. It breaks my Quickbooks import

Started by simpledomaining on 16 Jul 2012, 4:50 PM · Views: 1,580

Results 1 to 4 of 4
16 Jul 2012, 4:50 PM
#1
simpledomaining avatar

simpledomaining

New Zenner

Join Date:
May 2011
Posts:
89
Plugin Contributions:
0

Item on sale and its rounding problem. It breaks my Quickbooks import

Zen-cart 1.3.9h
This seems like a little problem, but when you think about how much trouble it brings on... its just insane. the problem is in rounding calculation that the program does to items placed on sale. It is perfectly fine when it have no other rounded numbers to add to subtotal. But things get incorrect when you add another rounded number that comes from state tax calculation. here is the example:

Regular Item 28.95
Regular Item 23.95
Item on 25% sale 17.21
Regular Item 48.95
..........................
Subtotal: 119.06
Shpping: Free Shipping
Tax 9.3% 11.07
..........................
Total: 130.14

This 1 Penny that adds up into the total, screws up the whole data import into Quickbooks. Quickbooks rejects this order as an invalid, because of the incorrect calculation. Because one order is not being imported, the rest of orders are being imported with a wrong order number (shifted), that wont match our orders in zen-cart, so our workers have to import this order and orders that came after this during the weekend manually. Its just a 1 penny, but what it does to the system!
I want to mention this: when there is an order with 2 items on sale, or with no items on sale but with tax charge, there is no problem, everything adds up smooth.
If anybody have any suggestions how to fix this would be wonderful.

16 Jul 2012, 5:02 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Item on sale and its rounding problem. It breaks my Quickbooks import

The penny-rounding issues were fixed in v1.5.0

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Jul 2012, 5:06 PM
#3
simpledomaining avatar

simpledomaining

New Zenner

Join Date:
May 2011
Posts:
89
Plugin Contributions:
0

Re: Item on sale and its rounding problem. It breaks my Quickbooks import

I know about the fix in the new version, thanks for advise. it will be a very big trouble for us to go with an upgrade right at this moment due to lots of changes we did to the current version.

16 Jul 2012, 6:03 PM
#4
simpledomaining avatar

simpledomaining

New Zenner

Join Date:
May 2011
Posts:
89
Plugin Contributions:
0

Re: Item on sale and its rounding problem. It breaks my Quickbooks import

i have a mistype on my post
First regular item is Regular Item 28.95 instead of 28.98. I have no way to edit this on first post. so the difference is 1 penny.