X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fview%2Fcust_main.cgi;h=8123b2f8270816d2a1556783db4b450bcb703c2d;hb=f3212b82d6d54500bbe31c02c8ffa456f018a067;hp=fb015671f6a5e1c14b2fe59a96688917effb40db;hpb=e68e85f88922d6678a9c6fc1a7624065e38b7361;p=freeside.git
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";
}
}