Jump to content

Error Credit Slip Prestashop


Recommended Posts

If you try to generate a credit note you will find that the same will never be equal to the invoice. Let me explain. The credit note generated consider the price of the products excluding taxes, without multiplying by the VAT tax. Consequently all taxable and the totals of the credit note will always be wrong.


For Example:



PRODUCT a = $10


VAT= %22

TOTAL = $24,4



Edited by marco_78 (see edit history)
  • Like 1
Link to comment
Share on other sites

Hi marco,


OK, so it seems like it divides, instead of multiplies by the tax:

    (10+10)/1.22 =16.39 instead of (10+10)*1.22 = 24.4


as you probably know already by now, in1.6.0.10 PrestaShop started to use a new function for calculating the credit slip values (see classes/order/OrderSlip.php.


Before they used to use a function :

  public static function createOrderSlip($order, $productList, $qtyList, $shipping_cost = false)

which is now marked as deprecated, and we now should use a function:
  public static function create(Order $order, $product_list, $shipping_cost = false, $amount = 0, $amount_choosen = false, $add_tax = true)

Apparently in the new function, which is exceedingly 'mysterious' with all it's "dynamic variables" things are mixed up.



I suggest to add it to the issues (error) reporting system of prestashop: forge.prestashop.com, and explain (preferably with a clear example how to re-create the error) and let the PrestaTeam have a look at it. They normally don't look too much at the forum, but do look at issues posted at forge.



In the mean time, you could try to use the classes/order/OrderSlip.php of (i.e. the latest version just before the changes ) and see if that still works within PS (Make sure you make a backup of the original file!!).


I'll add the classes/order.OrderSlip.php here. Maybe give it a try.

OrderSlip.php of PrestaShop 1-6-0-9.zip



My 2 cents,




Link to comment
Share on other sites

Thank you PascalVG!!!


Unfortunately the latest version of prestashop do suffer from many bugs. I've had already corrected 3. The first rigarda class pack.php. In fact the package was displayed only one product.
Another problem that you point out is this. If you set the rules of carriage, these are completely ingnorate. Indeed Version had set free shipping for the purchase of certain products. This worked correctly. With the latest version of this is completely ignored
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Hello everyone and sorry for bother you...is anyone still have this issue? I'm trying to solve this problem but nothing seems right.
I also tryed the solution right above, replace the orderslip.php file with the one from version, but nothing changed.
Any idea? Thank you in advance


Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...