For more information... RTFM!
NAVIGATION
PAGES THAT LINK HERE
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

fly-tax

Calculate a tax rate, usually by using values specified using the SalesTax local configuration directive.

Summary

  • [fly-tax area]

Parameter Description Default
area Tax area (not specified most of the time). None

Examples

Perl example

$Tag->fly_tax({
    area => $area,
});

or similarly with positional parameters:

$Tag->fly_tax($area);

Description

When the [fly-tax] tag is placed in the "default" setting of salestax.asc file, and the TAXAREA, TAXRATE and TAXSHIPPING Variable values are used to calculate the tax rate displayed to a customer.

Variable usage

TAXAREA

A space-separated or comma-separated list of areas (US states, for instance) to apply tax to.  This is not needed for the actual tax calculation;  It is used to build the UI list of areas to tax.

TAXRATE

A comma-separated list of tax rates.  For instance:

XX=N.NN, XX=N.NN

where XX is a two-letter area code and N.NN is the tax rate, expressed as a percentage.  To apply a tax rate of 7.25% for Illinois and 5.5% for Nevada, you would use the following:

IL=7.25, NV=5.5

TAXSHIPPING

A space or comma-separated list of areas where shipping is taxed.  Using the above example, if Nevada taxed shipping and Illinois did not, you would make TAXSHIPPING equal to "NV".

The SalesTax configuration directive

You can use the SalesTax local configuration directive to set the field that is used for the area codes, used above.  If your website is US-based, it would almost always be set to "state".

Parameters

area

This parameter is usually just left blank, which makes it use the SalesTax local configuration directive instead.  You can pass an area to this tag if you need to - perhaps for testing.

See also

Category:  Interchange tags
Last modified by: Kevin Walsh
Modification date: Tuesday 22 August 2006 at 5:17 PM (CDT)
Home  |  Legal nonsense  |  Privacy policy  |  Donations  |  Contact us