Added new Voicenumber delete_reason

This commit is contained in:
Frank Schubert
2026-01-15 18:09:39 +01:00
parent 069112bcfa
commit 3241b8027d
5 changed files with 44 additions and 3 deletions
@@ -114,8 +114,11 @@ class VoicenumberController extends mfBaseController {
$number_data['port_out_date'] = self::dateToTimestamp($r->port_out_date);
}
if($r->disabled === "1") {
$number_data['disabled'] = 1;
if($r->disabled == "1") {
if(!$number->disabled) {
$number_data['disabled'] = date('U');
$number_data['disabled_by'] = $this->me->id;
}
switch($r->disabled_reason) {
case "ported_out":
$number_data['disabled_reason'] = "ported_out";
@@ -123,6 +126,9 @@ class VoicenumberController extends mfBaseController {
case "ported_back":
$number_data['disabled_reason'] = "ported_back";
break;
case "contract_cancelled":
$number_data['disabled_reason'] = "contract_cancelled";
break;
case "legacy":
$number_data['disabled_reason'] = "legacy";
break;
@@ -17,6 +17,7 @@ class VoicenumberModel {
public $ported_out;
public $disabled;
public $disabled_reason;
public $disabled_by;
public $enable_on_date;
public $comment;