diff options
author | ivan <ivan> | 2006-06-29 15:19:59 +0000 |
---|---|---|
committer | ivan <ivan> | 2006-06-29 15:19:59 +0000 |
commit | daaad950e1a8314eddf59a1c7d1b77c355362dc0 (patch) | |
tree | 05d38f0c4a2fde488ff2a8317d75baba4141fbfc | |
parent | 947c955be56140c4a10b16345c1b15c44b02070a (diff) |
percentage late fees too
-rwxr-xr-x | httemplate/edit/part_bill_event.cgi | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/httemplate/edit/part_bill_event.cgi b/httemplate/edit/part_bill_event.cgi index 57eedbc71..32a3f2df0 100755 --- a/httemplate/edit/part_bill_event.cgi +++ b/httemplate/edit/part_bill_event.cgi @@ -139,13 +139,21 @@ my $money_char = $conf->config('money_char') || '$'; tie my %events, 'Tie::IxHash', 'fee' => { - 'name' => 'Late fee', + 'name' => 'Late fee (flat)', 'code' => '$cust_main->charge( %%%charge%%%, \'%%%reason%%%\' );', 'html' => 'Amount <INPUT TYPE="text" SIZE="7" NAME="charge" VALUE="%%%charge%%%">'. '<BR>Reason <INPUT TYPE="text" NAME="reason" VALUE="%%%reason%%%">', 'weight' => 10, }, + 'fee_percent' => { + 'name' => 'Late fee (percentage)', + 'code' => '$cust_main->charge( sprintf(\'%.2f\', $cust_bill->owed * %%%percent%%% / 100 ), \'%%%reason%%%\' );', + 'html' => + 'Percent <INPUT TYPE="text" SIZE="2" NAME="percent" VALUE="%%%percent%%%">%'. + '<BR>Reason <INPUT TYPE="text" NAME="reason" VALUE="%%%reason%%%">', + 'weight' => 10, + }, 'suspend' => { 'name' => 'Suspend', 'code' => '$cust_main->suspend();', |