JazzMan_Jay Posted August 20, 2005 Share Posted August 20, 2005 Hi Community, well I think there's something weird in the updateNet() function. This function is the one that should gives you the Net price (when you enter the Gross price) in the admin/categories.php, so mostly when you setup a new item in your shop. Here the original code: function updateNet() { var taxRate = getTaxRate(); var netValue = document.forms["new_product"].products_price_gross.value; if (taxRate > 0) { netValue = netValue / ((taxRate / 100) + 1); } well If you try to put 100 EURO with an included tax rate of 16% this function should return..... 84 EURO :D in math: netvalue = 100-16% or 100*0.84 or 100*(100-16)/100 so replace the wrong calculation with : if (taxRate > 0) { netValue = netValue *((100 - taxRate) / 100); } Could someone give a confirmation, I know it's saturday evening.... but...I am here so I am probably not the only one. B) Jazzman_Jay Link to comment Share on other sites More sharing options...
JazzMan_Jay Posted August 20, 2005 Author Share Posted August 20, 2005 too much dr*gs and alk last night.....probably. I just mixed "discount" and taxes.... sorry for this. Hope everybody will forget this post. So no errors or problems in the js functions. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.