[ic] Re: Negative Tax - bug?

Dan Bergan danb at berganconsulting.com
Tue Oct 30 14:06:33 EST 2007


On 10/30/07, Dan Bergan <danb at berganconsulting.com> wrote:
> On 10/30/07, Mike Heins <mike at perusion.com> wrote:
> > Quoting Dan Bergan (danb at berganconsulting.com):
> > > On 10/16/07, Dan Bergan <danb at berganconsulting.com> wrote:
> > > > I'm having an issue where negative sales tax amounts are computed.
> > > > The issue arises when there is a discount on the entire order, and the
> > > > products in the cart are nontaxable.
> > > >
> > > > A detailed description and potential solution is here:
> > > > http://www.icdevgroup.org/pipermail/interchange-users/2007-May/047410.html
> > > >
> > > > This issue was also found here (with no resolutions):
> > > > http://www.icdevgroup.org/pipermail/interchange-users/2005-September/043923.html
> > > >
> > > > Is this a bug?  It doesn't seem like a negative sales tax should be valid.
> > > >
> > >
> > > Back in May, Carl had what looks to be a good solution for this
> > > problem, which I am going to implement for my installation (see
> > > below).
> >
> > It is unclear if it should be a bug at all. If you wanted to implement
> > refunds, you would need negative tax.
> >
> > The bigger problem would seem to be the negative amounts.
> >
> > In any case, I have set up the ability to exclude negative tax
> > amounts with:
> >
> >         Pragma  no_negative_tax
> >
> > That is in the latest CVS.
> >
>
> Mike -
>
> Ahh... refunds -- I hadn't thought of that!  :-)
>
> For refunds, the taxable sales amount would be negative, so the tax
> would calculate as a negative.  In the case above (non-taxable
> products with a discount), the taxable amount should still be zero
> (not negative).
>
> I currently don't use Interchange for refunds, but that doesn't mean I
> never will!  So, I think I'll have to ponder this some more and dig
> deeper into the code.
>

I think this might be more of a question about sales tax law.  Should
a ENTIRE_ORDER discount reduce the taxable amount?

The only mention I have found when searching sales tax documents are
coupons for individual items, and percent off of all items.  In the
case of ENTIRE_ORDER the actual sale prices of the individual items do
not change, so my client reports that number to their state as the
taxable amount.  My client treats this type of discount like a gift
certificate -- it is applied after the tax is calculated.  Of course,
this is just my client, in one state and in the US.

Would it work to have a catalog variable to determine if an
ENTIRE_ORDER discount should be applied pre-tax or post-tax?

Maybe something like this in taxable_amount():
my $pretax = $::Variable->{ENTIRE_ORDER_PRETAX} || 1;
if (defined $::Discounts->{ENTIRE_ORDER} && $pretax) {
	$Vend::Interpolate::q = tag_nitems();
        etc...

Dan


More information about the interchange-users mailing list