Skip to content
Snippets Groups Projects
Commit 2cedcfec authored by arnaud's avatar arnaud
Browse files

FIX bug margin calcul by user with multicompany

parent c953ae2a
Branches
Tags
No related merge requests found
...@@ -126,6 +126,7 @@ $sql.= ", ".MAIN_DB_PREFIX."facturedet as d"; ...@@ -126,6 +126,7 @@ $sql.= ", ".MAIN_DB_PREFIX."facturedet as d";
$sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= ", ".MAIN_DB_PREFIX."user as u"; $sql.= ", ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE f.fk_soc = s.rowid"; $sql.= " WHERE f.fk_soc = s.rowid";
$sql.= " AND f.entity = ".$conf->entity;
$sql.= " AND sc.fk_soc = f.fk_soc"; $sql.= " AND sc.fk_soc = f.fk_soc";
$sql.= " AND (d.product_type = 0 OR d.product_type = 1)"; $sql.= " AND (d.product_type = 0 OR d.product_type = 1)";
if (! empty($conf->global->AGENT_CONTACT_TYPE)) if (! empty($conf->global->AGENT_CONTACT_TYPE))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment