Skip to content

Commit

Permalink
Merge pull request #22585 from okom3pom/okom3pom-fix-total-ca
Browse files Browse the repository at this point in the history
AdminStats Controller use the good column for total
  • Loading branch information
Progi1984 committed Jan 7, 2021
2 parents 108fb4c + 7712787 commit 993bfd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/admin/AdminStatsController.php
Expand Up @@ -425,7 +425,7 @@ public static function getBestCategory($date_from, $date_to)
LEFT JOIN (
SELECT pr.`id_product`,
IFNULL(SUM(cp.`product_quantity`), 0) AS totalQuantitySold,
IFNULL(SUM(cp.`product_price` * cp.`product_quantity`), 0) / o.conversion_rate AS totalPriceSold
IFNULL(SUM(cp.`unit_price_tax_excl` * cp.`product_quantity`), 0) / o.conversion_rate AS totalPriceSold
FROM `' . _DB_PREFIX_ . 'product` pr
LEFT OUTER JOIN `' . _DB_PREFIX_ . 'order_detail` cp ON pr.`id_product` = cp.`product_id`
LEFT JOIN `' . _DB_PREFIX_ . 'orders` o ON o.`id_order` = cp.`id_order`
Expand Down

0 comments on commit 993bfd0

Please sign in to comment.