Fix #15383
This commit is contained in:
parent
7fc050e3ce
commit
e08f6aeb2b
@ -104,6 +104,9 @@ class box_funnel_of_prospection extends ModeleBoxes
|
|||||||
case 'NEGO':
|
case 'NEGO':
|
||||||
$colorseriesstat[$objp->rowid] = $badgeStatus4;
|
$colorseriesstat[$objp->rowid] = $badgeStatus4;
|
||||||
break;
|
break;
|
||||||
|
case 'WON':
|
||||||
|
$colorseriesstat[$objp->rowid] = $badgeStatus6;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$colorseriesstat[$objp->rowid] = $badgeStatus2;
|
$colorseriesstat[$objp->rowid] = $badgeStatus2;
|
||||||
break;
|
break;
|
||||||
@ -127,7 +130,7 @@ class box_funnel_of_prospection extends ModeleBoxes
|
|||||||
$sql .= " WHERE p.entity IN (" . getEntity('project') . ")";
|
$sql .= " WHERE p.entity IN (" . getEntity('project') . ")";
|
||||||
$sql .= " AND p.fk_opp_status = cls.rowid";
|
$sql .= " AND p.fk_opp_status = cls.rowid";
|
||||||
$sql .= " AND p.fk_statut = 1"; // Opend projects only
|
$sql .= " AND p.fk_statut = 1"; // Opend projects only
|
||||||
$sql .= " AND cls.code NOT IN ('WON', 'LOST')";
|
$sql .= " AND cls.code NOT IN ('LOST')";
|
||||||
$sql .= " GROUP BY p.fk_opp_status, cls.code";
|
$sql .= " GROUP BY p.fk_opp_status, cls.code";
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
@ -151,9 +154,11 @@ class box_funnel_of_prospection extends ModeleBoxes
|
|||||||
$valsamount[$obj->opp_status] = $obj->opp_amount;
|
$valsamount[$obj->opp_status] = $obj->opp_amount;
|
||||||
$totalnb += $obj->nb;
|
$totalnb += $obj->nb;
|
||||||
if ($obj->opp_status) $totaloppnb += $obj->nb;
|
if ($obj->opp_status) $totaloppnb += $obj->nb;
|
||||||
|
if (!in_array($obj->code, array('WON', 'LOST'))) {
|
||||||
$totalamount += $obj->opp_amount;
|
$totalamount += $obj->opp_amount;
|
||||||
$ponderated_opp_amount += $obj->ponderated_opp_amount;
|
$ponderated_opp_amount += $obj->ponderated_opp_amount;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
@ -164,7 +169,7 @@ class box_funnel_of_prospection extends ModeleBoxes
|
|||||||
$listofstatus = array_keys($listofoppstatus);
|
$listofstatus = array_keys($listofoppstatus);
|
||||||
foreach ($listofstatus as $status) {
|
foreach ($listofstatus as $status) {
|
||||||
$labelStatus = '';
|
$labelStatus = '';
|
||||||
if ($status != 7 && $status != 6) {
|
if ($status != 7) {
|
||||||
$code = dol_getIdFromCode($this->db, $status, 'c_lead_status', 'rowid', 'code');
|
$code = dol_getIdFromCode($this->db, $status, 'c_lead_status', 'rowid', 'code');
|
||||||
if ($code) $labelStatus = $langs->transnoentitiesnoconv("OppStatus" . $code);
|
if ($code) $labelStatus = $langs->transnoentitiesnoconv("OppStatus" . $code);
|
||||||
if (empty($labelStatus)) $labelStatus = $listofopplabel[$status];
|
if (empty($labelStatus)) $labelStatus = $listofopplabel[$status];
|
||||||
|
|||||||
@ -544,7 +544,6 @@ CREATE TABLE llx_session(
|
|||||||
|
|
||||||
|
|
||||||
INSERT INTO llx_boxes_def(file,entity) VALUES ('box_funnel_of_prospection.php',1);
|
INSERT INTO llx_boxes_def(file,entity) VALUES ('box_funnel_of_prospection.php',1);
|
||||||
INSERT INTO llx_boxes (box_id, position, box_order, maxline, params) VALUES ((SELECT b.rowid FROM llx_boxes_def as b WHERE file = 'box_funnel_of_prospection.php'), 0, 0, NULL, NULL);
|
|
||||||
|
|
||||||
INSERT INTO llx_boxes_def(file, entity) VALUES ('box_customers_outstanding_bill_reached.php', 1);
|
INSERT INTO llx_boxes_def(file, entity) VALUES ('box_customers_outstanding_bill_reached.php', 1);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user