Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Order Total wrong when discount applied


Mobox1

Recommended Posts

OK - either I need to do back to school or there is something fishy going on when I try and enable a discount to be taken on a product order.

 

As an example:

 

I have an Order Total of ?495 which I need to apply a 10% discount. Having created a voucher to do this, I tested it out and using a tax rate (VAT) of 17.5%, I got the following result.

 

Sub-Total: ?495.00

Discount Voucher:10DIS: -?49.50

Royal Mail (First Class Recorded Post): ?3.45

The VAT in your order is:: ?74.23

Total: ?448.95

 

Although these calculations are right (there is 0.51p of tax in the shipping), the tax was being calculated on the pre discount amount (?495.00) not the post discount total of ?445.50

 

The options in the discount voucher function allow you to have the rec-calculate tax setting on None, Standard and Credit Note. Changing it to standard, I then got:

 

 

Sub-Total: ?495.00

Discount Voucher:10DIS: -?49.50

Royal Mail (First Class Recorded Post): ?3.45

The VAT in your order is:: ?66.86

Total: ?441.57

 

All figures correct apart from the total that has gone from ?448.95 to ?441.57 <_<

 

Can anyone explain why??!! It is rather important as all the order details sent out to customers are showing the wrong VAT amount.

Link to comment
Share on other sites

OK - either I need to do back to school or there is something fishy going on when I try and enable a discount to be taken on a product order.

 

As an example:

 

I have an Order Total of ?495 which I need to apply a 10% discount. Having created a voucher to do this, I tested it out and using a tax rate (VAT) of 17.5%, I got the following result.

 

Sub-Total: ?495.00

Discount Voucher:10DIS: -?49.50

Royal Mail (First Class Recorded Post): ?3.45

The VAT in your order is:: ?74.23

Total: ?448.95

 

Although these calculations are right (there is 0.51p of tax in the shipping), the tax was being calculated on the pre discount amount (?495.00) not the post discount total of ?445.50

 

The options in the discount voucher function allow you to have the rec-calculate tax setting on None, Standard and Credit Note. Changing it to standard, I then got:

 

Sub-Total: ?495.00

Discount Voucher:10DIS: -?49.50

Royal Mail (First Class Recorded Post): ?3.45

The VAT in your order is:: ?66.86

Total: ?441.57

 

All figures correct apart from the total that has gone from ?448.95 to ?441.57? <_<

 

Can anyone explain why??!! It is rather important as all the order details sent out to customers are showing the wrong VAT amount.

 

I should add that I know the difference in order total is due the difference between the two tax amounts, but it should not affect the total. The tax figure should just be calculated on the post rather than the pre-discounted amount.

Edited by Mobox1
Link to comment
Share on other sites

Check the order in which the taxes are figured.  You can set this order in admin and it will change the results.

 

 

Many thanks for your reply Gene. Would like to try it out but having trouble finding which area of the admin section alters the order in which the taxes are figured. Can you give me more detail on where I can find this?

Link to comment
Share on other sites

I am getting this same problem and I have tried to modify the way that the tax is being applied and it doesn't seem to work for me. This is how I have it setup...

 

Sub-Total - 1

Discount Coupons - 2

Shipping - 3

Tax - 4

Total - 5

 

How I want it to work is that it takes the coupon off the sub-total but not off the shipping. Currently it's charging tax on both Sub-Total and Shipping and then removing the coupon from the Sub-Total so it's charging tax on amount before discount.

 

How can this be fixed?

 

Thank you

Link to comment
Share on other sites

the problem is that the discounts and tax get applied at every single product and you lose precision.  to get the right values what i do is i apply discount the subtotal only and then apply my tax to the total.

 

Seb - I have tried moving the order of the subtotal so that the discount comes first. I thought that this would make the tax calculate on the post discount amount. However,the subtotal appears to remain the same wherever I put it?

Link to comment
Share on other sites

I think the problem is in the 'Show price with VAT' contribution. In your configuration, set the 'show poducts with tax' option to false, and see if that fixes the subtotal amount on the confirmation page.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

  • 2 weeks later...
I think the problem is in the 'Show price with VAT' contribution. In your configuration, set the 'show poducts with tax' option to false, and see if that fixes the subtotal amount on the confirmation page.

 

 

thanks for the suggestion, but that causes all the prices on my site to be displayed without VAT which is something I cannot do.

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.

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...