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'),
41 { value => 'E911 Information',
42 type => 'tablebreak-tr-title',
45 { field => 'locationnum',
46 type => 'select-cust_location',
47 label => 'E911 location',
48 include_opt_callback => sub {
49 my $svc_phone = shift;
50 my $pkgnum = $svc_phone->get('pkgnum')
51 || $cgi->param('pkgnum')
52 || $svc_phone->cust_svc->pkgnum; #hua?
53 #cross agent location exposure? sheesh
54 my $cust_pkg = qsearchs('cust_pkg', {'pkgnum' => $pkgnum});
55 my $cust_main = $cust_pkg ? $cust_pkg->cust_main : '';
57 'cust_pkg' => $cust_pkg,
58 'cust_main' => $cust_main,
62 { field => 'custnum', type=> 'hidden' }, #for new cust_locations
65 if ( $conf->exists('svc_phone-lnp') ) {
67 { value => 'Number Portability',
68 type => 'tablebreak-tr-title',
71 { field => 'lnp_status',
72 type => 'select-lnp_status',
75 { field => 'portable',
79 { field => 'lnp_desired_due_date',
80 type => 'input-date-field',
82 { field => 'lnp_due_date',
83 type => 'input-date-field',
87 'lnp_other_provider_account',