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',
32 { field => 'sim_imsi',
38 push @$fields, { field => 'domsvc',
39 type => 'select-svc-domain',
42 if $conf->exists('svc_phone-domain');
44 push @$fields, { field => 'pbxsvc',
45 type => 'select-svc_pbx',
51 push @$fields, { field => 'bulk',
61 { field => 'phone_name',
63 maxlength => $conf->config('svc_phone-phone_name-max_length'),
68 { value => 'E911 Information',
69 type => 'tablebreak-tr-title',
72 { field => 'locationnum',
73 type => 'select-cust_location',
74 label => 'E911 location',
75 include_opt_callback => sub {
76 my $svc_phone = shift;
77 my $pkgnum = $svc_phone->get('pkgnum')
78 || $cgi->param('pkgnum')
79 || $svc_phone->cust_svc->pkgnum; #hua?
80 #cross agent location exposure? sheesh
81 my $cust_pkg = qsearchs('cust_pkg', {'pkgnum' => $pkgnum});
82 my $cust_main = $cust_pkg ? $cust_pkg->cust_main : '';
84 'cust_pkg' => $cust_pkg,
85 'cust_main' => $cust_main,
89 { field => 'custnum', type=> 'hidden' }, #for new cust_locations
93 if ( $conf->exists('svc_phone-lnp') && !$bulk ) {
95 { value => 'Number Portability',
96 type => 'tablebreak-tr-title',
99 { field => 'lnp_status',
100 type => 'select-lnp_status',
103 { field => 'portable',
107 { field => 'lnp_desired_due_date',
108 type => 'input-date-field',
110 { field => 'lnp_due_date',
111 type => 'input-date-field',
114 'lnp_other_provider',
115 'lnp_other_provider_account',