Added Contractconfig Edit
This commit is contained in:
@@ -4,11 +4,12 @@ class Address extends mfBaseModel {
|
||||
protected $forcestr = ['street','company','zip','phone','fax','mobile','note'];
|
||||
private $parent;
|
||||
private $childaddresses;
|
||||
private $links;
|
||||
private $linked_as;
|
||||
private $links = [];
|
||||
private $linked_as = [];
|
||||
private $types;
|
||||
private $attributes;
|
||||
private $permissions;
|
||||
private $contracts;
|
||||
|
||||
private $phoneparts;
|
||||
|
||||
@@ -181,6 +182,14 @@ class Address extends mfBaseModel {
|
||||
$this->childaddresses = AddressModel::search(['parent' => $this->id]);
|
||||
return $this->childaddresses;
|
||||
}
|
||||
|
||||
if($name == "contracts") {
|
||||
$owning = ContractModel::search(['owner_id' => $this->id]);
|
||||
$billing = ContractModel::search(['billingaddress_id' => $this->id]);
|
||||
$this->contracts = array_merge($owning, $billing);
|
||||
return $this->contracts;
|
||||
}
|
||||
|
||||
/*
|
||||
if($name == "links_to") {
|
||||
$links = AddressLinkModel::search(['address_id' => $this->id]);
|
||||
|
||||
Reference in New Issue
Block a user