X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_pkg.cgi;h=187578a35a6a9415956205db0fdd71f14be5a77f;hb=f076e082da5f5ec892e2ff6919e478baa1fd2274;hp=b6ecff2d0d7b77752e3250ea470017bb3c33e73d;hpb=5d65d52a1b53172da6bcaf37cc375a3f4f3edfd9;p=freeside.git diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index b6ecff2d0..187578a35 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -67,7 +67,7 @@ print '
'; print "Package Part #", $hashref->{pkgpart} ? $hashref->{pkgpart} : "(NEW)"; print ntable("#cccccc",2), <Package (customer-visable) +Package (customer-visible) Comment (customer-hidden) Frequency (months) of recurring fee  0=no recurring fee, 1=monthly, 3=quarterly, 12=yearly Setup fee tax exempt @@ -355,6 +355,28 @@ tie my %plans, 'Tie::IxHash', }, + 'sqlradacct_hour' => { + 'name' => 'Base charge plus charge per-hour from an external sqlradius radacct table', + 'fields' => { + 'setup_fee' => { 'name' => 'Setup fee for this package', + 'default' => 0, + }, + 'recur_flat' => { 'name' => 'Base monthly charge for this package', + 'default' => 0, + }, + 'recur_included_hours' => { 'name' => 'Hours included', + 'default' => 0, + }, + 'recur_hourly_charge' => { 'name' => 'Additional charge per hour', + 'default' => 0, + }, + }, + '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 ) / 3600 - \' + what.recur_included_hours.value + \'; $hours = 0 if $hours < 0; \' + what.recur_flat.value + \' + \' + what.recur_hourly_charge.value + \' * $hours;\'', + }, + + ; my %plandata = map { /^(\w+)=(.*)$/; ( $1 => $2 ); }