ont sn can now be saved in cpeprovisioning
This commit is contained in:
@@ -135,6 +135,12 @@ class CpeprovisioningController extends mfBaseController {
|
||||
$this->redirect("Cpeprovisioning");
|
||||
}
|
||||
|
||||
$orderproduct = OrderProductModel::getFirst(["order_id" => $order_id, "termination_id" => $termination_id]);
|
||||
if(!$orderproduct) {
|
||||
$this->layout()->setFlash("Anschluss gehört nicht zur Bestellung", "error");
|
||||
$this->redirect("Cpeprovisioning");
|
||||
}
|
||||
|
||||
$prov_data = [];
|
||||
$prov_data["termination_id"] = ($r->termination_id) ? $r->termination_id : null;
|
||||
$prov_data["order_id"] = $r->order_id;
|
||||
@@ -207,6 +213,15 @@ class CpeprovisioningController extends mfBaseController {
|
||||
}
|
||||
}
|
||||
|
||||
// save ONT sn
|
||||
if($r->ont_sn) {
|
||||
$termination = new Termination($termination_id);
|
||||
$orig_sn = $termination->getWorkflowvalue("ont_sn", "string");
|
||||
if($r->ont_sn != $orig_sn) {
|
||||
$termination->workflowitems["ont_sn"]->value->setValue($r->ont_sn);
|
||||
$termination->workflowitems["ont_sn"]->value->save();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user