From f0d3ad6b60f9bd9bdf0587b0f76a125f2fcb6ca4 Mon Sep 17 00:00:00 2001 From: fBrignoli Date: Wed, 30 May 2012 13:02:35 +0000 Subject: [PATCH] [-] PDF : After an upgrade, the Invoice's tax tab doesn't use the discounts git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15764 b9a71923-0436-4b27-9f14-aed3839534dd --- install-dev/upgrade/php/migrate_orders.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install-dev/upgrade/php/migrate_orders.php b/install-dev/upgrade/php/migrate_orders.php index 2ebb439e8..f3bc8b0bb 100644 --- a/install-dev/upgrade/php/migrate_orders.php +++ b/install-dev/upgrade/php/migrate_orders.php @@ -299,6 +299,9 @@ function mo_setProductPrices($row, $tax_calculation_method) $row['product_price_wt'] = mo_ps_round($row['product_price_wt'] + $row['ecotax'] * (1 + $row['ecotax_tax_rate'] / 100)); } + if ($tax_calculation_method != PS_TAX_EXC) + $row['product_price'] = $row['product_price_wt'] / (1 + $row['tax_rate'] / 100); + $row['total_wt'] = $row['product_quantity'] * $row['product_price_wt']; $row['total_price'] = $row['product_quantity'] * $row['product_price'];