1 <& elements/svc_Common.html,
2 'table' => 'svc_phone',
4 'begin_callback' => $begin_callback,
5 'svc_new_callback' => sub {
6 my( $cgi, $svc_x, $part_svc, $cust_pkg, $fields, $opt ) = @_;
7 $svc_x->locationnum($cust_pkg->locationnum) if $cust_pkg;
12 my $begin_callback = sub {
13 my( $cgi, $fields, $opt ) = @_;
15 my $bulk = $cgi->param('bulk') ? 1 : 0;
17 my $right = $bulk ? 'Bulk provision customer service'
18 : 'Provision customer service';
21 unless $FS::CurrentUser::CurrentUser->access_right($right);
23 my $conf = new FS::Conf;
27 { field => 'phonenum',
29 label => 'Phone number',
33 push @$fields, { field => 'domsvc',
34 type => 'select-svc-domain',
37 if $conf->exists('svc_phone-domain');
39 push @$fields, { field => 'pbxsvc',
40 type => 'select-svc_pbx',
46 push @$fields, { field => 'bulk',
56 { field => 'phone_name',
58 maxlength => $conf->config('svc_phone-phone_name-max_length'),
63 { value => 'E911 Information',
64 type => 'tablebreak-tr-title',
67 { field => 'locationnum',
68 type => 'select-cust_location',
69 label => 'E911 location',
70 include_opt_callback => sub {
71 my $svc_phone = shift;
72 my $pkgnum = $svc_phone->get('pkgnum')
73 || $cgi->param('pkgnum')
74 || $svc_phone->cust_svc->pkgnum; #hua?
75 #cross agent location exposure? sheesh
76 my $cust_pkg = qsearchs('cust_pkg', {'pkgnum' => $pkgnum});
77 my $cust_main = $cust_pkg ? $cust_pkg->cust_main : '';
79 'cust_pkg' => $cust_pkg,
80 'cust_main' => $cust_main,
84 { field => 'custnum', type=> 'hidden' }, #for new cust_locations
88 if ( $conf->exists('svc_phone-lnp') && !$bulk ) {
90 { value => 'Number Portability',
91 type => 'tablebreak-tr-title',
94 { field => 'lnp_status',
95 type => 'select-lnp_status',
98 { field => 'portable',
102 { field => 'lnp_desired_due_date',
103 type => 'input-date-field',
105 { field => 'lnp_due_date',
106 type => 'input-date-field',
109 'lnp_other_provider',
110 'lnp_other_provider_account',