Commit 98c2ed0b authored by Frank Bergmann's avatar Frank Bergmann

- Now rounding Work to 2 decimals

parent 3f5dbaab
...@@ -197,6 +197,9 @@ Ext.define('PO.view.gantt.GanttTreePanel', { ...@@ -197,6 +197,9 @@ Ext.define('PO.view.gantt.GanttTreePanel', {
var planned_units = model.get('planned_units'); var planned_units = model.get('planned_units');
if (0 == model.childNodes.length) { if (0 == model.childNodes.length) {
// A leaf task - just show the units // A leaf task - just show the units
if ("" == planned_units) return "";
var pu = parseFloat(planned_units);
if ("number" == typeof pu) { planned_units = Math.round(100.0 * pu) / 100.0 }
if ("" != planned_units) { planned_units = planned_units + "h"; } if ("" != planned_units) { planned_units = planned_units + "h"; }
return planned_units; return planned_units;
} else { } else {
...@@ -213,6 +216,8 @@ Ext.define('PO.view.gantt.GanttTreePanel', { ...@@ -213,6 +216,8 @@ Ext.define('PO.view.gantt.GanttTreePanel', {
} }
} }
}); });
var pu = parseFloat(plannedUnits);
if ("number" == typeof pu) { plannedUnits = Math.round(100.0 * pu) / 100.0 }
return "<b>"+plannedUnits+"h</b>"; return "<b>"+plannedUnits+"h</b>";
} }
}}, }},
...@@ -323,7 +328,7 @@ Ext.define('PO.view.gantt.GanttTreePanel', { ...@@ -323,7 +328,7 @@ Ext.define('PO.view.gantt.GanttTreePanel', {
store: 'taskCostCenterStore', store: 'taskCostCenterStore',
displayField: 'cost_center_name', displayField: 'cost_center_name',
valueField: 'cost_center_id', valueField: 'cost_center_id',
matchFieldWidth: false matchFieldWidth: false
}, },
renderer: function(value) { renderer: function(value) {
if ("" == value) return ""; if ("" == value) return "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment