If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Bug Reports / Incorrect processing of Tax

Incorrect processing of Tax

Started by dbltoe on 17 Nov 2023, 4:14 PM · Views: 5,047

Results 41 to 50 of 50
3 Dec 2023, 4:30 PM
#41
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,906
Plugin Contributions:
23

Incorrect processing of Tax

We use only USPS on the main site

And, the entry_zone_id is 42 for the order I posted.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

5 Dec 2023, 7:26 PM
#42
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,906
Plugin Contributions:
23

Re: Incorrect processing of Tax

Just some more unimpatient information on a problem ongoing for over 30 days:P

I am now noticing that (on the live site) tax is showing up two ways depending on the billing location of the customer.

If the customer is in New Mexico, the tax is listed as "Gross Receipts Tax 7.75%" It is still listed incorrectly and is not taxing the Shipping

If the customer is outside New Mexico, the tax is not listed with the product and the tax is listed as "Sales Tax" and the value is $0.00

Maybe that will help shed some light.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

5 Dec 2023, 8:22 PM
#43
wilt avatar

wilt

Oji-san

Join Date:
Jun 2003
Location:
Newcastle UK
Posts:
1,950
Plugin Contributions:
3

Re: Incorrect processing of Tax

K, so regardless of the fact that this may have been outstanding for 30 days !!
I've been actively looking at this for less than a week.

I'm working on a branch
https://github.com/zencart/zencart/pull/6073 to try and address this.

My assumptions as to why tax calculations are not working correctly are based initially on this.

