Added preorder import Stiftingtal
This commit is contained in:
@@ -60,13 +60,17 @@ class Preorder extends mfBaseModel {
|
||||
|
||||
public function runStatusTrigger() {
|
||||
if(!$this->id) return true;
|
||||
if($this->status_id == $this->_old_data->status_id) return true;
|
||||
if(property_exists($this->_old_data, "status_id") && $this->status_id == $this->_old_data->status_id) return true;
|
||||
|
||||
$this->log->debug(__METHOD__." running");
|
||||
|
||||
$new_status = $this->getProperty("status");
|
||||
if(!property_exists($this->_old_data, "status_id")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$old_status = new Preorderstatus($this->_old_data->status_id);
|
||||
|
||||
|
||||
if(!$new_status->id || !$old_status->id) return true;
|
||||
$this->log->debug(__METHOD__." status changed from '".($old_status ? $old_status->code : "")."' to '".$new_status->code."'");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user