Skip to content

Commit

Permalink
Merge pull request #2157 from altatof/fix_margin_jalon
Browse files Browse the repository at this point in the history
FIX: avoid milestones in margin calculation
  • Loading branch information
eldy committed Dec 18, 2014
2 parents fbb25ea + a4a1a99 commit 6154563
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions htdocs/margin/agentMargins.php
Expand Up @@ -119,6 +119,7 @@
$sql.= ", ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE f.fk_soc = s.rowid";
$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))
$sql.= " AND ((e.fk_socpeople IS NULL AND sc.fk_user = u.rowid) OR (e.fk_socpeople IS NOT NULL AND e.fk_socpeople = u.rowid))";
else
Expand Down
1 change: 1 addition & 0 deletions htdocs/margin/customerMargins.php
Expand Up @@ -173,6 +173,7 @@
$sql.= " AND f.fk_statut > 0";
$sql.= " AND s.entity = ".$conf->entity;
$sql.= " AND d.fk_facture = f.rowid";
$sql.= " AND (d.product_type = 0 OR d.product_type = 1)";
if ($client)
$sql.= " AND f.fk_soc = ".$socid;
if (!empty($startdate))
Expand Down

0 comments on commit 6154563

Please sign in to comment.