WIP Contract/Billing 2024-06-20

This commit is contained in:
Frank Schubert
2024-06-21 12:10:04 +02:00
parent 92724ca6b5
commit da52a802ef
11 changed files with 752 additions and 29 deletions
+31
View File
@@ -0,0 +1,31 @@
<?php
class Billing extends mfBaseModel {
protected $forcestr = ["product_name","product_info","matchcode"];
public function getProperty($name) {
if($this->$name == null) {
$classname = ucfirst($name);
$idfield = $name."_id";
$this->$name = mfValuecache::singleton()->get("mfObjectmodel-$name-".$this->$idfield);
if(!$this->$name) {
$this->$name = new $classname($this->$idfield);
}
if($this->$name->id) {
mfValuecache::singleton()->set("mfObjectmodel-$name-".$this->$name->id, $this->$name);
return $this->$name;
} else {
return null;
}
}
return $this->$name;
}
}