ont sn can now be saved in cpeprovisioning
This commit is contained in:
@@ -313,7 +313,7 @@
|
||||
<?php if($product->termination->getWorkflowValue("ont_deployed", "int")): ?>
|
||||
<button type="button" class="btn btn-outline-success" disabled="disabled"><i class="fas fa-check"></i></button>
|
||||
<?php else: ?>
|
||||
<button type="button" class="btn btn-outline-danger" disabled="disabled"><i class="fas fa-times"></i></button>
|
||||
<button type="button" class="btn btn-outline-secondary" disabled="disabled"><i class="fas fa-times"></i></button>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
|
||||
|
||||
@@ -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