FIX Sql error on stat by referring entries of a product

This commit is contained in:
Laurent Destailleur 2020-07-30 19:14:40 +02:00
parent 0bf678e09e
commit e7fedd5c2d

View File

@ -3603,7 +3603,7 @@ class Product extends CommonObject
$sql = "SELECT sum(d.qty), date_format(d.date_valid, '%Y%m')";
if ($mode == 'bynumber') {
$sql .= ", count(DISTINCT c.rowid)";
$sql .= ", count(DISTINCT d.rowid)";
}
$sql .= " FROM ".MAIN_DB_PREFIX."mrp_mo as d LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON d.fk_soc = s.rowid";
if ($filteronproducttype >= 0) {