diff options
author | ivan <ivan> | 2004-03-12 12:40:04 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-03-12 12:40:04 +0000 |
commit | c02feb66d969a066b203ebcf80a063213fa6dc7a (patch) | |
tree | 0f32f91d6a1bebeb460a01d0e15341be676d97a8 /httemplate | |
parent | cddf497bc74a127415f97188e27b70c04bd415ef (diff) |
add unapplycredits configuration option
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 ee5f86973..c41d2d894 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_unapply_areyousure(href) { + if (confirm("Are you sure you want to unapply this credit?") + == true) + window.location.href = href; +} function cust_credit_areyousure(href) { if (confirm("Are you sure you want to delete this credit?") == true) @@ -637,9 +642,13 @@ if ( $conf->config('payby-default') ne 'HIDE' ) { $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>)! : ''; + my $unapply = + $cust_credit->closed !~ /^Y/i && $conf->exists('unapplycredits') + ? qq! (<A HREF="javascript:cust_credit_unapply_areyousure('${p}misc/unapply-cust_credit.cgi?!. $cust_credit->crednum. qq!')">unapply</A>)! + : ''; push @history, "$date\tCredit #$crednum: $reason<BR>". - "(applied to invoice #$invnum on $app_date)$delete\t\t\t$amount\t"; + "(applied to invoice #$invnum on $app_date)$delete$unapply\t\t\t$amount\t"; } } |