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 6 of 6

Thread: Special tax rate for a State

  1. #1
    DENT is offline Member
    Join Date
    Mar 2010
    Posts
    42

    Default Special tax rate for a State

    We only apply tax to a single state, California.

    So the default tax rate for cali is 8.25%

    Now I have a spreadsheet with thousands of zip codes, and the tax rate for each zip code (California only).


    So IF there is a record in the spreadsheet for a zip code, I use that value, otherwise default to 8.25%.

    Where should this zip code list be imported into ASPDNSF?
    What tax settings have to be configured?

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

    Default

    There's no way to do something like that out of the box in the software. We look to see if there is a country, state, and/or zip code level tax and use whatever we find, adding them together if there are multiple levels. There is no 'rollover' if one level isn't found. That would take a little customization to accomplish.

    As for importing the zip code taxes - through the admin site it's a manual entry process, there is no bulk importer. If you have a dev there to set it up, importing from an Excel file through SQL wouldn't be too difficult. You'll need to populate the ZipTaxRate table in the database.

  3. #3
    DENT is offline Member
    Join Date
    Mar 2010
    Posts
    42

    Default

    I am the dev

    Yeah so I see the ziptaxrate table, there is a TaxClassID field, how does that get mapped?


    So your saying, without the source code, I can't do this fail over?

  4. #4
    DENT is offline Member
    Join Date
    Mar 2010
    Posts
    42

    Default

    So first it looks for a country mapping, then a state, then a zip?

    And it adds up each one if found?


    So I could do:

    Country = 0%
    California = 8.25%
    Zip = delta (for some zips, not all)


    This way IF there is a zip, it adds it otherwise it will use the 8.25%?

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

    Default

    As long as the deltas are always positive you could do it that way. Pretty sure that wouldn't work if the local tax rate actually needed to be lower.

    The TaxClassID should match the appropriate ID from the TaxClass table depending on what you're trying to tax (Goods, Shipping, Services, etc).

  6. #6
    factorite is offline Junior Member
    Join Date
    Oct 2009
    Posts
    22

    Default Hokey, but...

    You could adjust the percentages to get the lowest tax rate and scale up from there.

    If 90210 had a tax rate of 7.25 and that was the lowest then you'd set the State Tax rate at that percentage and add from there.

    Pseudo code here:

    Code:
      taxModifier = StateTaxRate - MINIMUM( ZipTaxRates )
      newStateTaxRate = StateTaxRate - taxModifier
      
      for each zipTax in ZipTaxRates {
        newZipTax = zipTax - newStateTaxRate
        // Write newZipTax to Database
      }
      // Write newStateTaxRate to Database
    This assumes that your table has full tax rates ( not broken down )

    So, to go through the logic, you can check it against this list 8.25, 8.5, 8.00 7.25

    First, it finds the lowest tax rate: 7.25 and that's the new State Tax Rate.

    Then it iterates through the zipTaxRates.

    So

    8.25 becomes 7.25 + 1.0
    8.5 becomes 7.25 + 1.25
    8.0 becomes 7.25 + .75
    7.25 becomes 7.25 + 0.0
    ...

    Of course, this also means you have to have every single possible zip... which is probably not practical.