Fixed: wrong customers gender percentage in the admin customer KPI

This commit is contained in:
vishalsingh.qlo325
2024-09-17 18:51:57 +05:30
parent 8c240df052
commit ca0500dbd2

View File

@@ -362,7 +362,7 @@ class AdminStatsControllerCore extends AdminStatsTabController
SELECT SUM(IF(c.id_gender IS NOT NULL, 1, 0)) as total, SUM(IF(type = 0, 1, 0)) as male, SUM(IF(type = 1, 1, 0)) as female, SUM(IF(type = 2, 1, 0)) as neutral
FROM `'._DB_PREFIX_.'customer` c
LEFT JOIN `'._DB_PREFIX_.'gender` g ON c.id_gender = g.id_gender
WHERE c.active = 1 AND c.deleted = 0 '.Shop::addSqlRestriction());
WHERE 1 AND c.deleted = 0 '.Shop::addSqlRestriction());
if (!$row['total']) {
return false;