Jump to content
Sign in to follow this  
spd81

"Discount for Payment Type" module showing wrong a

Recommended Posts

Under Admin -> Order total Module -> Payment Type Discount. With recalculate tax set to false, it will show:

 

Sub-Total: $679.99

Payment Type Discount: $13.60

Shipping: $7.56

15% tax: $102.00

15% tax on shipping: $1.13

Total: $777.08

 

The 2% discount price shows the correct amount on above example. However, my customer would have to pay taxes based on the sub-total amount before the discount. Which seems a bit unfair.

 

So I have changed "recalculate tax" options to true.

It then shows:

 

Sub-Total: $679.99

Payment Type Discount: $15.64 >>>but it should be $13.60

Shipping: $7.56

15% tax: $99.96

15% tax on shipping: $1.13

Total: $775.04

 

The tax is now calculated as desired. But the weird thing is the 2% discount price showing is wrong. It should be $13.60 not $15.64. But when I tried to add it up, it's apparent that the discount amount that is actually deducted is the correct amount of $13.60 not the $15.64 being displayed.

 

I am really a newbie in php. Can someone guide me how or where to modify the "Discount for Payment Type" module so that the discount amount would come out correctly when "recalculate tax" is set to true?

Seems like the calculations are ok but the discount amount showing is wrong.

 

Any help is appreciated.

 

Thanks,

Rick

Share this post


Link to post
Share on other sites

what are your settings in:

ADMIN > MODULES > ORDER TOTAL

 

how is it ordered ?


Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Share this post


Link to post
Share on other sites
Under Admin -> Order total Module -> Payment Type Discount. With recalculate tax set to false, it will show:

Sub-Total: $679.99

Payment Type Discount: $13.60

Shipping: $7.56

15% tax: $102.00

15% tax on shipping: $1.13

Total: $777.08

The 2% discount price shows the correct amount on above example. However, my customer would have to pay taxes based on the sub-total amount before the discount. Which seems a bit unfair.

So I have changed "recalculate tax" options to true.

It then shows:

Sub-Total: $679.99

Payment Type Discount: $15.64 >>>but it should be $13.60

Shipping: $7.56

15% tax: $99.96

15% tax on shipping: $1.13

Total: $775.04

The tax is now calculated as desired. But the weird thing is the 2% discount price showing is wrong. It should be $13.60 not $15.64. But when I tried to add it up, it's apparent that the discount amount that is actually deducted is the correct amount of $13.60 not the $15.64 being displayed.

I am really a newbie in php. Can someone guide me how or where to modify the "Discount for Payment Type" module so that the discount amount would come out correctly when "recalculate tax" is set to true?

Seems like the calculations are ok but the discount amount showing is wrong.

Any help is appreciated.

Thanks,

Rick

 

 

I just exhausted to find a solution of this problem since I am facing the same, but it seems there is a constant difference between Payment Type Discount and values and it is app. %15 which is your tax percentage.

 

So, if the total seems correct which is obviously correct and if the thing is the only view, you can change by changing the output as below,

 

in ot_payment.php & line 37,

 

$this->output[] = array('title' => $this->title . ':',
						  'text' => '<font color="#FF0000"><b>-' . $currencies->format($od_amount/1.15) . '</font></b>',
						  'value' => $od_amount);

 

I added a minus sign and colored to red to show discount better.

 

I hope this will solve the problem in short term.

 

Wishes,

Share this post


Link to post
Share on other sites

The discount amount is actually correct in both cases - the contrib just is simply combining the tax savings as well into the shown discount amount, which is technically correct.

 

The order total is $790.68 with no discounts applied. In the first scenario the discount is applied only to the sub-total amount of $679.99, resulting in an easy calculation and an amount of $13.60.

 

In the second scenario however the tax is recalculated based on the new subtotal, which results in added savings to the buyer. In this case, the old tax amount was $102, and the new tax amount is $99.96 - which is a further savings of $2.04. When you add that to the $13.60 you end up with the true total discount amount to the customer of $15.64.

 

 

 

Under Admin -> Order total Module -> Payment Type Discount. With recalculate tax set to false, it will show:

 

Sub-Total: $679.99

Payment Type Discount: $13.60

Shipping: $7.56

15% tax: $102.00

15% tax on shipping: $1.13

Total: $777.08

 

The 2% discount price shows the correct amount on above example. However, my customer would have to pay taxes based on the sub-total amount before the discount. Which seems a bit unfair.

 

So I have changed "recalculate tax" options to true.

It then shows:

 

Sub-Total: $679.99

Payment Type Discount: $15.64 >>>but it should be $13.60

Shipping: $7.56

15% tax: $99.96

15% tax on shipping: $1.13

Total: $775.04

 

The tax is now calculated as desired. But the weird thing is the 2% discount price showing is wrong. It should be $13.60 not $15.64. But when I tried to add it up, it's apparent that the discount amount that is actually deducted is the correct amount of $13.60 not the $15.64 being displayed.

 

I am really a newbie in php. Can someone guide me how or where to modify the "Discount for Payment Type" module so that the discount amount would come out correctly when "recalculate tax" is set to true?

Seems like the calculations are ok but the discount amount showing is wrong.

 

Any help is appreciated.

 

Thanks,

Rick

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×