Rimo Import update
This commit is contained in:
@@ -308,6 +308,8 @@ class ADBWohneinheit extends mfBaseModel {
|
||||
}
|
||||
|
||||
if($name == "rimo_workorders") {
|
||||
if(!$this->id) return null;
|
||||
|
||||
$rimo_workorders = RimoWorkorderModel::search(["adb_wohneinheit_id" => $this->id]);
|
||||
if(count($rimo_workorders)) {
|
||||
$this->rimo_workorders = $rimo_workorders;
|
||||
@@ -316,6 +318,7 @@ class ADBWohneinheit extends mfBaseModel {
|
||||
}
|
||||
|
||||
if($name == "preorders") {
|
||||
if(!$this->id) return [];
|
||||
$preorders = PreorderModel::search(["adb_wohneinheit_id" => $this->id]);
|
||||
if(!count($preorders)) {
|
||||
return [];
|
||||
@@ -325,6 +328,7 @@ class ADBWohneinheit extends mfBaseModel {
|
||||
}
|
||||
|
||||
if($name == "active_preorders") {
|
||||
if(!$this->id) return [];
|
||||
$preorders = PreorderModel::searchActive(["adb_wohneinheit_id" => $this->id]);
|
||||
if(!count($preorders)) {
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user