marco_78 Posted April 12, 2015 Share Posted April 12, 2015 (edited) 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 April 12, 2015 by marco_78 (see edit history) 1 Link to comment Share on other sites More sharing options...
PascalVG Posted April 12, 2015 Share Posted April 12, 2015 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. Link to comment Share on other sites More sharing options...
marco_78 Posted April 12, 2015 Author Share Posted April 12, 2015 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 Link to comment Share on other sites More sharing options...
PascalVG Posted April 13, 2015 Share Posted April 13, 2015 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. Link to comment Share on other sites More sharing options...
marco_78 Posted April 13, 2015 Author Share Posted April 13, 2015 Hi Pascal Thanks! I have solved with orderslip.php -> prestashop 1.6.0.11 In practice I replaced this file with the functioning of version 1.6.0.11. Now it seems to work properly Link to comment Share on other sites More sharing options...
PascalVG Posted April 13, 2015 Share Posted April 13, 2015 Perfect, thanks for the feedback! Link to comment Share on other sites More sharing options...
pevoct Posted May 21, 2015 Share Posted May 21, 2015 (edited) Hello, I have the same problem, where can I download the prestashop 1.6.0.11 version? EDIT: or can someone please just post the code of the orderslip.php page? Edited May 21, 2015 by shopcommetoi (see edit history) Link to comment Share on other sites More sharing options...
PascalVG Posted May 22, 2015 Share Posted May 22, 2015 Old version here: https://www.prestashop.com/en/developers-versions 1 Link to comment Share on other sites More sharing options...
chiarapromos Posted July 14, 2015 Share Posted July 14, 2015 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 advanceChiara Link to comment Share on other sites More sharing options...
konder82 Posted October 6, 2015 Share Posted October 6, 2015 Hi, Big thanks for Eric Rouvier his fix works for me. http://forge.prestashop.com/browse/PSCSX-4881 if not and you have PS 1.6.1.0 additionally have to insert 2 lines (49+50) in OrderSlip.php as attached. Best Regards, OrderSlip.php Link to comment Share on other sites More sharing options...
vucumbra Posted December 30, 2016 Share Posted December 30, 2016 2017 i have the same error ps 1.6.1.10My prestashop alredy have this update but i have this error....how fix Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now