Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

Cost Array Use in A...
 
Notifications
Clear all

Cost Array Use in Affectation Replacement

2 Posts
2 Users
0 Reactions
1,936 Views
(@antonio-grr)
Posts: 84
Active Member
Topic starter
 
[#3896]

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.


 
Posted : 05 Dec 2016 14H12
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

Your right :woohoo:
Haweye 😉

Fix will be included in patch V6.0.3


 
Posted : 05 Dec 2016 14H17
Share:

Scroll to Top