[interchange-i18n] Setting sales tax in other countries

Stefan Hornburg Racke racke at linuxia.de
Mon Sep 17 13:13:00 UTC 2001


"Rob Buijs" <rob at merchandisingdirect.com> writes:

> So, Racke
> 
> If I understand this correctly if you have three tax rates as we have in the
> Netherlands (19%, 8%, 0%) is this how you would do it:
> 
> catalog.cfg:
> SalesTax tax_code
> 
> salestax database:
>  VATHI .19
>  VATLO .08
>  VATNO .0
> 
> on your basket page:
> <input type="hidden" name="tax_code" value="VATHI">
> or
> <input type="hidden" name="tax_code" value="VATLO">
> or
> <input type="hidden" name="tax_code" value="VATNO">

I don't know if this is sufficient to answer your question, but
I think it is worth a try (it was a CVS log message from Mike):

* Instituted the VAT and extended taxing I promised quite a time ago.

  If the SalesTax directive is set to "multi", then 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-lookoup 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
    os28003  10.00     tools
    os28004  20.00     food

 with this country and state data:

    code     name     tax
    US       U.S.A.   state
    JP       Japan    tools=10%, default=15%


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

 Will yield tax for one each of os28003 and os28004 of:

    Japan   $4.00
    US/IL   $1.95
    US/OH   $0.75
    US/AZ   $0.00

* UI support is included.

Ciao
        Racke

-- 
Racke happily hacks Interchange and maintains Debian packages like Courier.

For projects and other business stuff please refer to COBOLT NetServices
(URL: http://www.cobolt.net; Email: info at cobolt.net; Phone: 0041-1-3884400)



More information about the interchange-i18n mailing list