diff options
author | ivan <ivan> | 2004-01-09 22:12:01 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-01-09 22:12:01 +0000 |
commit | 83b9139dab0a73a487c4b26ce22d4528d0062ea1 (patch) | |
tree | 5aaca03e18752011d2fdec21ca952457253927c7 /httemplate | |
parent | c420525265a83210f1f829e901dde872363ea811 (diff) |
add deletecredits config value to enable deletion of credits
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/view/cust_main.cgi | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index fb015671f..8123b2f82 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -554,6 +554,11 @@ function cust_pay_unapply_areyousure(href) { == true) window.location.href = href; } +function cust_credit_areyousure(href) { + if (confirm("Are you sure you want to delete this credit?") + == true) + window.location.href = href; +} </SCRIPT> END @@ -628,9 +633,13 @@ if ( $conf->config('payby-default') ne 'HIDE' ) { $cust_credit->reason, time2str("%D", $cust_credit_bill->_date), ); + my $delete = + $cust_credit->closed !~ /^Y/i && $conf->exists('deletecredits') + ? qq! (<A HREF="javascript:cust_credit_areyousure('${p}misc/delete-cust_credit.cgi?!. $cust_credit->crednum. qq!')">delete</A>)! + : ''; push @history, "$date\tCredit #$crednum: $reason<BR>". - "(applied to invoice #$invnum on $app_date)\t\t\t$amount\t"; + "(applied to invoice #$invnum on $app_date)$delete\t\t\t$amount\t"; } } |