Jump to content

Error Credit Slip Prestashop 1.6.0.14


marco_78
 Share

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:

 

Invoice: 

PRODUCT a = $10

CARRIER = $10

VAT= %22

TOTAL = $24,4

 

CREDIT SLIP TOTAL=$16.39 WRONG

Edited by marco_78 (see edit history)
  • Like 1

Share this post


Link to post
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 1.6.0.10 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 1.6.0.9 (i.e. the latest version just before the changes ) and see if that still works within PS 1.6.0.14. (Make sure you make a backup of the original 1.6.0.14 file!!).

 

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

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

 

 

My 2 cents,

pascal.

 

 

Share this post


Link to post
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 1.6.0.11 had set free shipping for the purchase of certain products. This worked correctly. With the latest version of this is completely ignored

Share this post


Link to post
Share on other sites

Hi marco,

 

Did you manage to use the 1.6.0.9 file into 1.6.0.14 instead, or did this break up other thing?

Just curious if this has been 'solved' for now.

 

Did you report the error?

 

pascal.

Share this post


Link to post
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 1.6.0.11, but nothing changed.
Any idea? Thank you in advance

Chiara

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More