diff options
author | ivan <ivan> | 2002-10-14 06:17:14 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-10-14 06:17:14 +0000 |
commit | 7bb23c47594c1111aecb5fe8fdb2042e509cca86 (patch) | |
tree | 6fa1136cace34f5ae9f65535f8820bfb07b0e1b6 /httemplate/edit | |
parent | 05030dc1852f7886f3b792b5a5fe469dcaa36199 (diff) |
fix sql radacct billing
Diffstat (limited to 'httemplate/edit')
-rwxr-xr-x | httemplate/edit/part_pkg.cgi | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index ddd86765a..5fbcd0bd1 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -382,7 +382,7 @@ tie my %plans, 'Tie::IxHash', }, 'fieldorder' => [ 'setup_fee', 'recur_flat', 'recur_included_hours', 'recur_hourly_charge' ], 'setup' => 'what.setup_fee.value', - 'recur' => '\'my ($sec,$min,$hour,$mday,$mon,$year) = (localtime($sdate))[0,1,2,3,4,5]; $mon+=$part_pkg->freq; until ($mon<12) { $mon-=12; $year++ }; $edate = timelocal($sec,$min,$hour,$mday,$mon,$year); my $hours = $cust_pkg->seconds_since_sqlradacct($sdate, $edate, \' + what.sql_datasrc + \', \' + what.sql_username + \', \' + what.sql_password + \' ) / 3600 - \' + what.recur_included_hours.value + \'; $hours = 0 if $hours < 0; \' + what.recur_flat.value + \' + \' + what.recur_hourly_charge.value + \' * $hours;\'', + 'recur' => '\'my $hours = $cust_pkg->seconds_since_sqlradacct($cust_pkg->last_bill, $sdate, \' + what.sql_datasrc + \', \' + what.sql_username + \', \' + what.sql_password + \' ) / 3600 - \' + what.recur_included_hours.value + \'; $hours = 0 if $hours < 0; \' + what.recur_flat.value + \' + \' + what.recur_hourly_charge.value + \' * $hours;\'', }, |