Tomin Posted February 17, 2013 Share Posted February 17, 2013 (edited) Hi, help to change the invoice and the way prices are displayed on it. I need to have prices per unit without tax (this price with 3-6 decimals) and TOTAL (without tax) for Products Example: PRODUCT UNIT PRICE QTY TOTAL (without tax) product A 1.4556 per unit without tax, 10 pieces - TOTAL(without tax) 14.5560 product B 0.7228 per unit without tax, 17 pieces - TOTAL (without tax) 12.2876 product C 0.05522 per unit without tax, 15 pieces - TOTAL 0.8283 Total without tax: 27.67 (rounded from 27.6719) Tax 21%: 5.81 (total with tax rounded minus rounded total without tax) Total with tax: 33.48 (Total without tax + 21% , rounded from 33.4807) It's 1.5.3.1 and still invoice/tax calculations are wrong................... At the bottom of invoice, if discounts are added for customer from BO, calculation of "Total TAX Excl" is correct, "Total Tax" is wrong without calculation of discount. Edited March 12, 2013 by Tomin (see edit history) Link to comment Share on other sites More sharing options...
Tomin Posted February 17, 2013 Author Share Posted February 17, 2013 (edited) It's just impossible.. Seems that PS 1.5 everything is calculating really wrong. Edited February 17, 2013 by Tomin (see edit history) Link to comment Share on other sites More sharing options...
Tomin Posted February 17, 2013 Author Share Posted February 17, 2013 (edited) Yeah, tested with other product price values. Seems that problem is caused by decimal amount used. If we put final price 0.06 (incl VAT 21%), it's calculated as 0.049587 price without TAX in back office and after saving product saved as 0.05. If I put 0.05 without tax, nothing changes on invoice and final price. Looks like that there is big problem in algorithm how prices and VAT is calculated in prestashop - it's using xx,yy in calculations instead of xxyy/100 EDITED: need some similar solution for 1.5 like here for 1.4 http://www.prestasho...thout-rounding/ Edited February 17, 2013 by Tomin (see edit history) Link to comment Share on other sites More sharing options...
Tomin Posted February 17, 2013 Author Share Posted February 17, 2013 yeah, this bug appears on frontoffice as well. See attached file, VAT 21% Link to comment Share on other sites More sharing options...
Tomin Posted February 17, 2013 Author Share Posted February 17, 2013 this is insane, can't believe that no one had/has these problems... managed to get correct calculations on FO cart and invoice as well. You need to change price display method from "Tax included" to "Tax excluded" customer groups for each group. So problem now is - How to get prices in front office with VAT and correct VAT calculation on cart and invoice? Link to comment Share on other sites More sharing options...
maio Posted March 12, 2013 Share Posted March 12, 2013 Hi, I'm having the same problem, did you figure out anything? Link to comment Share on other sites More sharing options...
Tomin Posted March 12, 2013 Author Share Posted March 12, 2013 (edited) No, later I noticed wrong tax calculation also if prices are showed TAX EXCL in front office. Same if I do order in BO. Now I see same bug on 1.5.4RC as well (will check with fresh DB and new products later, but.... ) Edited March 12, 2013 by Tomin (see edit history) Link to comment Share on other sites More sharing options...
Dask Posted March 12, 2013 Share Posted March 12, 2013 (edited) I had the same problem - then I just deactivated all rounding in classes/Product.php:function priceCalculation This is one of the stupidest things I have ever seen in a piece of e-commerce software. Prestashop 1.5 convinced me to never ever create another project with Prestashop again. The amount of weirdly stupid design decisions made with this is becoming unbearable. Edited March 12, 2013 by Dask (see edit history) 1 Link to comment Share on other sites More sharing options...
Tomin Posted March 12, 2013 Author Share Posted March 12, 2013 Same problem on 1.5.4RC http://www.prestashop.com/forums/topic/230149-testing-only-154-rc-available-testing-only/page__pid__1140194__st__60#entry1140194 Link to comment Share on other sites More sharing options...
Tomin Posted March 12, 2013 Author Share Posted March 12, 2013 I had the same problem - then I just deactivated all rounding in classes/Product.php:function priceCalculation did it helped? can you attach file? Link to comment Share on other sites More sharing options...
maio Posted March 13, 2013 Share Posted March 13, 2013 .... This is one of the stupidest things I have ever seen in a piece of e-commerce software. Prestashop 1.5 convinced me to never ever create another project with Prestashop again. The amount of weirdly stupid design decisions made with this is becoming unbearable. What other CMS have you used for e-commerce? actually I'm pretty satisfied with Prestashop (eventually I always find a workaround) but I don't have that much experience with others systems.. Link to comment Share on other sites More sharing options...
Martin C Posted March 13, 2013 Share Posted March 13, 2013 The best to do is report this issue at the forge Link to comment Share on other sites More sharing options...
Tomin Posted March 13, 2013 Author Share Posted March 13, 2013 done all-ready Link to comment Share on other sites More sharing options...
Tomin Posted March 14, 2013 Author Share Posted March 14, 2013 BUMP again Link to comment Share on other sites More sharing options...
mrotacon Posted March 23, 2013 Share Posted March 23, 2013 (edited) What is the current workaround for this? Just to comment out the round on tax, so: // $price = Tools::ps_round($price, $decimals); ? Do I need to change anywhere else? Edited March 23, 2013 by mrotacon (see edit history) Link to comment Share on other sites More sharing options...
cocothecat Posted March 24, 2013 Share Posted March 24, 2013 (edited) Did you put a comma in for the decimal point or did presta? Might just be confusing a "," with "." just a shot in the dark... Looking at it after testing my end, your right anything that starts as a negative so 0.X the rule does not seem to calculate correctly id find the tax rule within prestashop and just change how it calculates the vat rule by no doubt removing the divide comment and replacing with TOTAL*1.VAT Edited March 24, 2013 by cocothecat (see edit history) Link to comment Share on other sites More sharing options...
Onedirection Posted March 28, 2013 Share Posted March 28, 2013 Hi, Do you Have THE soluties for thuis problem already? I have THE Same problem. Thanks for letting me know. Link to comment Share on other sites More sharing options...
mrotacon Posted March 28, 2013 Share Posted March 28, 2013 Aye - I solved the issue on our site. Please see: THIS THREAD Link to comment Share on other sites More sharing options...
eleazar Posted December 9, 2013 Share Posted December 9, 2013 For a solution see my post here: http://www.prestashop.com/forums/topic/235504-tax-is-calculated-wrong-in-prestashop-it-has-to-be-not-just-me-but-everyone/?do=findComment&comment=1486919 Link to comment Share on other sites More sharing options...
beethika Posted December 8, 2015 Share Posted December 8, 2015 I am facing a little wonder problem, i created around 1000 products through CSV import with specific discount on each and every product.. Every things perfect and working fine ...BUT WHEN I AGAIN CREATED SOME MORE PRODUCTS THROUGH CSV IMPORT...THE DISCOUNT ON EVERY PRODUCTS GETS DISABLED AND NO DISCOUNT MAINTAINING FOR ALL OF THE PRODUCTS..PLEASE RESOLVE THE PROBLEM AND PROVIDE ME A SOLUTIONS.THANX IN ADVANCE Link to comment Share on other sites More sharing options...
Recommended Posts