Button to create Order from Preorder
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user