Added Contractconfig Edit

This commit is contained in:
Frank Schubert
2022-12-15 20:48:48 +01:00
parent fc67cd133f
commit 9149a0f2cd
16 changed files with 374 additions and 103 deletions

View File

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