RT# 71419 Updated Advanced wireless broadband report with new option to display packa...
authorChristopher Burger <burgerc@freeside.biz>
Mon, 20 Feb 2017 21:13:58 +0000 (16:13 -0500)
committerChristopher Burger <burgerc@freeside.biz>
Mon, 20 Feb 2017 21:13:58 +0000 (16:13 -0500)
httemplate/search/report_svc_broadband.html
httemplate/search/svc_broadband.cgi

index d7422ee..bdddbb6 100755 (executable)
@@ -59,6 +59,7 @@
         <SELECT NAME="cust_pkg_fields">
           <OPTION VALUE="">(none)
           <OPTION VALUE="setup,last_bill,bill,cancel">Setup date | Last bill date | Next bill date | Cancel date
         <SELECT NAME="cust_pkg_fields">
           <OPTION VALUE="">(none)
           <OPTION VALUE="setup,last_bill,bill,cancel">Setup date | Last bill date | Next bill date | Cancel date
+          <OPTION VALUE="package,setup,last_bill,bill,cancel">Package Name, Setup date | Last bill date | Next bill date |
         </SELECT>
       </TD>
     </TR>
         </SELECT>
       </TD>
     </TR>
index 0e52d5f..e8cb65a 100755 (executable)
@@ -149,8 +149,14 @@ foreach my $pkg_field ( @pkg_fields ) {
   #not the most efficient to do it every field, but this is of niche use. so far
   push @fields_pkg, sub { my $svc_x = shift;
                           my $cust_pkg = $svc_x->cust_svc->cust_pkg or return '';
   #not the most efficient to do it every field, but this is of niche use. so far
   push @fields_pkg, sub { my $svc_x = shift;
                           my $cust_pkg = $svc_x->cust_svc->cust_pkg or return '';
-                          my $value = $cust_pkg->get($pkg_field);#closures help alot
-                          $value ? time2str('%b %d %Y', $value ) : '';
+                          my $value;
+                          if ($pkg_field eq 'package') {
+                            $value = $cust_pkg->part_pkg->pkg;
+                          }
+                          else {
+                            $value = $cust_pkg->get($pkg_field);#closures help alot 
+                            $value ? time2str('%b %d %Y', $value ) : '';
+                          }
                         };
 
   push @blank_pkg, '';
                         };
 
   push @blank_pkg, '';