X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_pkg.cgi;h=187578a35a6a9415956205db0fdd71f14be5a77f;hb=f076e082da5f5ec892e2ff6919e478baa1fd2274;hp=5fbcd0bd1fe0ffedfd238c1eb490ecd276171184;hpb=7bb23c47594c1111aecb5fe8fdb2042e509cca86;p=freeside.git diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index 5fbcd0bd1..187578a35 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -356,7 +356,7 @@ tie my %plans, 'Tie::IxHash', }, 'sqlradacct_hour' => { - 'name' => 'Base charge plus charge per-hour from an external SQL radacct table', + 'name' => 'Base charge plus charge per-hour from an external sqlradius radacct table', 'fields' => { 'setup_fee' => { 'name' => 'Setup fee for this package', 'default' => 0, @@ -364,15 +364,6 @@ tie my %plans, 'Tie::IxHash', 'recur_flat' => { 'name' => 'Base monthly charge for this package', 'default' => 0, }, - 'sql_datasrc' => { 'name' => 'DBI data source', - 'default' => 'DBI:mysql:host=radius.server.name;dbname=radius', - }, - 'sql_username' => { 'name' => 'Database username', - 'default' => 'radius', - }, - 'sql_password' => { 'name' => 'Database password', - 'default' => '', - }, 'recur_included_hours' => { 'name' => 'Hours included', 'default' => 0, }, @@ -382,7 +373,7 @@ tie my %plans, 'Tie::IxHash', }, 'fieldorder' => [ 'setup_fee', 'recur_flat', 'recur_included_hours', 'recur_hourly_charge' ], 'setup' => 'what.setup_fee.value', - '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;\'', + 'recur' => '\'my $hours = $cust_pkg->seconds_since_sqlradacct($cust_pkg->last_bill, $sdate ) / 3600 - \' + what.recur_included_hours.value + \'; $hours = 0 if $hours < 0; \' + what.recur_flat.value + \' + \' + what.recur_hourly_charge.value + \' * $hours;\'', },