If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Your Zen Cart Products / Currencies & Sales Taxes, VAT, GST, etc. / Discussion of various tax-handling methods

Discussion of various tax-handling methods

Started by lat9 on 23 Mar 2019, 2:52 PM · Views: 7,982

Results 1 to 8 of 8
23 Mar 2019, 2:52 PM
#1
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,144
Plugin Contributions:
56

Post #1 by lat9

Various reports of issues for Zen Cart's handling of an order's tax have been reported over the years (see this thread for one example). Let's use this current thread as a means of gathering the processing required for various taxing situations in an effort to define the requirements so that we can generate a plan for corrective action.

24 Mar 2019, 7:53 AM
#2
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Post #2 by torvista

Here is a good chunk of country-specific information from the Dolibarr wiki:
https://wiki.dolibarr.org/index.php/VAT_calculation_and_rounding_rules

It may well cover all eventualities...people should have a look at it and comment if their own situation requires something more.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

24 Mar 2019, 1:07 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,144
Plugin Contributions:
56

Post #3 by lat9

Nice link, @torvista! I'll be reviewing that over the next couple of days.

4 Feb 2020, 5:30 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,144
Plugin Contributions:
56

Post #4 by lat9

lat9:

Nice link, @torvista! I'll be reviewing that over the next couple of days.
... or months:blush:.

I've come to the conclusion over the past (almost year, now) that the underlying issue's complexity is that there's no centralized point within Zen Cart to provide the region-dependent tax calculations. The storefront calculations are spread among the shopping_cart and orders classes as well as embedded in the shopping_cart page's header. On the admin side, those calculations are spread across the orders.php page as well as various product-types collect-info pages.

Tax calculations (as mentioned before by @balihr, but I can't locate that posting) are different for stores that display prices with tax and those that don't, as is the point in the calculations at which an amount should be rounded.

I'm thinking that the storefront should have a defined tax.php class and that the ot_tax.php module should be the centralized point in the order's tax calculations, gathering information collected by the tax.php class and then calculating the order's tax. That class could, for instance, determine on load whether the store is displaying prices with or without taxes and load a calculation module (which could be overridden by a specific store's one-off requirements) that "knows" how to do those calculations.

4 Feb 2020, 10:56 PM
#5
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Post #5 by torvista

Maybe you should start a Kickstarter for "Fix ZC Rounding Errors", I imagine there is a lot of people who would pay to see that fixed for once, me included!

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

4 Feb 2020, 11:38 PM
#6
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Post #6 by carlwhat

i am a big fan of tax being done in 1 place, ie ot_tax. people can replace their ot_tax class to calculate tax the way they want....

i suppose my biggest question would be how many store fronts display prices including tax? i have a feeling it is done more in europe (and other places) than in the US. as i can not think of any place in the US where prices are displayed with tax. it's always after subtotalling.

but all of these tax functions should be within the ot_tax module, IMO.

rounding errors are a completely different issue. prices and subtotals displayed on the screen should always add up to the next total. easier said than done.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

7 Feb 2020, 11:34 AM
#7
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,819
Plugin Contributions:
24

Post #7 by balihr

lat9:

Tax calculations (as mentioned before by @balihr, but I can't locate that posting) are different for stores that display prices with tax and those that don't, as is the point in the calculations at which an amount should be rounded.

I described it here with a solution I've used and still use with sites I build (except for US).

But yeah, I couldn't agree more - one centralized place to do all tax calculations would be GREAT.

My site - Pro ZC Help
My portfolio | My plugins

7 Feb 2020, 12:31 PM
#8
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,144
Plugin Contributions:
56

Post #8 by lat9

balihr:

I described it here with a solution I've used and still use with sites I build (except for US).

But yeah, I couldn't agree more - one centralized place to do all tax calculations would be GREAT.
Thanks for 'jogging my memory', @balihr! Pulling together these various tax-calculation postings into one thread should be a big help.