Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 15 of 15

Thread: Tax rate calculation question

  1. #1
    webtech is offline Junior Member
    Join Date
    Feb 2007
    Posts
    25

    Default Tax rate calculation question

    We need to use tax rates for NY state that are 8.875 but the calculations are coming out for only 8.87

    Can anyone provide some guidance as to a code adjustment to help correct this.

    ML 7.0.2.0 C# with source

  2. #2
    DanV's Avatar
    DanV is offline Ursus arctos horribilis
    Join Date
    Apr 2006
    Posts
    1,568

    Default

    Are you serious that they are carrying tax out to the hundred-thousandth place? This is going to require mods in a few different areas due to rounding, etc. We'll have to have our dev team take a look at updating future builds. I'll get it logged on the to-do list.

  3. #3
    webtech is offline Junior Member
    Join Date
    Feb 2007
    Posts
    25

    Default

    OK, so can you provide an ETA on the update? The website is not usable until it can collect the appropriate tax. Are we the only ones collect NY state sales tax? What are others doing?

  4. #4
    DanV's Avatar
    DanV is offline Ursus arctos horribilis
    Join Date
    Apr 2006
    Posts
    1,568

    Default

    No ETA on this. Sorry. It just went into the queue yesterday. This is absolutely the first we have seen of states carrying taxes out to a thousandth of a percent.

  5. #5
    webtech is offline Junior Member
    Join Date
    Feb 2007
    Posts
    25

    Default

    OK. We hope this is being given a high priority. Please let us know as soon as the update is expected.

  6. #6
    Bill Curnow is offline Junior Member
    Join Date
    Apr 2008
    Posts
    13

    Default

    Texas has been carrying out sales tax calculations to the thousandth place (eg. 8.875%) for years.

  7. #7
    webtech is offline Junior Member
    Join Date
    Feb 2007
    Posts
    25

    Default Update?

    Can someone please provide an update on this. If there an update available yet that will address this? If not, ETA?

  8. #8
    SteveBiznet is offline Junior Member
    Join Date
    Dec 2009
    Location
    Detroit, MI
    Posts
    2

    Default Looking for an update, too

    California (8.975) has the same issue, any word on on when this will be corrected?

  9. #9
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    We're going to try to get it in ML9, but that's not definite yet. What definitely WILL be available then is the Avalera AvaTax addin, which will allow you to get realtime rax totals from their service, which will account for changes like this and save you from having to manage tax rates yourself.

  10. #10
    belvario is offline Junior Member
    Join Date
    Nov 2006
    Posts
    11

    Default

    Any ETA on v9 with the Avatax support? We're getting slammed in NY on the sales tax stuff.

  11. #11
    mebrahimi is offline Junior Member
    Join Date
    Feb 2009
    Posts
    14

    Default

    not sure if this will directly solve your problems, but I ran into something similar...
    my problem was that taxes were being miscalculated as follows.

    item 1) 19.95
    item 2) 23.95

    tax rate 9.25%

    calculated tax was 4.07
    correct tax should have been 4.06

    The problem was that the rate was applied to each item, then rounded and then added. I *believe* the correct method is to only round at the end.

    To fix this, I modified this stored proc: aspdnsf_GetCartSubTotalAndTax

    starting around like 225, changed this:

    UPDATE @tblsubtotal
    SET Tax = CASE sc.IsTaxable
    WHEN 1 THEN
    case @vatroundingmethod
    when 1 then round(FinalDiscountedPrice*((isnull(cr.taxrate, 0)+isnull(sr.taxrate, 0)+isnull(zr.taxrate, 0))/100), 2)*Qty
    else round((FinalDiscountedPrice*Qty)*((isnull(cr.taxra te, 0)+isnull(sr.taxrate, 0)+isnull(zr.taxrate, 0))/100), 2)

    to this:

    UPDATE @tblsubtotal
    SET Tax = CASE sc.IsTaxable
    WHEN 1 THEN
    case @vatroundingmethod
    when 1 then round(FinalDiscountedPrice*((isnull(cr.taxrate, 0)+isnull(sr.taxrate, 0)+isnull(zr.taxrate, 0))/100), 4)*Qty
    else round((FinalDiscountedPrice*Qty)*((isnull(cr.taxra te, 0)+isnull(sr.taxrate, 0)+isnull(zr.taxrate, 0))/100), 4)

    notice rounding change to 4 decimal places.

    Further down that procedure, the final value gets rounded anyway, so it should fix the problem:

    select
    round(sum(FinalDiscountedPrice*Qty)+sum(case when @IncludeTaxInSubTotal = 1 then Tax else 0 end), 2) SubTotal,
    round(sum(Tax), 2) TotalTax
    from @tblsubtotal


    mod at your own risk.

  12. #12
    webtech is offline Junior Member
    Join Date
    Feb 2007
    Posts
    25

    Default Tax calc to thousandth

    Can someone please provide an update/status on this.

  13. #13
    webopius is offline Senior Member
    Join Date
    Nov 2008
    Location
    London, UK
    Posts
    440

    Default

    This sounds a lot like the VAT/Tax rounding issue where prices can sometimes end up 1p out due to rounding errors.

    We've fixed this for clients in the UK but it involved a fair amount of change in the source code covering prices, shopping cart, receipts, discounts, coupons, customer levels, you name it!

    Prices.cs is where the bulk of changes have to be made by updating the rounding from 2 decimal places to 4.

  14. #14
    edlaplante is offline Junior Member
    Join Date
    Nov 2010
    Location
    Boston
    Posts
    2

    Talking ML8 Solution

    I found changing the data type on the ZipTaxRate table to numeric(18,6) from money worked.

  15. #15
    Asingh is offline Junior Member
    Join Date
    Dec 2010
    Posts
    3

    Default Need help to fix this issew

    Quote Originally Posted by webopius View Post
    This sounds a lot like the VAT/Tax rounding issue where prices can sometimes end up 1p out due to rounding errors.

    We've fixed this for clients in the UK but it involved a fair amount of change in the source code covering prices, shopping cart, receipts, discounts, coupons, customer levels, you name it!

    Prices.cs is where the bulk of changes have to be made by updating the rounding from 2 decimal places to 4.
    Hi There,

    I am facing same issue of price/VAT rounding to two places of decimal. I have looked at the code and changed few bits of it., but still struggling to change price at few places.

    It would be really helpful if you could tell me what all files i need to change or if there any fix available.

    Regards

    Anil