[ic] Tax Exempt ?

Greg Hanson greg@valuemedia.com
Tue, 6 Mar 2001 15:09:13 -0800

You may be able to set it up based on the userdb as you started to do.  This
is what I use (thanks to Mike Heins) in one of our catalogs to determine
dealer or no dealer, it configs the price field prior to everything starting
up (of course the customer has to log in for it to be effective).  You
should be able to substitute SalesTax for PriceField, and put tax_exempt
field in UserDB and define it, then if a customer is defined in the user db
as tax exempt, and they log in, then set the SalesTax to be empty, and no
tax should be charged....

In the catalog.cfg I have:

UserDB	default	scratch	dealer

AutoLoad <<EOF
	if ($Scratch->{dealer}) {
			$Config->{PriceField} = 'w_price';

yours might look like:

UserDB	default	scratch	tax_exempt

AutoLoad <<EOF
	if ($Scratch->{tax_exempt}) {
			$Config->{SalesTax} = ' ';

and of course you need the extra field in userdb, and you will need to put a
value in that field if the user is to be tax exempt.

I think this should work, and if anyone sees any errors, they can speak

Greg Hanson
14355 Fern Dell Lane
La Pine, OR 97739
541-536-9407 Fax

-----Original Message-----
From: interchange-users-admin@lists.akopia.com
[mailto:interchange-users-admin@lists.akopia.com]On Behalf Of Steve Palm
Sent: Tuesday, March 06, 2001 1:28 PM
To: interchange-users@lists.akopia.com
Subject: [ic] Tax Exempt ?

HELP!  :-)  I've been digging through the docs, and I'm still lost....

How can you handle tax exempt orders?

I've tried adding a tax_exempt field to the userdb.  This updates correctly,
and tracks with the users.

        <SELECT onChange="this.form.submit()" NAME=tax_exempt>
        <OPTION VALUE="0">No
        <OPTION [selected tax_exempt 1] VALUE="1">Yes
	Tax Exempt (with required paperwork)

I also have been able, then, to use this field on the form to determine
whether or not to process the line that shows Sales Tax.  This works fine.

	<TD>Sales Tax</TD>
	[if value tax_exempt == 1 ]
	<TD ALIGN=RIGHT>[salestax]</TD>

I also set the catalog "SalesTax tax_state", and then based on the value of
tax_exempt either set it to "" or to the state.  I tried this using a few
different methods....

    [if value tax_exempt != 1]
    [perl] $Values->{tax_state} = $Values->{state}; return; [/perl]
    [perl] $Values->{tax_state} = ""; return; [/perl]


    [if value tax_exempt != 1]
    <INPUT TYPE=hidden NAME=tax_state VALUE=[value state]>
    <INPUT TYPE=hidden NAME=tax_state VALUE="">

 And even a variant of a pure [perl] block that checked
 $Values->{tax_exempt} and did the appropriate updates...

However, these all seem to lag...  In other words, if I change tax exempt
status, it does a refresh of the page, updates the tax_exempt variable, but
unless I do one more refresh of the page it doesn't stop the built-in
routines from calculating tax and putting it in the totals.

	<TD ALIGN=RIGHT>[total-cost]</TD>


Anyone deal with this before?   We deal with a lot of non-profit
organizations and it would be nice to have this automated.

Steve Palm <stevep@sga.org> * SGA * Loves Park, IL *

Interchange-users mailing list