Jump to content

[Huge Bug] Wrong Price/vat Calculations


Recommended Posts

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 by Tomin (see edit history)
Link to comment
Share on other sites

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 by Tomin (see edit history)
Link to comment
Share on other sites

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?

post-293204-0-14390400-1361139388_thumb.png

Link to comment
Share on other sites

  • 4 weeks later...

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 by Dask (see edit history)
  • Like 1
Link to comment
Share on other sites

....

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

  • 2 weeks later...

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 by cocothecat (see edit history)
Link to comment
Share on other sites

  • 8 months later...
  • 1 year later...

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

×
×
  • Create New...