fixed shipping note
This commit is contained in:
@@ -54,6 +54,14 @@ class WarehouseShippingNoteController extends TTCrud {
|
||||
die();
|
||||
}
|
||||
|
||||
foreach ($postData['hoursEntries'] as $hoursEntry) {
|
||||
if (!preg_match('/^[0-9,.]*$/', $hoursEntry['hourCount'])) {
|
||||
http_response_code(500);
|
||||
self::returnJson(['success' => false, 'message' => 'Stundenanzahl darf nur Zahlen, Komma oder Punkt enthalten']);
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
$postData['positions'] = json_encode($postData['positions']);
|
||||
return true;
|
||||
}
|
||||
@@ -77,6 +85,13 @@ class WarehouseShippingNoteController extends TTCrud {
|
||||
die();
|
||||
}
|
||||
|
||||
foreach ($postData['hoursEntries'] as $hoursEntry) {
|
||||
if (!preg_match('/^[0-9,.]*$/', $hoursEntry['hourCount'])) {
|
||||
http_response_code(500);
|
||||
self::returnJson(['success' => false, 'message' => 'Stundenanzahl darf nur Zahlen, Komma oder Punkt enthalten']);
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
$postData['positions'] = json_encode($postData['positions']);
|
||||
(new WarehouseHistoryController)->create($postData, $this->mod);
|
||||
@@ -256,7 +271,7 @@ class WarehouseShippingNoteController extends TTCrud {
|
||||
$articleTitle = "Arbeitsstunden (100% Zuschlag)";
|
||||
}
|
||||
|
||||
if (intval($hoursEntry['hourCount']) > 0) {
|
||||
if (floatval(str_replace(",", ".", $hoursEntry['hourCount'])) > 0) {
|
||||
$positions[] = [
|
||||
'articleTitle' => $articleTitle,
|
||||
'articleDescription' => "Datum: ". date("d.m.Y", strtotime($hoursEntry['date'])) . " | Mitarbeiter: " . UserModel::getOne($hoursEntry['userId'])->name,
|
||||
|
||||
@@ -709,8 +709,7 @@ Vue.component('warehouse-shipping-note-modal-address', {
|
||||
address.deliveryAddressName === this.delAddrName &&
|
||||
address.deliveryAddressLine === this.delAddrLine &&
|
||||
address.deliveryAddressPLZ === this.delAddrPLZ &&
|
||||
address.deliveryAddressCity === this.delAddrCity &&
|
||||
address.deliveryAddressEMail === this.delAddrEMail);
|
||||
address.deliveryAddressCity === this.delAddrCity);
|
||||
if (foundAddress) {
|
||||
this.addressMode = 'existing';
|
||||
this.selectedAddr = foundAddress.id;
|
||||
|
||||
Reference in New Issue
Block a user