Zeiterfassung update

* Mails für Antragspflichtige Buchungen
* Mails für Genehmigungen und Ablehnungen
* Korrekturen Update
This commit is contained in:
Spitzer Daniel
2024-02-18 13:31:19 +01:00
parent d03e31134b
commit 9a74d50cb5
7 changed files with 137 additions and 33 deletions

View File

@@ -56,7 +56,7 @@ class TimerecordingPermitController extends mfBaseController
$body .= 'Buchungsart: ' . $timerecordingCategoriess[0]->name . '
';
if ($timerecordingCategoriess[0]->hourday == "1") {
$body .= 'von: ' . date("d.m.Y H:i", $timerecordings->start) . ' bis: ' . date("H:i", $timerecordings->end). '
$body .= 'von: ' . date("d.m.Y H:i", $timerecordings->start) . ' bis: ' . date("H:i", $timerecordings->end) . '
';
} else if ($timerecordingCategoriess[0]->hourday == "2") {
@@ -69,9 +69,16 @@ class TimerecordingPermitController extends mfBaseController
$email = new Emailnotification();
$email->setSubject('Antrag für ' . $timerecordingCategoriess[0]->name . ' ' . $sendtext);
$email->setBody($body);
$email->setFrom('zeiterfassung@xinon.at', 'Xinon Zeiterfassung');
$email->setFrom(TT_TIMERECORDING_EMAIL, TT_TIMERECORDING_EMAIL_NAME);
$email->setTo($user->email);
$email->send();
$email = new Emailnotification();
$email->setSubject('Antrag für ' . $timerecordingCategoriess[0]->name . ' ' . $sendtext . ' (' . $user->name . ')');
$email->setBody($body);
$email->setFrom(TT_TIMERECORDING_EMAIL, TT_TIMERECORDING_EMAIL_NAME);
$email->setTo(TT_TIMERECORDING_EMAIL);
$email->send();
}
protected function approveAction()