[ic] Total-cost is not equal to discounted price plus tax

murahashi interchange-users@icdevgroup.org
Tue Jan 21 01:01:01 2003


I'm still have a problem of [total-cost] calculation.

In case of mine, 5% discount for subtotal, and frac_digits 0,

subtotal is 25450 * 0.95 = 24177.5 , rounded is 24178 Yen. [subtotal] shows
24,178 Yen.
salestax is 24177.5 * 0.05 = 1208.875 , rounded is 1209 Yen. [salestax]
shows 1,209 Yen.

What is [total-cost] calculation?
(A) 24177.5 + 1208.875 = 25386.375, [total-cost] shows 25386 Yen
(B) 24178 + 1209 = 25387

>From assign tag in IC doc below, [total-cost] shows (A). Is it correct?
I think [total-cost] should be 25,387Yen.

Am I wrong?


http://www.icdevgroup.org/i/dev/docfly.html?mv_arg=ictags04%2e04

Important note

salestax
This preempts the salestax calculation. The assigned value is not rounded.

subtotal
This preempts the cart subtotal derived from prices. The assigned value is
not rounded.

Note that you cannot assign to [total-cost] - it will always be the sum of
the four above.


----- Original Message -----
From: "murahashi" <murahashi@ayayu.com>
To: <interchange-users@icdevgroup.org>
Sent: Saturday, January 18, 2003 8:42 PM
Subject: [ic] Total-cost is not equal to discounted price plus tax


> Hi,
>
> I have a problem with calculation of total-cost under discount rate and
tax
> calculation.
>
> My system is IC 4.8.3.
>
> currency_symbol Yen
> frac_digits 0
>
> My problem is Total-cost is not equal to discounted price plus tax.
>
> For example, Subtotal is 25450Yen.
> 5% Discounted price is 24178Yen. The rounded is fine.
> 5% Tax is 1209Yen. It is correct too.
> So Total-cost should be 24178 + 1209 = 25387Yen.
>
> But, [total-cost] showed 25386 Yen.
>
> [total-cost] may be  25450 * 0.95 * 1.05 = 25386.375, and round is 25386
> Yen.
>
>
> My checkout calculation tags are as follows.
>
> [discount ENTIRE_ORDER][/discount][subtotal]
> [discount ENTIRE_ORDER] $s * 0.95[/discount]
> [salestax]
> [total-cost]
>
> What should I do?
>
> Murahashi
>
> _______________________________________________
> interchange-users mailing list
> interchange-users@icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
>