Merge pull request #799 from Lupul/development
[-] BO : Fixed Bug what displayed Dashboard sales statistics in wrong currency
This commit is contained in:
@@ -303,7 +303,7 @@ class AdminHomeControllerCore extends AdminController
|
||||
|
||||
public function getMonthlyStatistics()
|
||||
{
|
||||
$currency = Tools::setCurrency($this->context->cookie);
|
||||
$currency = Tools::setCurrency((object)array('id_currency' => null));
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
||||
SELECT IFNULL(SUM(`total_paid_real` / conversion_rate), "0") as total_sales, COUNT(*) as total_orders
|
||||
FROM `'._DB_PREFIX_.'orders`
|
||||
@@ -400,7 +400,7 @@ class AdminHomeControllerCore extends AdminController
|
||||
$chart->getCurve(1)->setPoint(strtotime($row['invoice_date'].' 02:00:00'), $row['total_converted']);
|
||||
$chart->setSize(580, 170);
|
||||
$chart->setTimeMode(strtotime('-7 DAYS', time()), time(), 'd');
|
||||
$currency = Tools::setCurrency($this->context->cookie);
|
||||
$currency = Tools::setCurrency((object)array('id_currency' => null));
|
||||
$chart->getCurve(1)->setLabel($this->l('Sales + Tax').' ('.strtoupper($currency->iso_code).')');
|
||||
|
||||
$content .= $chart->fetch();
|
||||
|
||||
Reference in New Issue
Block a user