[ic] Tax Exempt ?

Steve Palm stevep@sga.org
Tue, 6 Mar 2001 15:28:13 -0600

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 *