[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] Tax Exempt


Quoting Steve Graham (suppressed):
> 
> >
> >I don't think setting a scratch here is necessary:
> >[if type=data term="userdb::tax_exempt::[data session username]"]
> >  [assign salestax=0]
> >[/if]
> >
> >A stub for a SpecialSub would probably work out well.
> 
> Thanks Peter - that's nice and concise...
> 
> I am still thinking about modifying Interpolate.pm
> 
> Please offer advice for this code - I'm not quite sure I understand 
> the raw Perl Database methods:
> 
> sub salestax {
>         my($cart, $opt) = @_;
> 
>         $opt ||= {};
> 
>         my($save, $oldspace);
> +
> + ###If Customer is tax exempt return 0 & exit !
> + if($Tag->data({
> +        table => 'userdb',
> +        column => 'tax_exempt',
> +        key => $Session->{username},
> +    })) return 0;
> +
>         ### If the user has assigned to salestax,
>         ### we use their value come what may, no rounding
>         if($Vend::Session->{assigned}) {
>                 return $Vend::Session->{assigned}{salestax}
>                         if defined $Vend::Session->{assigned}{salestax}
>                         && length( $Vend::Session->{assigned}{salestax});
>         }
> 

There are ways to do this already -- all you have to do is set:

	SalesTax   tax_exempt zip state

Then put in salestax.asc (or whatever your mechanism is):

	notax	0.00

At that point, just set the tax_exempt field to "notax" and
you have it.

There is a way to do it with Multi, too.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.647.1295  tollfree 800-949-1889 <suppressed>

Fast, reliable, cheap.  Pick two and we'll talk.  -- unknown
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.