Reni2 Posted February 27, 2011 Share Posted February 27, 2011 Problem: The tax is computed before the deduction of the discount. Installed: osCommerce v2.2 Discount Code (updated to v2.9) - http://addons.oscommerce.com/info/7397/v,22 Order at Admin - Modules - Order Total: 1 - Sub Total 2 - Discount Code 3 - Tax 4 - Shipping 5 - Total Prices for the products in my shop are shown including tax. Example as it appears, with a discount of 10 euro: Sub-total: 50 (shown inclusive 19% tax) Discount: 10 VAT: 7.98 Shipping: 7.95 Total: 47.95 This should be: Sub-total: 50 (shown inclusive 19% tax) Discount: 10 VAT: 6.38 (Note: 50 minus 10 is 40. This, however, is including VAT, the net amount (excluding VAT) is (40 / 1.19 =) 33.61. The 19% tax on this amount is (33.61 * 0.19 =) 6.38) Shipping: 7.95 Total: 47.95 Can someone please explain how to configure osCommerce (or the php files) to get the desired result? Quote Link to comment Share on other sites More sharing options...
fenerbahce Posted March 3, 2011 Share Posted March 3, 2011 I have the exact same problem. It certainly does not make sense. Why give discount on exluding tax price? I never hear 10% discount advertised with a small print saying "oh, by the way, the discount is applied to excl. Tax price" I am sure simple code change will make it work the correctly. If anybody knows how to fix this please share it with us. Quote Link to comment Share on other sites More sharing options...
saphir52 Posted March 12, 2011 Share Posted March 12, 2011 Hello, same problem to me. Surely modification in ot_tax.php but i am not expert. If you have solution ... :rolleyes: Quote Link to comment Share on other sites More sharing options...
Reni2 Posted March 14, 2011 Author Share Posted March 14, 2011 No - successful - response on this forum, neither an answer from the originator of the distribution. Removed the module Discount code and add the module Discount coupon, which has almost the same functionality. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 14, 2011 Share Posted March 14, 2011 Order at Admin - Modules - Order Total:1 - Sub Total 2 - Discount Code 3 - Tax 4 - Shipping 5 - Total Change it to: Order at Admin - Modules - Order Total: 1 - Discount Code 2 - Sub Total 3 - Tax 4 - Shipping 5 - Total And if there is NO tax in your store, remove it from the order total module. Chris Quote Link to comment Share on other sites More sharing options...
Guest Posted March 19, 2013 Share Posted March 19, 2013 (edited) To show the discount including VAT, you have to adjust catalog/includes/modules/order_total/ot_discount.php. I have also added a minus sign in fornt of the discount amount. Look for function process() (around row 27) and add a row to declare a new variable (after $tax_discount = array()); $disocunt_incl_tax = 0; Set the new variable (after $order->info['total'] -= $discount;) $discount_incl_tax += array_sum($tax_discount); $discount_incl_tax += $discount; Look for: 'text' => '<span class="productSpecialPrice">' . $currencies->format($discount, true, $order->info['currency'], $order->info['currency_value']) . '</span>', Replace by: 'text' => '<span class="productSpecialPrice">' . '-' . $currencies->format($discount_incl_tax, true, $order->info['currency'], $order->info['currency_value']) . '</span>', If you don't like the minus sign in fornt of the discount amount: Replace by: 'text' => '<span class="productSpecialPrice">' . $currencies->format($discount_incl_tax, true, $order->info['currency'], $order->info['currency_value']) . '</span>', Edited March 19, 2013 by saskia_z Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.