1 <% include( 'elements/svc_Common.html',
2 'table' => 'svc_phone',
4 'svc_new_callback' => sub {
5 my( $cgi, $svc_x, $part_svc, $cust_pkg, $fields, $opt ) = @_;
6 $svc_x->locationnum($cust_pkg->locationnum) if $cust_pkg;
13 unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?
15 my $conf = new FS::Conf;
17 my @fields = ( 'countrycode',
18 { field => 'phonenum',
20 label => 'Phone number',
24 push @fields, { field => 'domsvc',
25 type => 'select-svc-domain',
28 if $conf->exists('svc_phone-domain');
30 push @fields, { field => 'pbxsvc',
31 type => 'select-svc_pbx',
36 { field => 'phone_name',
38 maxlength => $conf->config('svc_phone-phone_name-max_length'),
43 { value => 'E911 Information',
44 type => 'tablebreak-tr-title',
47 { field => 'locationnum',
48 type => 'select-cust_location',
49 label => 'E911 location',
50 include_opt_callback => sub {
51 my $svc_phone = shift;
52 my $pkgnum = $svc_phone->get('pkgnum')
53 || $cgi->param('pkgnum')
54 || $svc_phone->cust_svc->pkgnum; #hua?
55 #cross agent location exposure? sheesh
56 my $cust_pkg = qsearchs('cust_pkg', {'pkgnum' => $pkgnum});
57 my $cust_main = $cust_pkg ? $cust_pkg->cust_main : '';
59 'cust_pkg' => $cust_pkg,
60 'cust_main' => $cust_main,
64 { field => 'custnum', type=> 'hidden' }, #for new cust_locations
67 if ( $conf->exists('svc_phone-lnp') ) {
69 { value => 'Number Portability',
70 type => 'tablebreak-tr-title',
73 { field => 'lnp_status',
74 type => 'select-lnp_status',
77 { field => 'portable',
81 { field => 'lnp_desired_due_date',
82 type => 'input-date-field',
84 { field => 'lnp_due_date',
85 type => 'input-date-field',
89 'lnp_other_provider_account',