Moved Invoice reminders into Minion Tasks
This commit is contained in:
@@ -464,19 +464,22 @@ class Model_Invoice extends ORM_OSB implements Cartable {
|
||||
}
|
||||
|
||||
public function set_remind($key,$value,$add=FALSE) {
|
||||
$x = $this->reminders;
|
||||
|
||||
// If our value is null, we'll remove it.
|
||||
if (is_null($value) AND isset($this->reminders[$key]))
|
||||
unset($this->reminders[$key]);
|
||||
if (is_null($value) AND isset($x[$key]))
|
||||
unset($x[$key]);
|
||||
|
||||
elseif ($add) {
|
||||
if (! is_array($a=$this->reminders[$key]))
|
||||
$this->reminders[$key] = array($a);
|
||||
if (! is_array($a=$x[$key]))
|
||||
$x[$key] = array($a);
|
||||
|
||||
$this->reminders[$key][] = $value;
|
||||
$x[$key][] = $value;
|
||||
|
||||
} else
|
||||
$this->reminders[$key] = $value;
|
||||
$x[$key] = $value;
|
||||
|
||||
$this->reminders = $x;
|
||||
$this->save();
|
||||
|
||||
return $this->saved();
|
||||
|
Reference in New Issue
Block a user