Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

nmlloyd

Archived
  • Posts

    9
  • Joined

  • Last visited

Everything posted by nmlloyd

  1. Mark, The plot thickens! In my stores I have VAT exclusive prices in the catalogue and I display VAT exclusive prices in the store, so the difference with your store is you display VAT inclusive prices. My guess is that OE 1.61 is pulling in the store displayed prices (which in your case includes VAT), and then calculating VAT again. This probably accounts for some of the weird fixes that people have tried to apply where they have tried to take the VAT off again to make the end result what they wanted. Probably what needs to happen is that the order editor needs to pull in the VAT exclusive prices, and then it would be OK to calculate and add the VAT again. I am only guessing here as I have not looked at the code that pulls in the item prices. I did not change the edit_order.php file from 1.61 other than as stated in my earlier posts.
  2. Oh and the fix I applied was to the order total update where my order totals were excluding the VAT that was now calculated correctly // $ot_value = $RunningTotal-$RunningTax; (removed NML) $ot_value = $RunningTotal; // NML order total correction to include VAT
  3. I installed V1.61 and amended all of the hard coded tax rates to 17.5 as UK VAT is 17.5% on goods, shipping, discounts and everything. In my store, prices are quoted net of tax (vat) and VAT is added to both goods and shipping charges. e.g. the following totals would be correct Goods Sub Total ?90.00 Shipping charges ?10.00 VAT @ 17.5% ?17.50 Total ?117.50 OE 1.61 calculates the VAT correctly on the goods (?90 * (17.5 / 100)) but incorrectly on the shipping charges where it calculates VAT as ?10 - (?10 / (1 + (17.5 /100))) = ?1.489 the VAT calculation on shipping should simply be (?10 * (17.5 / 100)) = ?1.75 There is no logical reason to calculate VAT differently on totals than products. Someone has introduced a bug into the tax calculation coding when the original code seems to be correct! Worse still the faulty code is commented "// corrected tax by cb"! I think this contribution is pretty good overall but there is too much hard coding of tax rates (e.g. the 20.0 and 7.6) and too many people have tried to fix things by applying and publishing code that just applies to their store which they may not have configured logically anyway. The faulty 1.61 code is shown below if ($ot_class == "ot_shipping") { $RunningTax += ($ot_value - ($ot_value / (1 + ($AddShippingTax / 100)))); // corrected tax by cb //$RunningTax += (($AddShippingTax / 100) * $ot_value); } elseif ($ot_class == "ot_lev_discount") { $RunningTax += ($ot_value - ($ot_value / (1 + ($AddLevelDiscountTax / 100)))); // corrected tax by cb // $RunningTax += (($AddLevelDiscountTax / 100) * $ot_value); } elseif ($ot_class == "ot_customer_discount") { $RunningTax += ($ot_value - ($ot_value / (1 + ($AddCustomerDiscountTax / 100)))); // corrected tax by cb // $RunningTax += (($AddCustomerDiscountTax / 100) * $ot_value); } elseif ($ot_class == "ot_custom") { $RunningTax += ($ot_value - ($ot_value / (1 + ($AddCustomTax / 100)))); // corrected tax by cb // $RunningTax += (($AddCustomTax / 100) * $ot_value); } elseif ($ot_class == "ot_cod_fee") { $RunningTax += ($ot_value - ($ot_value / (1 + ($AddCustomTax / 100)))); // corrected tax by cb // $RunningTax += (($AddCustomTax / 100) * $ot_value); Corrected code (Just remove the "fix" applied by cb!) if ($ot_class == "ot_shipping") { $RunningTax += (($AddShippingTax / 100) * $ot_value); } elseif ($ot_class == "ot_lev_discount") { $RunningTax += (($AddLevelDiscountTax / 100) * $ot_value); } elseif ($ot_class == "ot_customer_discount") { $RunningTax += (($AddCustomerDiscountTax / 100) * $ot_value); } elseif ($ot_class == "ot_custom") { $RunningTax += (($AddCustomTax / 100) * $ot_value); } elseif ($ot_class == "ot_cod_fee") { $RunningTax += (($AddCustomTax / 100) * $ot_value); }
  4. I want to install this contribution but it is almost impossible to tell which is the best one to install as the contribution seems to have diversified into several different solutions. I can see 1.61 mentioned on this forum but on the contribution download page there is no mention of 1.61. There is a 1.6 and a 1.6a but no 1.61! Also 1.56 seems to still be in active use. Basically I am runnning a UK site for UK domestic orders only. All my order items carry a single tax/VAT rate. I want to be able to add/modify/delete items and override the shipping charges. Any advice from order editor experts welcome!
×
×
  • Create New...