[freeside-commits] branch FREESIDE_3_BRANCH updated. c82ae54183494e5f26c72ad2f068782fd1bb91e7

Mark Wells mark at 420.am
Tue Aug 12 13:01:15 PDT 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  c82ae54183494e5f26c72ad2f068782fd1bb91e7 (commit)
      from  7884dd06802bca7d14860c1c0acd3867d900be93 (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 c82ae54183494e5f26c72ad2f068782fd1bb91e7
Author: Mark Wells <mark at freeside.biz>
Date:   Tue Aug 12 12:58:02 2014 -0700

    477 tweaks, #24047

diff --git a/bin/convert-477-options b/bin/convert-477-options
index cce87bb..be37b41 100755
--- a/bin/convert-477-options
+++ b/bin/convert-477-options
@@ -114,23 +114,25 @@ for my $part_pkg (qsearch('part_pkg', { freq => {op => '!=', value => '0'}})) {
   # other special stuff:
   # FCC voice class (VoIP OTT, VoIP + broadband, Wholesale VoIP, Local
   # Exchange) and DS0 equivalent lines
-  my $sessions = $part_pkg->fcc_ds0s || 1;
+  my $sessions = $part_pkg->fcc_ds0s;
 
-  if ($part_pkg->fcc_voip_class == 1) {
-    # VoIP OTT (connection not included)
-    push @fcc_opts, 'is_voip' => 1, 'voip_ott' => 1,
-                    'voip_sessions' => $sessions;
-  } elsif ( $part_pkg->fcc_voip_class == 2) {
-    # VoIP non-OTT; do not set is_broadband since the connection is not 
-    # necessarily general Internet access
-    push @fcc_opts, 'is_voip' => 1,
-                    'voip_sessions' => $sessions;
-  } elsif ( $part_pkg->fcc_voip_class == 3 ) {
-    # wholesale VoIP; apparently no longer reportable?
-  } else {
-    # local exchange telephone
-    push @fcc_opts, 'is_phone' => 1,
-                    'phone_lines' => $sessions;
+  if ( $sessions ) { # then this is a voice package of some kind
+    if ($part_pkg->fcc_voip_class == 1) {
+      # VoIP OTT (connection not included)
+      push @fcc_opts, 'is_voip' => 1, 'voip_ott' => 1,
+                      'voip_sessions' => $sessions;
+    } elsif ( $part_pkg->fcc_voip_class == 2) {
+      # VoIP non-OTT; do not set is_broadband since the connection is not 
+      # necessarily general Internet access
+      push @fcc_opts, 'is_voip' => 1,
+                      'voip_sessions' => $sessions;
+    } elsif ( $part_pkg->fcc_voip_class == 3 ) {
+      # wholesale VoIP; apparently no longer reportable?
+    } else {
+      # local exchange telephone
+      push @fcc_opts, 'is_phone' => 1,
+                      'phone_lines' => $sessions;
+    }
   }
 
   my %fcc_opts = @fcc_opts;
diff --git a/httemplate/browse/part_pkg-fcc.html b/httemplate/browse/part_pkg-fcc.html
index 4c9cea1..e3fd97c 100755
--- a/httemplate/browse/part_pkg-fcc.html
+++ b/httemplate/browse/part_pkg-fcc.html
@@ -94,8 +94,6 @@ my $select = join(',',
 my $addl_from = 
   FS::Report::FCC_477::join_optionnames(@optionnames);
 
-$cgi->param('classnum', $classnum) if length($classnum);
-
 my $link = [ $p.'edit/part_pkg.cgi?', 'pkgpart' ];
 
 my @header = ( '#', 'Package', 'Comment' );
@@ -203,6 +201,9 @@ my $html_form = qq!<FORM ACTION="${p}edit/process/bulk-part_pkg-fcc.html" METHOD
   }
   </SCRIPT>!;
 
+# restore this only after creating $html_form
+$cgi->param('classnum', $classnum) if length($classnum);
+
 my $html_foot = qq!
   <INPUT TYPE="submit" VALUE="Save changes">
   </FORM>!;

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

Summary of changes:
 bin/convert-477-options             |   34 ++++++++++++++++++----------------
 httemplate/browse/part_pkg-fcc.html |    5 +++--
 2 files changed, 21 insertions(+), 18 deletions(-)




More information about the freeside-commits mailing list