When a customer has ZIP+4, tax rate is ignored completely. Is there an easy way around this?
First, I wonder if we can add a regular expression to the tax table?
Secondly, I tried to modify the aspdnsf_getZipTaxRate stored procedure to:
Code:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER proc [dbo].[aspdnsf_getZipTaxRate]
@ZipCode nvarchar(10) = null,
@TaxClassID int = null
AS
SET NOCOUNT ON
SELECT ztr.ZipTaxID, substring(ztr.ZipCode,1,5) AS ztr.Zipcode, ztr.TaxClassID, ztr.TaxRate, ztr.CreatedOn, t.Name TaxClass
FROM dbo.ZipTaxRate ztr with (nolock) join dbo.TaxClass t with (nolock) on ztr.TaxClassID = t.TaxClassID
WHERE ztr.ZipCode = COALESCE(substring(@ZipCode,1,5), ztr.ZipCode) and ztr.TaxClassID = COALESCE(@TaxClassID, ztr.TaxClassID)
It worked on SQL Server when I passed test parameters. But the tax amount still doesn't show up on either the estimate page or the checkoutpayment.aspx page.
Thanks.