From: Mark Wells Date: Thu, 7 Aug 2014 01:36:52 +0000 (-0700) Subject: 477 report tweaks X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=f8066fa6a33f4ac33beec675b17de96c8c0a274b 477 report tweaks --- diff --git a/FS/FS/deploy_zone_block.pm b/FS/FS/deploy_zone_block.pm index 58234b924..757af7e3d 100644 --- a/FS/FS/deploy_zone_block.pm +++ b/FS/FS/deploy_zone_block.pm @@ -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; } diff --git a/httemplate/browse/part_pkg-fcc.html b/httemplate/browse/part_pkg-fcc.html index 14dfcba08..4c9cea195 100755 --- a/httemplate/browse/part_pkg-fcc.html +++ b/httemplate/browse/part_pkg-fcc.html @@ -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, diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html index acfa8c597..f9d138380 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -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'}, diff --git a/httemplate/edit/process/bulk-part_pkg-fcc.html b/httemplate/edit/process/bulk-part_pkg-fcc.html index 17579aa61..4a0fb2a22 100644 --- a/httemplate/edit/process/bulk-part_pkg-fcc.html +++ b/httemplate/edit/process/bulk-part_pkg-fcc.html @@ -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 diff --git a/httemplate/elements/input-fcc_options.html b/httemplate/elements/input-fcc_options.html index 1d56cf274..85a647043 100644 --- a/httemplate/elements/input-fcc_options.html +++ b/httemplate/elements/input-fcc_options.html @@ -88,6 +88,12 @@ function show_fcc_options(id) { out += '
  • Using a separate last-mile connection
  • '; } } // is_voip + if ( curr_values['is_mobile'] ) { + out += '
  • Mobile telephone service
  • '; + if ( curr_values['mobile_direct'] ) { + out += '
  • Billed directly to the user
  • '; + } + } // is_mobile var out_ul = document.getElementById(id + '_display_fcc_options'); out_ul.innerHTML = out; diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index 6268cf9dc..aabee65ef 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -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',