Filter and pagination is still set after saving Order
This commit is contained in:
@@ -4,6 +4,7 @@ class Contract extends mfBaseModel {
|
||||
private $owner;
|
||||
private $creator;
|
||||
private $product;
|
||||
private $orderproduct;
|
||||
private $termination;
|
||||
private $sla;
|
||||
private $editor;
|
||||
@@ -39,16 +40,27 @@ class Contract extends mfBaseModel {
|
||||
}
|
||||
|
||||
if($name == "product") {
|
||||
$this->product = mfValuecache::singleton()->get("mfObjectmodel-OrderProduct-".$this->orderproduct_id);
|
||||
$this->product = mfValuecache::singleton()->get("mfObjectmodel-Product-".$this->product_id);
|
||||
if($this->product === null) {
|
||||
$this->product = new OrderProduct($this->orderproduct_id);
|
||||
$this->product = new Product($this->product_id);
|
||||
if($this->product->id) {
|
||||
mfValuecache::singleton()->set("mfObjectmodel-OrderProduct-".$this->orderproduct_id, $this->product);
|
||||
mfValuecache::singleton()->set("mfObjectmodel-Product-".$this->product_id, $this->product);
|
||||
}
|
||||
}
|
||||
return $this->product;
|
||||
}
|
||||
|
||||
if($name == "orderproduct") {
|
||||
$this->orderproduct = mfValuecache::singleton()->get("mfObjectmodel-OrderProduct-".$this->orderorderproduct_id);
|
||||
if($this->orderproduct === null) {
|
||||
$this->orderproduct = new OrderProduct($this->orderorderproduct_id);
|
||||
if($this->orderproduct->id) {
|
||||
mfValuecache::singleton()->set("mfObjectmodel-OrderProduct-".$this->orderorderproduct_id, $this->orderproduct);
|
||||
}
|
||||
}
|
||||
return $this->orderproduct;
|
||||
}
|
||||
|
||||
if($name == "creator") {
|
||||
$this->creator = mfValuecache::singleton()->get("Worker-id-".$this->create_by);
|
||||
if($this->creator === null) {
|
||||
|
||||
Reference in New Issue
Block a user