diff options
author | ivan <ivan> | 2002-10-14 06:17:16 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-10-14 06:17:16 +0000 |
commit | 2164ab67b22c5762389d84e356def0a6e9cfb1fd (patch) | |
tree | beaa3d7a2c82d484412aed5901e51250e7792ee7 /httemplate/edit/part_pkg.cgi | |
parent | a60236063190e34d918210c40e0815bc551a4a70 (diff) |
fix sql radacct billing
Diffstat (limited to 'httemplate/edit/part_pkg.cgi')
-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;\'', }, |