Started Contract Index
This commit is contained in:
@@ -4,6 +4,7 @@ class Order extends mfBaseModel {
|
||||
private $owner;
|
||||
private $billingaddress;
|
||||
private $products;
|
||||
private $contracts;
|
||||
private $terminations;
|
||||
private $journals;
|
||||
private $files;
|
||||
@@ -195,6 +196,16 @@ class Order extends mfBaseModel {
|
||||
return $this->products;
|
||||
}
|
||||
|
||||
if($name == "contracts") {
|
||||
foreach($this->getProperty("products") as $product) {
|
||||
//var_dump($product);
|
||||
if($product->contract && $product->contract->id) {
|
||||
$this->contracts[] = $product->contract;
|
||||
}
|
||||
}
|
||||
return $this->contracts;
|
||||
}
|
||||
|
||||
if($name == "terminations") {
|
||||
$this->terminations = $this->getTerminations();
|
||||
return $this->terminations;
|
||||
|
||||
Reference in New Issue
Block a user