Added internal billing NBE email for external products

This commit is contained in:
Frank Schubert
2023-02-28 16:43:17 +01:00
parent 5610efdb94
commit 1aa4bdd89e
7 changed files with 124 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
<?php
class Product extends mfBaseModel {
private $owner;
private $productgroup;
private $producttech;
private $sla;
@@ -45,6 +46,12 @@ class Product extends mfBaseModel {
public function getProperty($name) {
if($this->$name == null) {
if($name == "owner") {
if(!$this->external_id) return null;
$this->owner = new Address($this->external_id);
return $this->owner;
}
if($name == "networks") {
$this->networks = [];
$productNetworks = ProductNetworkModel::search(['product_id' => $this->id]);