If I create a customer account (and I don't have dropdowns enabled) the the account created has a entry-zone_id = 0 in the addressbook

because the entry_zone_id = 0 then tax calculations will never work correctly.

I have added multiple tests to try to assure that changes to code produce the correct tax calculations, and currently the new code seems to work for certain scenarios although its possible other scenarios that I am not testing for may be broken.

I have started a google sheet to list a matrix of possible scenarios and will use that going forward to write further tests.
I still don't have a good understanding of your requirements regarding what you expect the tax calculations to produce based on he store location and the customer location.

I would like you test creating a customer account (ensuring that customer drop downs are disabled) if when the customer account is created and the entry_zone_id for the customer address book is not zero then something is strange about your install

5 Dec 2023, 10:05 PM
#44
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,906
Plugin Contributions:
23

Re: Incorrect processing of Tax

wilt:

K, so regardless of the fact that this may have been outstanding for 30 days !!
I've been actively looking at this for less than a week.

That was for someone else's benefit and, I did have :P

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

5 Dec 2023, 11:04 PM
#45
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,906
Plugin Contributions:
23

Re: Incorrect processing of Tax

I need to point out that the only dropdown ever enabled has been the country. All other fields for registration are strictly "Type In".

Here's the settings once again:

One Page Checkout - Note symptoms are the same with or without OPC

  • Set to true
  • Order Total set for Boostrap
  • Guest Checkout set to true
  • Debug set to ON

Configuration > My Store

  • Basis of Product Tax -- Store
  • Basis of Shipping Tax -- Store
  • Country -- United States
  • Display Prices with Tax -- true ** This is not set in stone and could be done either way. Leaving it like this during testing.
  • Display Prices with Tax in Admin -- false
  • Sales Tax Display Status -- 1
  • Show Split Tax Lines -- false
  • Store Status -- 0
  • Tax Decimal Places -- 2
  • Zone -- New Mexico

Catalog > Categories/Products

  • All Items are Taxable Goods
  • Some are Priced by Attributes - Some are not

Modules > Shipping Modules

  • Only USPS is turned on
  • version 2023-07-12 K11i
  • production
  • Tax Class -- Taxable Goods
  • Tax Basis -- Store
  • Shipping Zone -- none

Locations/Taxes

  • Zone Definitions - Taxes, Payment and Shipping -- New Mexico, Gross Receipts Tax, Status Green
  • Details -- United States, New Mexico
  • Tax Rate -- 1, Taxable Goods, New Mexico, 7.75%, Gross Receipts Tax 7.75%
  • Tax Classes -- 1, Taxable Goods
  • Tax Rates -- 1, Taxable Goods, New Mexico, 7.75%, Gross Receipts Tax 7.75%

The goal with these settings is to charge everyone who purchases on the site 7.75% on both the product and the shipping.

Current Symptoms:

  1. New Mexico Customers
  • Products DO display with tax on the product page
  • Products DO display with tax on the checkout page -- i.e., Sub Total: $10.72 for a $9.95 item
  • Postage shows -- $5.28
  • Total tax should be $1.18 combined for the Product and Shipping
  • Checkout shows "Gross Receipts Tax 7.75%" -- $1.15
  • The order Total: shows -- $16.00
  • This is actually collecting the tax for the item but not the shipping
  • Where it is getting the $1.15 in tax is lost to me
    2. Non-New Mexico Customers
  • The Product is Displayed WITHOUT Tax in the product description
  • The Product is Displayed WITHOUT Tax in the shipping cart
  • Checkout Page shows Product Price of $9.95 ** Item price without tax
  • Postage shows -- $5.00
  • Checkout displays "Sales Tax + :" of $0.00
  • Total is displayed as $14.95 which is product and shipping.

Again, I offer any access you may need to troubleshoot.

More Info

The only inputs in the DB that have an Entry Zone of 0 are foreign countries where 0 is the correct entry.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

6 Dec 2023, 3:34 AM
#46
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,906
Plugin Contributions:
23

Re: Incorrect processing of Tax

I turned off Display Products with Tax and New Mexico now works with the correct Gross Receipts Tax displayed properly.

Non-New Mexico still lists "Sales Tax + :" as $0.00. I have no idea where the + is coming from.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

6 Dec 2023, 4:16 AM
#47
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,906
Plugin Contributions:
23

Re: Incorrect processing of Tax

I believe the "Sales Tax + :" is coming from includes/modules/order_total/ot_tax.php line 90 and showing up because I had Sales Tax Display Status to 1 versus 0.

I've turned that back to 0 and the Sales Tax = : $0.00 went away.

The product still does not get charged tax even though the Basis of Product Tax is still set to Store.

At least with the current settings, the owner can collect the proper amount for those in New Mexico.

Hopefully further research will come up with a solution as less than 8% of sales are to New Mexico.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

6 Dec 2023, 4:51 PM
#48
wilt avatar

wilt

Oji-san

Join Date:
Jun 2003
Location:
Newcastle UK
Posts:
1,950
Plugin Contributions:
3

Re: Incorrect processing of Tax

I keep coming back to this as it speaks to a fact that your code may be somewhat customised.

If you create a customer on your site is it setting the entry_zone_id in the address book. If it is, then I would consider that your code is not stock v158

If you would like me to help debug this more and let me access stuff better, please email me directly at [email protected]
I do think there are issues with some tax calculations, hence my PR branch on github and would like to get mpre information on this.

7 Dec 2023, 2:41 AM
#49
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,906
Plugin Contributions:
23

Re: Incorrect processing of Tax

details sent

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

16 Feb 2024, 11:06 PM
#50
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Incorrect processing of Tax

Upgrading from 1.5.7d to 1.5.8a
Windows 10
PHP 8.025
Apache2
Localhost Only
Unmodified Classic Template and My Modified Classic Template that I'm making responsive (I know...ZCA Responsive is great too)

No taxes are getting added to the product in the Unmodified Classic Template...state pulldown false

Taxes are doubled in My Modified Classic Template...state pulldown true

I have not messed with any pricing files.

The link below is for all the screenshot settings in admin and the catalog.

https://drive.google.com/file/d/1iUp2m1X2lZbjcDf8k2g_n2CWKEys_Olo/view?usp=drive_link

After reading this thread, I figured you might needs as much info as possible...so, I tried to include everything. Please let me know if you need more.