Zeiterfassung update
* Kalender Implementation * Dienstreise Funktionalitäten
This commit is contained in:
@@ -150,6 +150,22 @@ class TimerecordingController extends mfBaseController
|
||||
$data['end'] = $endtime;
|
||||
$data['timerecordingCategory_id'] = trim($r->timerecordingCategory_id);
|
||||
$data['comment'] = trim($r->comment);
|
||||
$data['businesstrip'] = $r->businesstrip;
|
||||
$data['businesstrip_info'] = $r->businesstrip_info;
|
||||
|
||||
if (!$data['businesstrip'] || $data['businesstrip'] == "false") {
|
||||
$data['businesstrip'] = 0;
|
||||
}
|
||||
if ($r->businesstrip == 1 && !$r->businesstrip_info) {
|
||||
$result['state'] = "error";
|
||||
$result['error'] = "Geschäftsreiseinformationen darf nicht leer sein";
|
||||
echo json_encode($result);
|
||||
die();
|
||||
}
|
||||
if (!$data['businesstrip_info']) {
|
||||
$data['businesstrip_info'] = NULL;
|
||||
}
|
||||
|
||||
|
||||
if (!$data['user_id']) {
|
||||
$this->layout()->setFlash("Benutzer darf nicht leer sein", "error");
|
||||
|
||||
Reference in New Issue
Block a user