Merge pull request #6309 from atm-arnaud/FIX_calcul_marge_by_user_with_multicompany

FIX bug margin calcul by user with multicompany
This commit is contained in:
Laurent Destailleur 2017-01-20 17:46:56 +01:00 committed by GitHub
commit a47f3cb0e5

View File

@ -126,6 +126,7 @@ $sql.= ", ".MAIN_DB_PREFIX."facturedet as d";
$sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= ", ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE f.fk_soc = s.rowid";
$sql.= " AND f.entity = ".$conf->entity;
$sql.= " AND sc.fk_soc = f.fk_soc";
$sql.= " AND (d.product_type = 0 OR d.product_type = 1)";
if (! empty($conf->global->AGENT_CONTACT_TYPE))