diff --git a/module/common/model.php b/module/common/model.php index e94433adf3..132219d686 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -48,6 +48,10 @@ class commonModel extends model { global $app; $rawModule = $app->rawModule; + $rawMethod = strtolower($app->rawMethod); + + if($rawModule == 'marketresearch' and strpos($rawMethod, 'task') !== false) $rawModule = 'task'; + if($rawModule == 'marketresearch' and strpos($rawMethod, 'stage') !== false) $rawModule = 'execution'; if($rawModule == 'task' or $rawModule == 'effort') { @@ -56,7 +60,7 @@ class commonModel extends model $project = $this->syncProjectStatus($execution); $this->syncProgramStatus($project); } - if($rawModule == 'execution' or $rawModule == 'marketresearch') + if($rawModule == 'execution') { $executionID = $objectID; $execution = $this->dao->select('id, project, grade, parent, status, deleted')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->fetch(); diff --git a/module/program/model.php b/module/program/model.php index c7eb4731d2..9cfdc86cf2 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -1388,7 +1388,7 @@ class programModel extends model foreach($teamMembers as $projectID => $teamCount) { - if(!isset($stats[$projectID])) $stats[$projectID] = array('totalEstimate' => 0, 'totalConsumed' => 0, 'totalLeft' => 0, 'teamCount' => 0); + if(!isset($stats[$projectID])) $stats[$projectID] = array('totalEstimate' => 0, 'totalConsumed' => 0, 'totalLeft' => 0, 'teamCount' => 0, 'totalConsumedNotDel' => 0, 'totalLeftNotDel' => 0); $stats[$projectID]['teamCount'] = $teamCount; }