[-] 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:
@@ -666,8 +666,10 @@ class OrderCore extends ObjectModel
|
|||||||
WHERE oh.`id_order` = '.(int)($val['id_order']).(!$showHiddenStatus ? ' AND os.`hidden` != 1' : '').'
|
WHERE oh.`id_order` = '.(int)($val['id_order']).(!$showHiddenStatus ? ' AND os.`hidden` != 1' : '').'
|
||||||
ORDER BY oh.`date_add` DESC, oh.`id_order_history` DESC
|
ORDER BY oh.`date_add` DESC, oh.`id_order_history` DESC
|
||||||
LIMIT 1');
|
LIMIT 1');
|
||||||
|
|
||||||
if ($res2)
|
if ($res2)
|
||||||
$res[$key] = array_merge($res[$key], $res2[0]);
|
$res[$key] = array_merge($res[$key], $res2[0]);
|
||||||
|
|
||||||
}
|
}
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
@@ -769,12 +771,18 @@ class OrderCore extends ObjectModel
|
|||||||
if ($this->total_products_wt != '0.00' AND !$products)
|
if ($this->total_products_wt != '0.00' AND !$products)
|
||||||
return $this->total_products_wt;
|
return $this->total_products_wt;
|
||||||
/* Retro-compatibility (now set directly on the validateOrder() method) */
|
/* Retro-compatibility (now set directly on the validateOrder() method) */
|
||||||
|
|
||||||
|
|
||||||
if (!$products)
|
if (!$products)
|
||||||
$products = $this->getProductsDetail();
|
$products = $this->getProductsDetail();
|
||||||
|
|
||||||
$return = 0;
|
$return = 0;
|
||||||
|
|
||||||
foreach ($products AS $row)
|
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);
|
$price = Tools::ps_round($row['product_price'] * (1 + $row['tax_rate'] / 100), 2);
|
||||||
if ($row['reduction_percent'])
|
if ($row['reduction_percent'])
|
||||||
$price -= $price * ($row['reduction_percent'] * 0.01);
|
$price -= $price * ($row['reduction_percent'] * 0.01);
|
||||||
|
|||||||
Reference in New Issue
Block a user