# Oscommerce Price Sensitive Discount 2.4 mod issue

Here's the scenario:

1)include shipping = false

2)include tax = false

3)recalculate tax = true

Subtotal = \$59.95

Discount % = 15

Tax = 7%

\$od_amount = round(\$amount*10)/10*\$od_pc/100; \$od_amount = \$od_amount + \$tod_amount;

Now, what's happening in this scenario is the following:

Subtotal = 59.95

Discount = 9.63

Tax = 3.57

Total = 54.52

The discount should be \$9.00 (.15*59.95) The tax is correctly calculated on \$50.95 (59.95 - 9.00) The total is correct based upon subtracting \$9 from the subtotal

However the problem is that it incorrectly displays \$9.63 as the discount amount which might cause some problems. The customer will state that the total amount is incorrectly calculated.

The problem is that it's adding the \$tod_amount to the \$od_amount.

So, does anyone know how to fix this so that the \$tod_amount is subtracted from the \$od_amount in the below section of the script:.

\$this-&gt;output[] = array('title' =&gt; \$this-&gt;title . ':',

'text' =&gt; '-' . \$currencies-&gt;format(\$od_amount), &lt;-----------------

'value' =&gt; \$od_amount);

The following was uncommented in the 2.4 version:

\$od_amount = \$od_amount + \$tod_amount;

With it commented the result is :

Subtotal = 59.95

Discount = 9.00

Tax = 3.57

Total = 55.15

In this case then, the \$tod_amount would need to be subtracted from the total.

Taidot: Linux, PHP

Tietoa työnantajasta:
( 3 arvostelua ) Sarasota, United States

Projektin tunnus: #141655

## Myönnetty käyttäjälle:

kagg

Quick Fix. See reviews for expertise on oscommerce. Thanks

\$50 USD 0 päivässä
(215 Arvostelua)
7.9

## 4 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön

abstechnosoft

hi PLZ see PMB for my work profiile. Thanks

\$50 USD 0 päivässä
(123 arvostelua)
7.1
wdanford

I offer over 30 years engineering experience, last 20 years heavy in custom software/firmware development. This is just classic core software code with which I am very familiar. But to resolve this I need to see more o Lisää

\$75 USD 1 päivässä
(1 arvostelu)
2.8
infooscommerce

Dear Sir I have 4 years experience in php,mysql,smarty,oscommerce,ajax,javascript. Oscommerce:-- [login to view URL] [login to view URL] [login to view URL] CRE Loaded:- [login to view URL] http Lisää

\$40 USD 0 päivässä
(3 arvostelua)
0.0