Fixed saving install_date for orders without terminations

This commit is contained in:
Frank Schubert
2021-12-01 19:10:54 +01:00
parent eec6cf13dd
commit 87f083ebb6

View File

@@ -758,7 +758,7 @@ class OrderController extends mfBaseController {
$date = null;
}
if($date && !$order->install_date && is_array($order->terminations)) {
if($date && !$order->install_date && is_array($order->terminations) && count($order->terminations)) {
$term = $order->terminations[0];
if(!$term->getWorkflowvalue("pop_id")) {
$this->returnJson(["status" => "error", "msg" => "Kein POP im Leitungsbau !", "order" => ['id' => $order_id]]);