[freeside-commits] branch master updated. 992c6d61adaaf658a52d1bdcc87b6e1780663a64

Christopher Burger burgerc at 420.am
Mon Feb 20 13:15:42 PST 2017


The branch, master has been updated
       via  992c6d61adaaf658a52d1bdcc87b6e1780663a64 (commit)
      from  895667aa1cf8e9d136043881284df2c9423d1d1e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 992c6d61adaaf658a52d1bdcc87b6e1780663a64
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Mon Feb 20 16:13:58 2017 -0500

    RT# 71419 Updated Advanced wireless broadband report with new option to display package name.

diff --git a/httemplate/search/report_svc_broadband.html b/httemplate/search/report_svc_broadband.html
index d7422ee..bdddbb6 100755
--- a/httemplate/search/report_svc_broadband.html
+++ b/httemplate/search/report_svc_broadband.html
@@ -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
+          <OPTION VALUE="package,setup,last_bill,bill,cancel">Package Name, Setup date | Last bill date | Next bill date |
         </SELECT>
       </TD>
     </TR>
diff --git a/httemplate/search/svc_broadband.cgi b/httemplate/search/svc_broadband.cgi
index 0e52d5f..e8cb65a 100755
--- a/httemplate/search/svc_broadband.cgi
+++ b/httemplate/search/svc_broadband.cgi
@@ -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 '';
-                          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, '';

-----------------------------------------------------------------------

Summary of changes:
 httemplate/search/report_svc_broadband.html |    1 +
 httemplate/search/svc_broadband.cgi         |   10 ++++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list