1 <% include( 'elements/svc_Common.html',
2 'table' => 'svc_phone',
3 'args_callback' => $args_callback,
4 'value_callback' => $value_callback,
10 unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?
12 my $tollfreephonenum = $cgi->param('tollfreephonenum');
13 $cgi->param('phonenum',$tollfreephonenum) if $tollfreephonenum =~ /^\d+$/;
15 my $args_callback = sub {
16 my( $cgi, $object ) = @_;
19 if ( $cgi->param('locationnum') == -1 ) {
20 my $cust_location = new FS::cust_location {
21 map { $_ => scalar($cgi->param($_)) }
22 qw( custnum address1 address2 city county state zip country )
24 $opt{'cust_location'} = $cust_location;
31 my $value_callback = sub {
32 my ($field, $value) = @_;
33 ($field =~ /_date$/) ? parse_datetime($value) : $value;