Button to create Order from Preorder

This commit is contained in:
Frank Schubert
2026-01-19 16:29:22 +01:00
parent d3f35a4cd8
commit 4e4c5a9c18
10 changed files with 254 additions and 17 deletions
+2 -6
View File
@@ -48,11 +48,7 @@ class OrderProduct extends mfBaseModel {
public function getProperty($name) {
if($this->$name == null) {
if(!$this->id) {
return null;
}
if($name == "cpeprovisioning") {
$this->cpeprovisioning = CpeprovisioningModel::getFirst(["orderproduct_id" => $this->id]);
return $this->cpeprovisioning;
@@ -128,7 +124,7 @@ class OrderProduct extends mfBaseModel {
}
return $this->editor;
}
$classname = ucfirst($name);
$idfield = $name."_id";
$this->$name = mfValuecache::singleton()->get("mfObjectmodel-$name-".$this->$idfield);
@@ -5,6 +5,8 @@ class OrderProductModel
public $order_id;
public $product_id;
public $termination_id;
public $oaid;
public $preorder_id;
public $voicenumber;
public $voiceplan_id;
public $domain;
@@ -212,6 +214,13 @@ class OrderProductModel
}
}
if (array_key_exists("preorder_id", $filter)) {
$preorder_id = $filter['preorder_id'];
if (is_numeric($preorder_id)) {
$where .= " AND preorder_id=$preorder_id";
}
}
if (array_key_exists("voicenumber", $filter)) {
$voicenumber = FronkDB::singleton()->escape($filter['voicenumber']);
if ($voicenumber) {