Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

"Discount for Payment Type" module showing wrong a


Guest

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

Link to comment
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 ;)

Link to comment
Share on other sites

  • 3 years later...
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,

Link to comment
Share on other sites

  • 1 year later...

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...