[ic] Tax by customer, not state

Philip Alves interchange-users@icdevgroup.org
Fri Nov 8 20:00:01 2002


I've been reading the docs and archives, and attempted some changes of my
own, but all with no luck.

What I have is a userdb which is coming from an old, large database that is
not formatted for country or state.  It's set up as address1, address2...
and these are completely messed because of the way they were input by the
staff.  Luckily, I have a column in userdb called 'tax_percent'.  I know
that salestax is figured out using a list of states either in variable.txt
or salestax.asc.  I was wondering if there is a way to read the value
directly from userdb.

I did also see this:

   SalesTaxFunction  <<EOR
         my $vendor_id = $Session->{source};
       my $tax = $TextSearch->hash( {
                           se => $vendor_id,
                           fi => 'salestax.asc',
                           sf => 'vendor_code',
                           ml => 1000,
                           } );
       $tax = {} if ! $tax;
       $tax->{DEFAULT} = 0.0;
       return $tax;
   EOR

This looks like it might do the trick with a few changes, but I'm not sure
how to go about implementing it.  Any thoughts?

TIA

Phil