Optional svcnum from svc_pbx
-=item route
+=item forwarddst
-Route id/number
+Forwarding destination
+
+=item email
+
+Email address for virtual fax (fax-to-email) services
=item lnp_status
disable_inventory => 1,
disable_select => 1,
},
- 'route' => { label => 'Route',
- %dis2,
+ 'forwarddst' => { label => 'Forward Destination',
+ %dis2,
+ },
+ 'email' => { label => 'Email',
+ %dis2,
},
'lnp_status' => { label => 'LNP Status',
type => 'select-lnp_status.html',
|| $self->ut_foreign_keyn('pbxsvc', 'svc_pbx', 'svcnum' )
|| $self->ut_foreign_keyn('domsvc', 'svc_domain', 'svcnum' )
|| $self->ut_foreign_keyn('locationnum', 'cust_location', 'locationnum')
- || $self->ut_textn('route')
+ || $self->ut_numbern('forwarddst')
+ || $self->ut_textn('email')
|| $self->ut_numbern('lrn')
|| $self->ut_numbern('lnp_desired_due_date')
|| $self->ut_numbern('lnp_due_date')
my @orwhere = map " $_ = '$number' ", @fields;
push @orwhere, map " $_ = '$prefix$number' ", @fields
- if length($prefix);
- if ( $prefix =~ /^\+(\d+)$/ ) {
+ if defined($prefix) && length($prefix);
+ if ( $prefix && $prefix =~ /^\+(\d+)$/ ) {
push @orwhere, map " $_ = '$1$number' ", @fields
}
'table' => 'cdr',
'hashref' => \%hash,
'extra_sql' => $extra_sql,
- 'order_by' => "ORDER BY startdate $for_update",
+ 'order_by' => $options{'billsec_sum'} ? '' : "ORDER BY startdate $for_update",
+ 'select' => $options{'billsec_sum'} ? 'sum(billsec) as billsec_sum' : '*',
} );
@cdrs;