From 4c4dc1b00c33fa65b29ad7196a06555d92a0b4cb Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Mon, 5 May 2025 12:16:24 +0200 Subject: [PATCH] - --- .../WarehouseShippingNoteController.php | 4 ++-- public/plugins/vue/tt-components/tt-checkbox.js | 2 +- public/plugins/vue/tt-components/tt-position-manager.js | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/application/WarehouseShippingNote/WarehouseShippingNoteController.php b/application/WarehouseShippingNote/WarehouseShippingNoteController.php index e88e7ac8e..b1967b442 100644 --- a/application/WarehouseShippingNote/WarehouseShippingNoteController.php +++ b/application/WarehouseShippingNote/WarehouseShippingNoteController.php @@ -254,7 +254,7 @@ class WarehouseShippingNoteController extends TTCrud { 'articleTitle' => "Fahrkostenpauschale (hin und retour)", 'articleDescription' => "Datum: ". date("d.m.Y", strtotime($hoursEntry['date'])) . " | Fahrzeug: " . TimerecordingCarModel::getOne($hoursEntry['carId'])->number_plate, 'articleUnit' => 'km', - 'amount' => $hoursEntry['kilometerCount'] * 2, + 'amount' => $hoursEntry['kilometerCount'], 'price' => 2 * $hoursEntry['kilometerCount'] ?? 0, ]; } else if (!empty($hoursEntry['carId_text']) && $hoursEntry['kilometerCount'] > 0) { @@ -262,7 +262,7 @@ class WarehouseShippingNoteController extends TTCrud { 'articleTitle' => "Fahrkostenpauschale (hin und retour)", 'articleDescription' => "Datum: ". date("d.m.Y", strtotime($hoursEntry['date'])) . " | Fahrzeug: " . $hoursEntry['carId_text'], 'articleUnit' => 'km', - 'amount' => $hoursEntry['kilometerCount'] * 2, + 'amount' => $hoursEntry['kilometerCount'], 'price' => 2 * $hoursEntry['kilometerCount'] ?? 0, ]; } diff --git a/public/plugins/vue/tt-components/tt-checkbox.js b/public/plugins/vue/tt-components/tt-checkbox.js index edb308081..40f501de1 100644 --- a/public/plugins/vue/tt-components/tt-checkbox.js +++ b/public/plugins/vue/tt-components/tt-checkbox.js @@ -3,7 +3,7 @@ Vue.component('tt-checkbox', { label: String, required: Boolean, row: Boolean, - value: [String, Number], + value: [String, Number, Boolean], hint: String, additionalProps: Object, sm: { type: Boolean, default: false }, diff --git a/public/plugins/vue/tt-components/tt-position-manager.js b/public/plugins/vue/tt-components/tt-position-manager.js index 92bf52671..d0a99b37d 100644 --- a/public/plugins/vue/tt-components/tt-position-manager.js +++ b/public/plugins/vue/tt-components/tt-position-manager.js @@ -211,9 +211,10 @@ Vue.component('tt-positions-manager', async editEntry(index) { this.selectedIndex = index; for (const [key, field] of Object.entries(this.config.fields)) { - if (field.type === 'autocomplete' && field.emitDisplayValue && this.$refs['autocomplete-' + key][0]) { + if (field.type === 'autocomplete' && field.emitDisplayValue) { await this.$nextTick(); - if (this.positions[index][key + '_text']) { + if (this.positions[index][key + '_text'] && this.$refs['autocomplete-' + key][0]) { + console.log('inhere'); this.$refs['autocomplete-' + key][0].displayValue = this.positions[index][key + '_text']; this.$set(this.formData, key, this.positions[index][key]); }