From 0d93c344df3eb3caf2ba14807475a5a8e2d01267 Mon Sep 17 00:00:00 2001 From: "C.J. Adams-Collier" Date: Fri, 12 Sep 2014 14:46:26 -0700 Subject: FS RT #27208 - using field names specified by ivan for customer / phone in AR aging report --- FS/FS/ConfDefaults.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 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', -- cgit v1.2.1 From 01717353564b79dd143220ec67207a2d245f24e9 Mon Sep 17 00:00:00 2001 From: "C.J. Adams-Collier" Date: Mon, 15 Sep 2014 14:25:28 -0700 Subject: FS RT #30961 - displaying Upload / Download in gigs rather than megs - added a nowrap around the MAC vendor string to improve readability --- httemplate/search/sqlradius.cgi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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('%.3f megs', $megs); - #my $gigs = $octets / 1073741824 - #sprintf('%.3f gigabytes', $gigs); + #my $megs = $octets / 1048576; + #sprintf('%.3f megs', $megs); + my $gigs = $octets / 1073741824; + sprintf('%.3f 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. ' ('. (Net::MAC::Vendor::lookup($1))->[0]. - ')'; + ')'; } length($src) ? $src : ' '; @@ -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. ' ('. (Net::MAC::Vendor::lookup($1))->[0]. - ')'; + ')'; } length($dst) ? $dst : ' '; }, -- cgit v1.2.1 From df9caf6e66f4fd7a6a5f46438583414314d82107 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Mon, 15 Sep 2014 15:52:46 -0700 Subject: fix address2 in NENA2 export, #14049 --- FS/FS/part_export/nena2.pm | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) 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; -- cgit v1.2.1 From 866980f54aa0ad5a9ace05d30f96c84b842463bb Mon Sep 17 00:00:00 2001 From: "C.J. Adams-Collier" Date: Mon, 15 Sep 2014 18:37:25 -0700 Subject: FS RT #28105 - found more instances of megabyte to change to gigabyte --- FS/FS/part_pkg/sqlradacct_hour.pm | 8 ++++---- httemplate/view/elements/svc_radius_usage.html | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/FS/FS/part_pkg/sqlradacct_hour.pm b/FS/FS/part_pkg/sqlradacct_hour.pm index 2f9d833d0..09cf85cab 100644 --- a/FS/FS/part_pkg/sqlradacct_hour.pm +++ b/FS/FS/part_pkg/sqlradacct_hour.pm @@ -138,19 +138,19 @@ 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 ". - sprintf('%.1f', $hours). " hours: $hourscharge"; + sprintf('%.3f', $hours). " hours: $hourscharge"; } my $charges = $hourscharge + $inputcharge + $outputcharge + $totalcharge; 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: <% sprintf("%.3f", $input) %> megabytes
- Download: <% sprintf("%.3f", $output) %> megabytes
+ Upload: <% sprintf("%.3f", $input) %> gigabytes
+ Download: <% sprintf("%.3f", $output) %> gigabytes
% if ( $svc->table eq 'svc_acct' ) { Last Login: <% $svc->last_login_text %>
% } -- cgit v1.2.1 From 53288cefda78454e909759823d5e8cc6e2214bad Mon Sep 17 00:00:00 2001 From: "C.J. Adams-Collier" Date: Mon, 15 Sep 2014 18:43:19 -0700 Subject: FS RT #28105 - changing the hourly charge back to one decimal place. nobody cares about less than 6 minutes --- FS/FS/part_pkg/sqlradacct_hour.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FS/FS/part_pkg/sqlradacct_hour.pm b/FS/FS/part_pkg/sqlradacct_hour.pm index 09cf85cab..79e64fbab 100644 --- a/FS/FS/part_pkg/sqlradacct_hour.pm +++ b/FS/FS/part_pkg/sqlradacct_hour.pm @@ -150,7 +150,7 @@ sub calc_recur { } if ( $self->option('recur_hourly_charge') > 0 ) { push @$details, "Last month\'s time ". - sprintf('%.3f', $hours). " hours: $hourscharge"; + sprintf('%.1f', $hours). " hours: $hourscharge"; } my $charges = $hourscharge + $inputcharge + $outputcharge + $totalcharge; -- cgit v1.2.1