summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-09-15 20:55:19 -0700
committerIvan Kohler <ivan@freeside.biz>2014-09-15 20:55:19 -0700
commit4e7efe58f1a20dfc4fd306fad2c14c8040585be1 (patch)
tree20021a00657542d4568ead7fee5d1b536c82b19c
parentbdc63b4ee68fb08d3ef281212bdffac2bc038717 (diff)
parent53288cefda78454e909759823d5e8cc6e2214bad (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
-rw-r--r--FS/FS/ConfDefaults.pm8
-rw-r--r--FS/FS/part_export/nena2.pm19
-rw-r--r--FS/FS/part_pkg/sqlradacct_hour.pm6
-rw-r--r--httemplate/search/sqlradius.cgi16
-rw-r--r--httemplate/view/elements/svc_radius_usage.html8
5 files changed, 28 insertions, 29 deletions
diff --git a/FS/FS/ConfDefaults.pm b/FS/FS/ConfDefaults.pm
index c20a9c941..a66d0ab7c 100644
--- a/FS/FS/ConfDefaults.pm
+++ b/FS/FS/ConfDefaults.pm
@@ -33,10 +33,10 @@ sub cust_fields_avail { (
'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',
diff --git a/FS/FS/part_export/nena2.pm b/FS/FS/part_export/nena2.pm
index fa3597b7a..4d3f08f98 100644
--- a/FS/FS/part_export/nena2.pm
+++ b/FS/FS/part_export/nena2.pm
@@ -169,15 +169,6 @@ my %function_code = (
);
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) = @_;
@@ -209,6 +200,15 @@ sub create_item {
}
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;
@@ -259,7 +259,6 @@ sub data {
} else {
$hash{location} = $cust_location->address2;
}
- $hash{location} = $location_hash->{address2};
# customer name and class
$hash{customer_name} = $svc->phone_name_or_cust;
diff --git a/FS/FS/part_pkg/sqlradacct_hour.pm b/FS/FS/part_pkg/sqlradacct_hour.pm
index 2f9d833d0..79e64fbab 100644
--- a/FS/FS/part_pkg/sqlradacct_hour.pm
+++ b/FS/FS/part_pkg/sqlradacct_hour.pm
@@ -138,15 +138,15 @@ sub calc_recur {
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 ".
diff --git a/httemplate/search/sqlradius.cgi b/httemplate/search/sqlradius.cgi
index 604f44ea0..5d6aeea1e 100644
--- a/httemplate/search/sqlradius.cgi
+++ b/httemplate/search/sqlradius.cgi
@@ -302,10 +302,10 @@ my $duration_format = sub {
my $octets_format = sub {
my $octets = shift;
- my $megs = $octets / 1048576;
- sprintf('<B>%.3f</B>&nbsp;megs', $megs);
- #my $gigs = $octets / 1073741824
- #sprintf('<B>%.3f</B> gigabytes', $gigs);
+ #my $megs = $octets / 1048576;
+ #sprintf('<B>%.3f</B>&nbsp;megs', $megs);
+ my $gigs = $octets / 1073741824;
+ sprintf('<B>%.3f</B>&nbsp;gigs', $gigs);
};
###
@@ -380,9 +380,9 @@ tie %fields, 'Tie::IxHash',
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 : '&nbsp';
@@ -396,9 +396,9 @@ tie %fields, 'Tie::IxHash',
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 : '&nbsp';
},
diff --git a/httemplate/view/elements/svc_radius_usage.html b/httemplate/view/elements/svc_radius_usage.html
index 08d6d53d3..471969175 100644
--- a/httemplate/view/elements/svc_radius_usage.html
+++ b/httemplate/view/elements/svc_radius_usage.html
@@ -21,10 +21,10 @@
%
% 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 ) {
@@ -57,8 +57,8 @@
% }
- 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>
% }