summaryrefslogtreecommitdiff
path: root/httemplate/view/svc_acct.cgi
diff options
context:
space:
mode:
authorivan <ivan>2002-10-17 14:16:17 +0000
committerivan <ivan>2002-10-17 14:16:17 +0000
commitacfb0f48c226a5cba64fbe391677391128a6cbf7 (patch)
tree9e7dbc2b6b7cca0560cd5ec7abbf31f5be801d23 /httemplate/view/svc_acct.cgi
parentbc1639be3d9f32711b4740324c6de1f3bffb0124 (diff)
radacct update: use sqlradius for datasrc, not plandata options (whew)
Diffstat (limited to 'httemplate/view/svc_acct.cgi')
-rwxr-xr-xhttemplate/view/svc_acct.cgi16
1 files changed, 3 insertions, 13 deletions
diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi
index e755f87d7..dd242b980 100755
--- a/httemplate/view/svc_acct.cgi
+++ b/httemplate/view/svc_acct.cgi
@@ -146,21 +146,11 @@ print '<TR><TD ALIGN="right">RADIUS groups</TD><TD BGCOLOR="#ffffff">'.
print '</TABLE></TD></TR></TABLE><BR><BR>';
-if ( $cust_pkg && $cust_pkg->part_pkg->plan eq 'sqlradacct_hour' ) {
-
- #false laziness w/httemplate/edit/part_pkg... this stuff doesn't really
- #belong in plan data
- my %plandata = map { /^(\w+)=(.*)$/; ( $1 => $2 ); }
- split("\n", $cust_pkg->part_pkg->plandata );
+#if ( $cust_pkg && $cust_pkg->part_pkg->plan eq 'sqlradacct_hour' ) {
+if ( $cust_pkg && $part_svc->part_export('sqlradius') ) {
my $last_bill = $cust_pkg->last_bill;
- my $seconds = $svc_acct->seconds_since_sqlradacct(
- $last_bill,
- time,
- $plandata{sql_datasrc},
- $plandata{sql_username},
- $plandata{sql_password},
- );
+ my $seconds = $svc_acct->seconds_since_sqlradacct( $last_bill, time );
my $h = int($seconds/3600);
my $m = int( ($seconds%3600) / 60 );
my $s = $seconds%60;