Filter and pagination is still set after saving Order

This commit is contained in:
Frank Schubert
2022-05-31 15:38:48 +02:00
parent b0fe713d0d
commit 4d4bf81e2a
7 changed files with 121 additions and 49 deletions

View File

@@ -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) {