[ic] Multiple taxes based on an Item-Attribute

Mark Johnson interchange-users@lists.akopia.com
Thu Aug 2 12:06:05 2001


Admin Account wrote:
> 
> I will repost this in hopes this time I'll get some interest.  I hope this
> is not too stupid a question to get a reply.
> 
> Hi list,
> Using Interchange 4.6.5
> I thought I was almost done with my catalog but my customer  informed me
> that any contact lens that they sell without a prescription must have an
> additional 4% parish (county tax) in addition to the normal 4.25% LA state
> tax.  Taxes apply to customers in LA only.  Which will be several thousand
> of their current patients.  The same colored contact can be ordered with a
> prescription or with out.
> 
> I have set up, with Ed's help, Item-Attributes to ask for 3 extra variables
> (Power, Diameter, and BaseCurve)on the flypage.
> 
> How can I force the customer to enter these variables for ever purchase on
> the flypage. Customers will be instructed to put PL for Power since this
> determines the prescription.  This sands for plain in optometrist lingo.
> 
> Can I then do some type of [if item-modifier power = PL] then add 4% to the
> 4.25% state tax else do normal state tax.  I found good info in archives
> about how to set up multiple taxes for different products but did not want
> to have to double enter items.
> 
> I am perl and javascript deficient and a Interchange rookie to boot
> Thanks for any help
> 
> _______________________________________________
> interchange-users mailing list
> interchange-users@lists.akopia.com
> http://lists.akopia.com/mailman/listinfo/interchange-users

This used to be covered very nicely in the Minivend docs, and I highly
disapprove of its removal. Since I was unable to find the "Sales Tax"
section in the current docs (mea culpa if I just couldn't find it), I
will provide the Minivend 4 part of the docs here for you. This is
everything you need to know.

__BEGIN__

Sales Tax

MiniVend allows calculation of sales tax on a straight percentage basis,
with certain items allowed to be tax-exempt. To enable this feature, the
directive SalesTax is initialized with the name of a field (or fields)
on the order form. Commonly, this is zipcode and/or state: 

    SalesTax    zip,state

This being done, MiniVend assumes the presence of a file salestax.asc,
which contains a database with the percentages. Each line of
salestax.asc should be a code (again, usually a five-digit zip or a two
letter state) followed by a tab, then a percentage. Example:  

    45056   .0525
    61821   .0725
    61801   .075
    IL      .0625
    OH      .0525
    VAT     .15
    WA      .08

Based on the user's entry of information in the order form, MiniVend
will look up (for our example SalesTax directive) first the zip, then
the state, and apply the percentage to the SUBTOTAL of the order. The
subtotal will include any taxable items, and will also include the
shipping cost if the state/zip is included in the TaxShipping directive.
It will add the percentage, then make that available with the [salestax]
tag for display on the order form. If no match is found, the entry
'default' is applied -- that is normally 0, but can be anything. 

If business is being done on a national basis, it is now common to have
to collect sales tax for multiple states. If you are doing so, it is
possible to subscribe to a service which issues regular updates of the
sales tax percentages -- usually by quarterly or monthly subscription.
Such a database should be easily converted to MiniVend format -- but
some systems are rather convoluted, and it will be well to check and see
if the program can export to a flat ASCII file format based on zip code. 

If some items are not taxable, then you must set up a field in your
database which indicates that. You then place the name of that field in
the NonTaxableField directive. If the field for that item evaluates true
on a yes-no basis (i.e. is set to yes, y, 1, or the like), sales tax
will not be applied to the item. If it evaluates false, it will be
taxed. 

If your state taxes shipping, use the TaxShipping directive. Utah and
Nevada are known to tax shipping -- there may be others.

If you want to set a fixed tax for all orders, as might occur for VAT in
some countries, just set the SalesTax directive to a value like
tax_code, and define a variable in the user session to reflect the
proper entry in the salestax.asc file. To set it to 15% with the above
salestax.asc file, you would put in a form: 

    <INPUT TYPE=hidden NAME=tax_code VALUE="VAT">

or to do it without submitting a form: 

    [perl] $Values->{tax_code} = 'VAT'; return; [/perl]

__END__

-- 
Mark Johnson
Senior Systems Architect - Professional Services
Red Hat, Inc.
E-Business Solutions
markj@redhat.com
703-456-2912