From d425ee9563074af61da3d4da9f75b5a05864620b Mon Sep 17 00:00:00 2001 From: dMetzger Date: Mon, 10 Sep 2012 08:27:38 +0000 Subject: [PATCH] // Fixed first part of bug #PSCFV-3857 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17250 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Chart.php | 2 +- controllers/admin/AdminHomeController.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/classes/Chart.php b/classes/Chart.php index 8885e1c7e..3bffdb3d6 100644 --- a/classes/Chart.php +++ b/classes/Chart.php @@ -166,7 +166,7 @@ class Curve { $this->type = ''; if ($type == 'bars') - $this->type = 'bars:{show:true}'; + $this->type = 'bars:{show:true,lineWidth:10}'; if ($type == 'steps') $this->type = 'lines:{show:true,steps:true}'; } diff --git a/controllers/admin/AdminHomeController.php b/controllers/admin/AdminHomeController.php index 8121a6990..c2fdcb536 100644 --- a/controllers/admin/AdminHomeController.php +++ b/controllers/admin/AdminHomeController.php @@ -373,15 +373,16 @@ class AdminHomeControllerCore extends AdminController
'; $chart = new Chart(); + $chart->getCurve(1)->setType('bars'); $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' - SELECT total_paid / conversion_rate as total_converted, invoice_date + SELECT total_paid / conversion_rate as total_converted, left(invoice_date, 10) as invoice_date FROM '._DB_PREFIX_.'orders o WHERE valid = 1 AND invoice_date BETWEEN \''.date('Y-m-d', strtotime('-7 DAYS', time())).' 00:00:00\' AND \''.date('Y-m-d H:i:s').'\' '.Shop::addSqlRestriction(Shop::SHARE_ORDER).' '); foreach ($result as $row) - $chart->getCurve(1)->setPoint(strtotime($row['invoice_date']), $row['total_converted']); + $chart->getCurve(1)->setPoint(strtotime($row['invoice_date'].' 14:00:00'), $row['total_converted']); $chart->setSize(580, 170); $chart->setTimeMode(strtotime('-7 DAYS', time()), time(), 'd'); $currency = Tools::setCurrency($this->context->cookie);