[ic] SalexTax multi error with discount products

Mike Heins interchange-users@icdevgroup.org
Fri Nov 15 05:25:01 2002


Quoting scaballe@caballe.net (scaballe@caballe.net):
> 
> 
> There is an error in [salestax] calculation with [discount] products, the 
> tax is calculated with the regular price, instead subtotal
> 
> It works OK with default salestax configuration, but fail with 
> VAT, based on country and tax category. (SalexTax multi)
> 
> My catalog.cfg :
> 
> #SalesTax        __TAXFIELD__
> SalesTax        multi
> TaxShipping     __TAXSHIPPING__
> 
> 
> example:
> 
> 105.26 less 5% discount = 100 + 16%  (16.00) = 116.00
> 
> but the interchange calculation is:
> 
> 105.26 less 5% discount = 100 + 16% (16.84) = 116.84
> 
> Salestax was 16.84  instead the correct valor 16.00
> 
> Version 4.9.3 
> Tax configuration:
> Tax type :VAT, based on country and tax category
> 
> 
> Tested also with 4.8.6 (same problem)
> 

Cannot confirm this.

[flag type=write table=country]
[flag type=write table=state]

Reset values, cart: [calc] %$Values = (); @$Items = (); 1[/calc] <br>
Reset discount ENTIRE_ORDER. [discount ENTIRE_ORDER][/discount]
Set SalesTax to 
    [calc] $Config->{SalesTax} = 'junk' [/calc].
<p>

order [cgi name=mv_order_item set=os28004]
quantity [cgi name=mv_order_quantity set=10].
[cgi name=mv_todo set=refresh] and update. [update process]
<p>
Cart contains: [calc] uneval($Items) [/calc]<br>
subtotal=[subtotal] salestax=[salestax]
<p>
    [tmp oh_key][data table=state column=code key=OH foreign=state][/tmp]
    Set OH salestax rate to
        [data table=state column=tax key="[scratch oh_key]" value="10%"].<br>
    Set SalesTax to [calc] $Config->{SalesTax} = 'multi' [/calc].<br>
    Set US Tax mode to
        [data table=country column=tax key="US" value="state"].<br>
    Country to [value name=country set=US],
    State to [value name=state  set=OH].<br>
    subtotal=[subtotal] salestax=[salestax]
<p>
    Set OH salestax rate to
        [data table=state column=tax key="[scratch oh_key]" value="5%"].<br>
    subtotal=[subtotal] salestax=[salestax]
<p>
    Discount ENTIRE_ORDER. [discount ENTIRE_ORDER] $s - 10 [/discount]
    subtotal=[subtotal] salestax=[salestax]
<p>
    Reset discount ENTIRE_ORDER. [discount ENTIRE_ORDER][/discount]
    subtotal=[subtotal] salestax=[salestax]
<p>
    Discount item os28004. [discount os28004] $s * .9 [/discount]
    subtotal=[subtotal] salestax=[salestax]
<p>
Set SalesTax to 
    [calc] $Config->{SalesTax} = 'junk' [/calc].
    subtotal=[subtotal] salestax=[salestax]

The above behaves properly on both 4.8 and 4.9.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

How far can you open your mind before your brains fall out?