summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2002-11-05 23:41:09 +0000
committerivan <ivan>2002-11-05 23:41:09 +0000
commitd17fa8f5a57ec5e6a4985e24eaadfb9de37e9135 (patch)
tree53063f43b06a43509dcc81698b1e5ab45d857f80
parent32f89323fd86acd0370081628f88a0c9db1cf034 (diff)
fix for correct radacct column names
-rwxr-xr-xhttemplate/edit/part_pkg.cgi2
-rwxr-xr-xhttemplate/view/svc_acct.cgi4
2 files changed, 3 insertions, 3 deletions
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index 6141c0083..bbecd0c52 100755
--- a/httemplate/edit/part_pkg.cgi
+++ b/httemplate/edit/part_pkg.cgi
@@ -395,7 +395,7 @@ tie my %plans, 'Tie::IxHash',
},
'fieldorder' => [qw( setup_fee recur_flat recur_included_hours recur_hourly_charge recur_included_input recur_input_charge recur_included_input recur_output_charge recur_included_total recur_total_charge )],
'setup' => 'what.setup_fee.value',
- 'recur' => '\'my $last_bill = $cust_pkg->last_bill; my $hours = $cust_pkg->seconds_since_sqlradacct($last_bill, $sdate ) / 3600 - \' + what.recur_included_hours.value + \'; $hours = 0 if $hours < 0; my $input = $cust_pkg->attribute_since_sqlradacct($last_bill, $sdate, "Acct-Input-Octets" ) / 1048576; my $output = $cust_pkg->attribute_since_sqlradacct($last_bill, $sdate, "Acct-Output-Octets" ) / 1048576; my $total = $input + $output - \' + what.recur_included_total.value + \'; $total = 0 if $total < 0; my $input = $input - \' + what.recur_included_input.value + \'; $input = 0 if $input < 0; my $output = $output - \' + what.recur_included_output.value + \'; $output = 0 if $output < 0; \' + what.recur_flat.value + \' + \' + what.recur_hourly_charge.value + \' * $hours + \' + what.recur_input_charge + \' * $input + \' + what.recur_output_charge + \' * $output + \' + what.recur_total_charge + \' * $total ;\'',
+ 'recur' => '\'my $last_bill = $cust_pkg->last_bill; my $hours = $cust_pkg->seconds_since_sqlradacct($last_bill, $sdate ) / 3600 - \' + what.recur_included_hours.value + \'; $hours = 0 if $hours < 0; my $input = $cust_pkg->attribute_since_sqlradacct($last_bill, $sdate, "AcctInputOctets" ) / 1048576; my $output = $cust_pkg->attribute_since_sqlradacct($last_bill, $sdate, "AcctOutputOctets" ) / 1048576; my $total = $input + $output - \' + what.recur_included_total.value + \'; $total = 0 if $total < 0; my $input = $input - \' + what.recur_included_input.value + \'; $input = 0 if $input < 0; my $output = $output - \' + what.recur_included_output.value + \'; $output = 0 if $output < 0; \' + what.recur_flat.value + \' + \' + what.recur_hourly_charge.value + \' * $hours + \' + what.recur_input_charge + \' * $input + \' + what.recur_output_charge + \' * $output + \' + what.recur_total_charge + \' * $total ;\'',
},
;
diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi
index 7f7c25c66..7ca7a8498 100755
--- a/httemplate/view/svc_acct.cgi
+++ b/httemplate/view/svc_acct.cgi
@@ -84,10 +84,10 @@ if ( $part_svc->part_export('sqlradius') ) {
my $s = $seconds%60;
my $input = $svc_acct->attribute_since_sqlradacct(
- $last_bill, time, 'Acct-Input-Octets'
+ $last_bill, time, 'AcctInputOctets'
) / 1048576;
my $output = $svc_acct->attribute_since_sqlradacct(
- $last_bill, time, 'Acct-Output-Octets'
+ $last_bill, time, 'AcctOutputOctets'
) / 1048576;
if ( $seconds ) {