diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index 73811e1ba..a96b5977a 100644 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -310,12 +310,8 @@ class G while (! @is_dir( dirname( end( $folder_path ) ) ) && dirname( end( $folder_path ) ) != '/' && dirname( end( $folder_path ) ) != '.' && dirname( end( $folder_path ) ) != '') { array_push( $folder_path, dirname( end( $folder_path ) ) ); //var_dump($folder_path); die; } - - G::LoadSystem('inputfilter'); - $filter = new InputFilter(); while ($parent_folder_path = array_pop( $folder_path )) { - $parent_folder_path = $filter->validateInput($parent_folder_path,"path"); if (! @is_dir( $parent_folder_path )) { if (! @mkdir( $parent_folder_path, $rights)) { error_log( "Can't create folder \"$parent_folder_path\""); diff --git a/workflow/engine/classes/class.indicatorsCalculator.php b/workflow/engine/classes/class.indicatorsCalculator.php index f33e43ea1..268cdac21 100644 --- a/workflow/engine/classes/class.indicatorsCalculator.php +++ b/workflow/engine/classes/class.indicatorsCalculator.php @@ -75,10 +75,10 @@ class indicatorsCalculator private $userGroupReportingMetadata = array("tableName" => "USR_REPORTING", "keyField" => "PRO_UID"); private $processCategoryReportingMetadata = array("tableName" => "PRO_REPORTING", "keyField" => "PRO_UID"); - private $peiCostFormula = " SUM(case when TOTAL_TIME_BY_TASK >0 then TOTAL_CASES_OUT * CONFIGURED_TASK_TIME - TOTAL_TIME_BY_TASK * USER_HOUR_COST else 0 end)"; + private $peiCostFormula = "USER_HOUR_COST * SUM(case when TOTAL_TIME_BY_TASK >0 then TOTAL_CASES_OUT * CONFIGURED_TASK_TIME - TOTAL_TIME_BY_TASK * USER_HOUR_COST else 0 end)"; private $peiFormula = "SUM(TOTAL_CASES_OUT*CONFIGURED_TASK_TIME) / SUM(SDV_TIME * TOTAL_CASES_OUT + TOTAL_TIME_BY_TASK)"; - private $ueiCostFormula = " SUM(case when TOTAL_TIME_BY_TASK >0 then TOTAL_CASES_OUT * CONFIGURED_TASK_TIME - TOTAL_TIME_BY_TASK * USER_HOUR_COST else 0 end)"; + private $ueiCostFormula = " USER_HOUR_COST * SUM(case when TOTAL_TIME_BY_TASK >0 then TOTAL_CASES_OUT * CONFIGURED_TASK_TIME - TOTAL_TIME_BY_TASK * USER_HOUR_COST else 0 end)"; private $ueiFormula = "SUM(TOTAL_CASES_OUT * CONFIGURED_TASK_TIME) / SUM(TOTAL_TIME_BY_TASK * USER_HOUR_COST)"; public function getSkewOfDataDistribution($table, $field) { diff --git a/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js b/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js index 615b4471f..af9c69969 100644 --- a/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js +++ b/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js @@ -87,40 +87,19 @@ ViewDashboardPresenter.prototype.dashboardIndicatorsViewModel = function(data) { : "normal"; //rounding - newObject.comparative = Math.round(newObject.comparative*1000)/1000; + newObject.comparative = Math.round(newObject.comparative*100)/100; newObject.comparative = ((newObject.comparative > 0)? "+": "") + newObject.comparative; newObject.percentComparative = (newObject.percentComparative != '--') ? '(' + newObject.percentComparative + '%)' : ""; - - - //newObject.value = (newObject.category == "normal") - //? Math.round(newObject.value) + "" - //: Math.round(newObject.value*100)/100 + "" + newObject.percentComparative = (newObject.comparative == 0) + ? "(0%)" + : newObject.percentComparative; newObject.value = that.roundedIndicatorValue(newObject.value); newObject.favorite = 0; - /*newObject.percentageOverdueWidth = Math.round(newObject.percentageOverdue); - newObject.percentageAtRiskWidth = Math.round(newObject.percentageAtRisk); - //to be sure that percentages sum up to 100 (the rounding will lose decimals)% - newObject.percentageOnTimeWidth = 100 - newObject.percentageOverdueWidth - newObject.percentageAtRiskWidth; - - newObject.percentageOverdueToShow = ((newObject.percentageOverdue == null || newObject.percentageOverdue <= 20 ) - ? "" - : newObject.percentageOverdueWidth + "%"); - - newObject.percentageAtRiskToShow = ((newObject.percentageAtRisk == null || newObject.percentageAtRisk == 0) - ? "" - : newObject.percentageAtRiskWidth + "%"); - - newObject.percentageOnTimeToShow = ((newObject.percentageOnTime == 0 - && newObject.percentageAtRisk == 0 - && newObject.percentageOverdue == 0) - ? G_STRING['ID_INBOX'] + ' ' + G_STRING['ID_EMPTY'] - : newObject.percentageOnTimeWidth + "%"); - */ that.setStatusButtonWidthsAndDisplayValues(newObject); newObject.overdueVisibility = (newObject.percentageOverdueWidth > 0) ? "visible" : "hidden"; newObject.atRiskVisibility = (newObject.percentageAtRiskWidth > 0) ? "visible" : "hidden"; @@ -144,10 +123,10 @@ ViewDashboardPresenter.prototype.roundedIndicatorValue = function (value) { if (value == 0) { return "0"; } - if (value > 0 && value < 0.1) { + /*if (value > 0 && value < 0.1) { return "<0.1"; - } - return Math.round(value*100)/100 + "" + }*/ + return Math.round(value*100)/100 + ""; } @@ -288,7 +267,7 @@ ViewDashboardPresenter.prototype.peiViewModel = function(data) { retval.dataToDraw = this.adaptGraphData(graphData); retval.inefficiencyCostToShow = Math.round(retval.inefficiencyCost); - retval.efficiencyIndexToShow = that.roundedIndicatorValue(retval.efficiencyIndex) + retval.efficiencyIndexToShow = that.roundedIndicatorValue(retval.efficiencyIndex); return retval; }; @@ -317,7 +296,7 @@ ViewDashboardPresenter.prototype.ueiViewModel = function(data) { retval.dataToDraw = this.adaptGraphData(graphData); retval.inefficiencyCostToShow = Math.round(retval.inefficiencyCost); - retval.efficiencyIndexToShow = that.roundedIndicatorValue(retval.efficiencyIndex) + retval.efficiencyIndexToShow = that.roundedIndicatorValue(retval.efficiencyIndex); return retval; };