From f9ce14ffeae61d11ab2017918324aa9d3b773ee2 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Wed, 18 Dec 2024 22:38:02 +0100 Subject: [PATCH] RTR C10 Report tweaks --- application/Admin/functions/RtrReporting.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/application/Admin/functions/RtrReporting.php b/application/Admin/functions/RtrReporting.php index 368cd8063..c4585428b 100644 --- a/application/Admin/functions/RtrReporting.php +++ b/application/Admin/functions/RtrReporting.php @@ -565,9 +565,14 @@ class Admin_RtrReporting { } $prod_code_start = substr($prod_code, 0, 4); + $prod_code_a = $prod_code_start."0"; $prod_code_p = $prod_code_start."1"; $prod_code_b = $prod_code_start."2"; + if($prod_code_start == 2011) { + $prov_id = 1522; // A1 in case of Vull + } + if(!$prov_id || $prov_id == $this->systemowner_rtr_id) { if(substr($prod_code_start,0, 3) == "343" || $prod_code_start == "1432") { // is OAN product @@ -583,6 +588,12 @@ class Admin_RtrReporting { $data[$prov_id] = []; } + if($prov_id == $this->systemowner_rtr_id && $netowner_id == $this->systemowner_id && ($prod_code_start == 1042 || $prod_code_start == 1431)) { + if(!in_array($prod_code_a, $data[$prov_id])) { + $data[$prov_id][] = $prod_code_a; + } + } + if(!in_array($prod_code_p, $data[$prov_id])) { $data[$prov_id][] = $prod_code_p; } @@ -601,7 +612,7 @@ class Admin_RtrReporting { $csv .= "$prod_code;"; $csv .= "$prov_id;"; $csv .= "0;"; - $csv .= "0"; + $csv .= substr($prod_code, -1, 1); $csv .= "\n"; } }