From a8088acfe006c0896e7559ff3531a11164557a10 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 10 Sep 2014 11:02:26 +0000 Subject: [PATCH] Change automatically calculated quantity and list quantity to 2 decimal places --- timesheet/inc/class.timesheet_ui.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/timesheet/inc/class.timesheet_ui.inc.php b/timesheet/inc/class.timesheet_ui.inc.php index 224a663551..0ea90da19c 100644 --- a/timesheet/inc/class.timesheet_ui.inc.php +++ b/timesheet/inc/class.timesheet_ui.inc.php @@ -175,7 +175,7 @@ class timesheet_ui extends timesheet_bo case 'apply': if ((!$this->data['ts_quantity'] || $this->ts_viewtype == 'short') && $this->data['ts_duration']) // set the quantity (in h) from the duration (in min) { - $this->data['ts_quantity'] = $this->data['ts_duration'] / 60.0; + $this->data['ts_quantity'] = round($this->data['ts_duration'] / 60.0, 2); } if (!$this->data['ts_quantity']) { @@ -733,6 +733,10 @@ class timesheet_ui extends timesheet_bo $row['titleClass'] = 'timesheet_titleSum'; continue; } + if($row['ts_quantity']) + { + $row['ts_quantity'] = round($row['ts_quantity'], 2); + } if (!$this->check_acl(EGW_ACL_EDIT,$row)) { $row['class'] .= ' rowNoEdit ';