Fixed bug with simple timesheet view mode and the unused quantity field

This commit is contained in:
Andreas Stöckel 2010-06-28 13:35:10 +00:00
parent 30ce9afd8b
commit f096249cab

View File

@ -158,7 +158,7 @@ class timesheet_ui extends timesheet_bo
case 'save':
case 'save_new':
case 'apply':
if (!$this->data['ts_quantity'] && $this->data['ts_duration']) // set the quantity (in h) from the duration (in min)
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;
}