Quantcast
Channel: ProjeQtOr free project management software - ProjeQtOr free project management software - Recent Topics - ProjeQtOr
Viewing all articles
Browse latest Browse all 6784

Cost Array Use in Affectation Replacement - by: antonio.grr

$
0
0
Hi,
in saveAffectationReplacement I see the following lines
================
$costArray=array();
$defaultRole=$resObj->idRole;
$defaultCost=0;
if (count($costArray)>0) {
foreach ($rcList as $rc) {
$costArray[$rc->idRole]=$rc->cost;
if ($rc->idRole==$defaultRole) {
$defaultCost=$rc->cost;
}
$last=$rc->idRole;
}
if (!$defaultCost) {
$defaultRole=$last;
$defaultCost=$costArray[$defaultRole];
}
}
===================
I think that testing count($costArray)>0 will always result false. May be you want to test count($rcList)>0 ?
Best regards.

Viewing all articles
Browse latest Browse all 6784

Trending Articles