Invoice/Index layout tweak
This commit is contained in:
@@ -483,12 +483,14 @@ foreach ($clusters as $cluster_data) {
|
||||
if(property_exists($service, "customerState") && is_object($service->customerState) && property_exists($service->customerState, "userLabel") && strtolower($service->customerState->userLabel) == "active") {
|
||||
// active => order 500
|
||||
$preorder = \PreorderModel::getFirst(["adb_wohneinheit_id" => $unit->id]);
|
||||
$preorder->resetSaveNesting();
|
||||
if($preorder) {
|
||||
$new_status = \PreorderstatusModel::getFirst(["code" => 500]);
|
||||
if($new_status) {
|
||||
if($preorder->status->code < $new_status->code) {
|
||||
$preorder->status_id = $new_status->id;
|
||||
$preorder->save();
|
||||
$preorder->resetSaveNesting();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user