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

View File

@@ -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;