Preorder statistics update
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
class Preorder extends mfBaseModel {
|
||||
protected $forcestr = ['street','company','zip','phone','email','note'];
|
||||
private $in_after_save = false;
|
||||
private $in_after_save = 0;
|
||||
|
||||
private $status;
|
||||
private $campaign;
|
||||
@@ -38,7 +38,7 @@ class Preorder extends mfBaseModel {
|
||||
|
||||
// prevent potential infinite loop
|
||||
if($this->in_after_save) return true;
|
||||
$this->in_after_save = true;
|
||||
$this->in_after_save++;
|
||||
// update preorder OAID if it's different from the unit OAID
|
||||
// but only if the unit OAID is of the same origin as the campaign
|
||||
$old_oaid = $this->oaid;
|
||||
@@ -52,6 +52,8 @@ class Preorder extends mfBaseModel {
|
||||
$this->cascadeStatus();
|
||||
// Cascade status changes down all active preorders with the same hausnummer
|
||||
$this->cascadeStatusToPreorders();
|
||||
|
||||
$this->in_after_save--;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user