FIX : margin tab on customer card must filter on current entity invoices

This commit is contained in:
gauthier 2016-10-21 12:40:19 +02:00
parent 87e8ac51be
commit a814e02d53

View File

@ -152,7 +152,7 @@ if ($socid > 0)
$sql.= ", ".MAIN_DB_PREFIX."facturedet as d";
$sql.= " WHERE f.fk_soc = s.rowid";
$sql.= " AND f.fk_statut > 0";
$sql.= " AND s.entity = ".$conf->entity;
$sql.= " AND f.entity = ".$conf->entity;
$sql.= " AND d.fk_facture = f.rowid";
$sql.= " AND f.fk_soc = $socid";
$sql.= " AND d.buy_price_ht IS NOT NULL";