'Cust# | Cust. Status | Customer' =>
'custnum | Status | Last, First or Company (Last, First)',
- 'Cust. Status | Day phone | Night phone | Mobile phone | Fax number' =>
- 'Status | (all phones)',
- 'Cust# | Cust. Status | Day phone | Night phone | Mobile phone | Fax number' =>
- 'custnum | Status | (all phones)',
+ 'Customer | Day phone | Night phone | Mobile phone | Fax number' =>
+ 'Customer | (all phones)',
+ 'Cust# | Customer | Day phone | Night phone | Mobile phone | Fax number' =>
+ 'custnum | Customer | (all phones)',
'Cust. Status | Name | Company' =>
'Status | Last, First | Company',
);
sub immediate {
- local $@;
- eval "use Geo::StreetAddress::US";
- if ($@) {
- if ($@ =~ /^Can't locate/) {
- return "Geo::StreetAddress::US must be installed to use the NENA2 export.";
- } else {
- die $@;
- }
- }
# validate some things
my ($self, $action, $svc) = @_;
}
sub data {
+ local $@;
+ eval "use Geo::StreetAddress::US";
+ if ($@) {
+ if ($@ =~ /^Can't locate/) {
+ return "Geo::StreetAddress::US must be installed to use the NENA2 export.";
+ } else {
+ die $@;
+ }
+ }
# generate the entire record here. reconciliation of multiple updates to
# the same service can be done at process time.
my $self = shift;
} else {
$hash{location} = $cust_location->address2;
}
- $hash{location} = $location_hash->{address2};
# customer name and class
$hash{customer_name} = $svc->phone_name_or_cust;
if ( $self->option('recur_total_charge') > 0 ) {
push @$details,
- sprintf( "Last month's data %.1f %ss: %s", $total, BA, $totalcharge );
+ sprintf( "Last month's data %.3f %ss: %s", $total, BA, $totalcharge );
}
if ( $self->option('recur_input_charge') > 0 ) {
push @$details,
- sprintf( "Last month's download %.1f %ss: %s", $input, BA, $inputcharge );
+ sprintf( "Last month's download %.3f %ss: %s", $input, BA, $inputcharge );
}
if ( $self->option('recur_output_charge') > 0 ) {
push @$details,
- sprintf( "Last month's upload %.1f %ss: %s", $output, BA, $outputcharge );
+ sprintf( "Last month's upload %.3f %ss: %s", $output, BA, $outputcharge );
}
if ( $self->option('recur_hourly_charge') > 0 ) {
push @$details, "Last month\'s time ".
my $octets_format = sub {
my $octets = shift;
- my $megs = $octets / 1048576;
- sprintf('<B>%.3f</B> megs', $megs);
- #my $gigs = $octets / 1073741824
- #sprintf('<B>%.3f</B> gigabytes', $gigs);
+ #my $megs = $octets / 1048576;
+ #sprintf('<B>%.3f</B> megs', $megs);
+ my $gigs = $octets / 1073741824;
+ sprintf('<B>%.3f</B> gigs', $gigs);
};
###
my $src = shift;
if ( $src =~
/^\s*(([\dA-F]{2}[\-:]){5}[\dA-F]{2})/i ) {
- return $src. ' ('.
+ return $src. ' <span style="white-space: nowrap">('.
(Net::MAC::Vendor::lookup($1))->[0].
- ')';
+ ')</span>';
}
length($src) ? $src : ' ';
my $dst = shift;
if ( $dst =~
/^\s*(([\dA-F]{2}[\-:]){5}[\dA-F]{2})/i ) {
- return $dst. ' ('.
+ return $dst. ' <span style="white-space: nowrap">('.
(Net::MAC::Vendor::lookup($1))->[0].
- ')';
+ ')</span>';
}
length($dst) ? $dst : ' ';
},
%
% my $input = $svc->attribute_since_sqlradacct(
% $last_bill, time, 'AcctInputOctets'
-% ) / 1048576;
+% ) / 1073741824;
% my $output = $svc->attribute_since_sqlradacct(
% $last_bill, time, 'AcctOutputOctets'
-% ) / 1048576;
+% ) / 1073741824;
%
% my $last_mac = $svc->attribute_last_sqlradacct( 'CallingStationId' );
% if ( $last_mac =~ /^\s*(([\dA-F]{2}[\-:]){5}[\dA-F]{2})/i ) {
% }
- Upload: <B><% sprintf("%.3f", $input) %></B> megabytes<BR>
- Download: <B><% sprintf("%.3f", $output) %></B> megabytes<BR>
+ Upload: <B><% sprintf("%.3f", $input) %></B> gigabytes<BR>
+ Download: <B><% sprintf("%.3f", $output) %></B> gigabytes<BR>
% if ( $svc->table eq 'svc_acct' ) {
Last Login: <B><% $svc->last_login_text %></B><BR>
% }