[-] FO : Notice undefined tax_rate
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9301 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
543c42430c
commit
2d0bd337b5
1 file changed
+8
@@ -666,8 +666,10 @@ class OrderCore extends ObjectModel
|
||||
WHERE oh.`id_order` = '.(int)($val['id_order']).(!$showHiddenStatus ? ' AND os.`hidden` != 1' : '').'
|
||||
ORDER BY oh.`date_add` DESC, oh.`id_order_history` DESC
|
||||
LIMIT 1');
|
||||
|
||||
if ($res2)
|
||||
$res[$key] = array_merge($res[$key], $res2[0]);
|
||||
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
@@ -769,12 +771,18 @@ class OrderCore extends ObjectModel
|
||||
if ($this->total_products_wt != '0.00' AND !$products)
|
||||
return $this->total_products_wt;
|
||||
/* Retro-compatibility (now set directly on the validateOrder() method) */
|
||||
|
||||
|
||||
if (!$products)
|
||||
$products = $this->getProductsDetail();
|
||||
|
||||
$return = 0;
|
||||
|
||||
foreach ($products AS $row)
|
||||
{
|
||||
if (!isset($row['tax_rate']))
|
||||
$row['tax_rate'] = 0;
|
||||
|
||||
$price = Tools::ps_round($row['product_price'] * (1 + $row['tax_rate'] / 100), 2);
|
||||
if ($row['reduction_percent'])
|
||||
$price -= $price * ($row['reduction_percent'] * 0.01);
|
||||
|
||||
Reference in new issue
Block a user