[ic] Newbie sales taxes

Ton Verhagen interchange-users@interchange.redhat.com
Wed Feb 13 08:59:00 2002


At 01:21 PM 2/13/02 +0100, you wrote:
>How to use the sales taxes field in products.In belgium, the taxes depend on
>product type (for ex cigarets=0% wines =21%)not on location.

Try setting this in catalog.cfg:

SalesTax multi

It will then do varying salestax lookups based on country or state, and
tax_category of product. (It is supported in the UI, but basically it is
nothing but a database editor.)

See item 6 below.

The WHATSNEW file says:
* Instituted VAT and extended taxing, including UI support.

   If the SalesTax directive is set to "multi", the type of tax is read from:

   [data table=country col=tax key="[value country]"].

   NOTE: Most everything is configurable for variable name and
         field name via Variable MV_*, but defaults are shown below.

   1. If no string is found, tax returns 0.

   2. If string "simple:(\w+)" is found, uses fly_tax() as with
      recent standard demos.

   3. If string "state" is found, does a re-lookup with

         select tax from state where country = country and state = state

      and value is applied below.

   4. If just digits are found, rate applied directly -- i.e. "0.05"

   5. If N.NN% is found, applied as percentage.

   6. If category = N.NN%, default = N.NN% is found, the tax_category
      field in the products database is used to determine tax basis.
      If no tax_category, "default" rate is used.

   This product data

     sku      price     tax_category
     sku0011  10.00     cigarets
     sku0023  20.00     wines

   with this country and state data:

     code     name     tax
     BE      Belgium   cigarets=0%, wines=21%

     code   country   state   name      tax
     0001   US        IL      Illinois  6.5%
     0002   US        OH      Ohio      default = 5.5%, wines = 1%
     0003   US        AZ      Arizona

   Will yield tax for one each of sku0011 and sku0023 of:

     Belgium   $4.20
     US/IL   $1.95
     US/OH   $0.75
     US/AZ   $0.00

Also search the mail archives for SalesTax.

Good luck.


Best

Ton

--
Alamerce Nederland --- Cornerstone of eBusiness

eCommerce Solutions, Interactive Websites and Website Hosting
Url: http://www.alamerce.nl; Email: info@alamerce.nl; Phone +31-40-2374381