mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
added error if starttime is after endtime, which would lead to negative times
This commit is contained in:
parent
9ab93a73a2
commit
9a0352e28c
@ -91,7 +91,7 @@ class uitimesheet extends botimesheet
|
||||
{
|
||||
$content['ts_start'] += $content['end_time'] - 60*$content['ts_duration'];
|
||||
}
|
||||
if ($content['ts_duration']) unset($content['end_time']);
|
||||
if ($content['ts_duration'] > 0) unset($content['end_time']);
|
||||
// now we only deal with start (date+time) and duration
|
||||
list($button) = @each($content['button']);
|
||||
$view = $content['view'];
|
||||
@ -118,6 +118,10 @@ class uitimesheet extends botimesheet
|
||||
{
|
||||
$etpl->set_validation_error('ts_quantity',lang('Field must not be empty !!!'));
|
||||
}
|
||||
if ($this->data['ts_quantity'] < 0)
|
||||
{
|
||||
$etpl->set_validation_error('ts_quantity',lang('Starttime has to be before endtime !!!'));
|
||||
}
|
||||
if (!$this->data['ts_project']) $this->data['ts_project'] = $this->data['ts_project_blur'];
|
||||
if (!$this->data['ts_title']) $this->data['ts_title'] = $this->data['ts_title_blur'];
|
||||
if (!$this->data['ts_title'])
|
||||
|
@ -39,6 +39,7 @@ select a price timesheet de Preis ausw
|
||||
select a project timesheet de Projekt auswählen
|
||||
start timesheet de Start
|
||||
starttime timesheet de Startzeit
|
||||
starttime has to be before endtime !!! timesheet de Startzeit muss vor der Endzeit liegen !!!
|
||||
sum %1: timesheet de Summe %1:
|
||||
this month timesheet de Diesen Monat
|
||||
this week timesheet de Diese Woche
|
||||
|
@ -39,6 +39,7 @@ select a price timesheet en Select a price
|
||||
select a project timesheet en Select a project
|
||||
start timesheet en Start
|
||||
starttime timesheet en Starttime
|
||||
starttime has to be before endtime !!! timesheet en Starttime has to be before endtime !!!
|
||||
sum %1: timesheet en Sum %1:
|
||||
this month timesheet en This month
|
||||
this week timesheet en This week
|
||||
|
Loading…
Reference in New Issue
Block a user