New Preorderstatus handling at import
This commit is contained in:
@@ -3,7 +3,27 @@
|
||||
class RimoWorkorder extends mfBaseModel {
|
||||
private $adb_wohneinheit;
|
||||
private $termination;
|
||||
|
||||
|
||||
public function afterSave() {
|
||||
// prevent potential infinite loop
|
||||
$nesting_level = mfValuecache::singleton()->get("rimoworkorder-save-nesting-level-".$this->id);
|
||||
if(!$nesting_level) {
|
||||
$nesting_level = 1;
|
||||
} else {
|
||||
$nesting_level++;
|
||||
}
|
||||
mfValuecache::singleton()->set("rimoworkorder-save-nesting-level-".$this->id, $nesting_level);
|
||||
|
||||
if($nesting_level > 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Statuschange from Rimo statuschange for all units
|
||||
$wohneinheit = $this->getProperty("adb_wohneinheit");
|
||||
if($wohneinheit) {
|
||||
AddressDB::handleRimoStatusUpdate($wohneinheit->id);
|
||||
}
|
||||
}
|
||||
|
||||
public function getProperty($name) {
|
||||
if($this->$name == null) {
|
||||
|
||||
Reference in New Issue
Block a user