Started Contract Index

This commit is contained in:
Frank Schubert
2022-05-24 17:23:14 +02:00
parent 814261f023
commit b0fe713d0d
8 changed files with 202 additions and 29 deletions
@@ -5,6 +5,7 @@ class OrderProduct extends mfBaseModel {
private $product;
private $termination;
private $cpeprovisioning;
private $contract;
private $editor;
private $creator;
@@ -35,11 +36,19 @@ class OrderProduct extends mfBaseModel {
public function getProperty($name) {
if($this->$name == null) {
if(!$this->id) {
return null;
}
if($name == "cpeprovisioning") {
$this->cpeprovisioning = CpeprovisioningModel::getFirst(["orderproduct_id" => $this->id]);
return $this->cpeprovisioning;
}
if($name == "contract") {
$this->contract = ContractModel::getFirst(['orderproduct_id' => $this->id]);
return $this->contract;
}
if($name == "creator") {
$this->creator = mfValuecache::singleton()->get("Worker-id-".$this->create_by);