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

Re: [ic] Tax Exempt




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});
        }


Thanks,
Steve

_______________________________________________
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.