Changed notify duration

This commit is contained in:
Luca Haid
2024-11-27 13:17:49 +00:00
parent ef5e2b151e
commit 465509a0c6
5 changed files with 29 additions and 6 deletions

View File

@@ -240,8 +240,15 @@ class WarehouseShippingNoteController extends TTCrud {
$hoursEntries = json_decode($shippingNote->hoursEntries, true);
foreach ($hoursEntries as $hoursEntry) {
// die(json_encode($hoursEntry));
$articleTitle = "Arbeitsstunden";
if (isset($hoursEntry['priceType']) && $hoursEntry['priceType'] == 50) {
$articleTitle = "Arbeitsstunden (50% Zuschlag)";
} elseif (isset($hoursEntry['priceType']) && $hoursEntry['priceType'] == 100) {
$articleTitle = "Arbeitsstunden (100% Zuschlag)";
}
$positions[] = [
'articleTitle' => "Arbeitsstunden",
'articleTitle' => $articleTitle,
'articleDescription' => "Datum: ". date("d.m.Y", strtotime($hoursEntry['date'])) . " | Mitarbeiter: " . UserModel::getOne($hoursEntry['userId'])->name,
'articleUnit' => 'Std.',
'amount' => $hoursEntry['hourCount'],