Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stats/statsbestmanufacturers.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public function getTotalCount()
*/
public function getData($layers = null)
{
$query = 'SELECT m.name, SUM(od.product_quantity) AS quantity, ROUND(SUM(od.product_quantity * od.product_price) / c.conversion_rate, 2) AS sales
$query = 'SELECT m.name, SUM(od.product_quantity) AS quantity, ROUND(SUM(od.product_quantity * od.product_price / c.conversion_rate), 2) AS sales
FROM ' . _DB_PREFIX_ . 'order_detail od
LEFT JOIN ' . _DB_PREFIX_ . 'product p ON p.id_product = od.product_id
LEFT JOIN ' . _DB_PREFIX_ . 'orders o ON o.id_order = od.id_order
Expand Down
2 changes: 1 addition & 1 deletion stats/statsbestsuppliers.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function getTotalCount()
*/
public function getData($layers = null)
{
$query = 'SELECT s.name, SUM(od.product_quantity) AS quantity, ROUND(SUM(od.product_quantity * od.product_price) / o.conversion_rate, 2) AS sales
$query = 'SELECT s.name, SUM(od.product_quantity) AS quantity, ROUND(SUM(od.product_quantity * od.product_price / o.conversion_rate), 2) AS sales
FROM ' . _DB_PREFIX_ . 'order_detail od
LEFT JOIN ' . _DB_PREFIX_ . 'product p ON p.id_product = od.product_id
LEFT JOIN ' . _DB_PREFIX_ . 'orders o ON o.id_order = od.id_order
Expand Down
2 changes: 1 addition & 1 deletion stats/statsbestvouchers.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function hookAdminStatsModules()
public function getData($layers = null)
{
$currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
$this->query = 'SELECT cr.code, ocr.name, COUNT(ocr.id_cart_rule) AS total, ROUND(SUM(o.total_paid_real) / o.conversion_rate,2) AS ca
$this->query = 'SELECT cr.code, ocr.name, COUNT(ocr.id_cart_rule) AS total, ROUND(SUM(o.total_paid_real / o.conversion_rate),2) AS ca
FROM ' . _DB_PREFIX_ . 'order_cart_rule ocr
LEFT JOIN ' . _DB_PREFIX_ . 'orders o ON o.id_order = ocr.id_order
LEFT JOIN ' . _DB_PREFIX_ . 'cart_rule cr ON cr.id_cart_rule = ocr.id_cart_rule
Expand Down