477 report tweaks
authorMark Wells <mark@freeside.biz>
Thu, 7 Aug 2014 01:36:52 +0000 (18:36 -0700)
committerMark Wells <mark@freeside.biz>
Thu, 7 Aug 2014 01:36:58 +0000 (18:36 -0700)
FS/FS/deploy_zone_block.pm
httemplate/browse/part_pkg-fcc.html
httemplate/edit/elements/edit.html
httemplate/edit/process/bulk-part_pkg-fcc.html
httemplate/elements/input-fcc_options.html
httemplate/elements/menu.html

index 58234b9..757af7e 100644 (file)
@@ -111,6 +111,10 @@ sub check {
   ;
   return $error if $error;
 
+  if ($self->get('censusblock') !~ /^(\d{15})$/) {
+    return "Illegal census block number (must be 15 digits)";
+  }
+
   $self->SUPER::check;
 }
 
index 14dfcba..4c9cea1 100755 (executable)
@@ -7,8 +7,7 @@
   'disableable'           => 1,
   'disabled_statuspos'    => 4,
   'agent_virt'            => 1,
-  'agent_null_right'      => [ $edit, $edit_global ],
-  'agent_null_right_link' => $edit_global,
+  'agent_null_right'      => $edit_global,
   'agent_pos'             => 3,
   'query'                 =>
                             { 'select'    => $select,
index acfa8c5..f9d1383 100644 (file)
@@ -314,6 +314,8 @@ Example:
 %     'disable_empty' => $f->{'disable_empty'},
 %     #select-reason
 %     'reason_class'  => $f->{'reason_class'},
+%     #select-agent
+%     'viewall_right' => $f->{'viewall_right'},
 %
 %     #selectlayers
 %     'layer_fields'  => $f->{'layer_fields'},
index 17579aa..4a0fb2a 100644 (file)
@@ -21,8 +21,9 @@
 % }
 <%init>
 my $curuser = $FS::CurrentUser::CurrentUser;
-die "access denied"
-  unless $curuser->access_right('Bulk edit package definitions');
+my $edit_acl = $curuser->access_right('Edit FCC report configuration');
+my $global_edit_acl = $curuser->access_right('Edit FCC report configuration for all agents');
+die "access denied" unless $edit_acl or $global_edit_acl;
 
 # non-atomic; report errors but allow successful changes to go through
 # not that I even know how you'd get an error doing this
index 1d56cf2..85a6470 100644 (file)
@@ -88,6 +88,12 @@ function show_fcc_options(id) {
       out += '<li>Using a <strong>separate</strong> last-mile connection</li>';
     }
   } // is_voip
+  if ( curr_values['is_mobile'] ) {
+    out += '<li><strong>Mobile</strong> telephone service</li>';
+    if ( curr_values['mobile_direct'] ) {
+      out += '<li>Billed <strong>directly to the user</strong></li>';
+    }
+  } // is_mobile
 
   var out_ul = document.getElementById(id + '_display_fcc_options');
   out_ul.innerHTML = out;
index 6268cf9..aabee65 100644 (file)
@@ -258,8 +258,8 @@ $report_packages{'Suspended customer packages'} =  [ $fsurl.'search/cust_pkg.cgi
 $report_packages{'Suspension summary'} = [ $fsurl.'search/cust_pkg_susp.html', 'Show suspension activity', ]
   if $curuser->access_right('Summarize packages');
 $report_packages{'Customer packages with unconfigured services'} =  [ $fsurl.'search/cust_pkg.cgi?APKG_pkgnum', 'List packages which have provisionable services' ];
-$report_packages{'FCC Form 477 packages'} =  [ $fsurl.'search/report_477.html', 'Summarize packages by census tract for particular types' ]
-  if $conf->exists('cust_main-require_censustract');
+$report_packages{'FCC Form 477'} =  [ $fsurl.'search/report_477.html' ]
+  if $conf->exists('part_pkg-show_fcc_options');
 $report_packages{'Advanced package reports'} =  [ $fsurl.'search/report_cust_pkg.html', 'by agent, date range, status, package definition' ];
 
 tie my %report_inventory, 'Tie::IxHash',