Update PreorderController.php

This commit is contained in:
Luca Haid
2025-01-24 13:19:12 +00:00
parent 414033c0e0
commit ddf9bd0c6d

View File

@@ -1078,9 +1078,9 @@ class PreorderController extends mfBaseController {
$attribs[$attribute] = $value ? 1 : 0;
$preorder->attributes = json_encode($attribs);
if($preorder->save()) {
return ["id" => $preorder_id, "attribute" => $attribute, "update" => date("d.m.Y H:i", $preorder->edit)];
//return ["id" => $preorder_id, "attribute" => $attribute, "update" => date("d.m.Y H:i", $preorder->edit)];
} else {
$this->returnJson(["status" => "error", "result" => ["id" => $preorder_id, "attribute" => $attribute]]);
//$this->returnJson(["status" => "error", "result" => ["id" => $preorder_id, "attribute" => $attribute]]);
}
}
@@ -1406,4 +1406,4 @@ class PreorderController extends mfBaseController {
return ["message" => "Workorder deleted successfully", "id" => $preorder->id, "wid" => $wo_id];
}
}
}