contracts can be added and saved
This commit is contained in:
@@ -2,11 +2,14 @@
|
||||
|
||||
class Contract extends mfBaseModel {
|
||||
private $owner;
|
||||
private $creator;
|
||||
private $billingaddress;
|
||||
private $product;
|
||||
private $orderproduct;
|
||||
private $termination;
|
||||
private $sla;
|
||||
private $finisher;
|
||||
private $canceler;
|
||||
private $creator;
|
||||
private $editor;
|
||||
|
||||
|
||||
@@ -29,6 +32,7 @@ class Contract extends mfBaseModel {
|
||||
}
|
||||
|
||||
if($name == "billingaddress") {
|
||||
|
||||
$this->billingaddress = mfValuecache::singleton()->get("mfObjectmodel-Address-".$this->billingaddress_id);
|
||||
if($this->billingaddress === null) {
|
||||
$this->billingaddress = new Address($this->billingaddress_id);
|
||||
@@ -61,6 +65,28 @@ class Contract extends mfBaseModel {
|
||||
return $this->orderproduct;
|
||||
}
|
||||
|
||||
if($name == "finisher") {
|
||||
$this->finisher = mfValuecache::singleton()->get("Worker-id-".$this->finish_date_by);
|
||||
if($this->finisher === null) {
|
||||
$this->finisher = new User($this->finish_date_by);
|
||||
if($this->finisher->id) {
|
||||
mfValuecache::singleton()->set("Worker-id-".$this->finish_date_by, $this->finisher);
|
||||
}
|
||||
}
|
||||
return $this->finisher;
|
||||
}
|
||||
|
||||
if($name == "canceler") {
|
||||
$this->canceler = mfValuecache::singleton()->get("Worker-id-".$this->cancel_date_by);
|
||||
if($this->canceler === null) {
|
||||
$this->canceler = new User($this->cancel_date_by);
|
||||
if($this->canceler->id) {
|
||||
mfValuecache::singleton()->set("Worker-id-".$this->cancel_date_by, $this->canceler);
|
||||
}
|
||||
}
|
||||
return $this->canceler;
|
||||
}
|
||||
|
||||
if($name == "creator") {
|
||||
$this->creator = mfValuecache::singleton()->get("Worker-id-".$this->create_by);
|
||||
if($this->creator === null) {
|
||||
|
||||
Reference in New Issue
Block a user