From f3212b82d6d54500bbe31c02c8ffa456f018a067 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 9 Jan 2004 22:11:54 +0000 Subject: add deletecredits config value to enable deletion of credits --- httemplate/view/cust_main.cgi | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'httemplate/view/cust_main.cgi') 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; +} 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! (delete)! + : ''; push @history, "$date\tCredit #$crednum: $reason
". - "(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"; } } -- cgit v1.2.1