summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorivan <ivan>2004-01-09 22:39:22 +0000
committerivan <ivan>2004-01-09 22:39:22 +0000
commitc085c3ba3bd0677719407ce613dd24466f05abe2 (patch)
tree225d0a34038316ae9ae644d705513d9900294e2a /httemplate
parentc8d3cff6e3026ac4f5dc59930220489ebe3d542f (diff)
credit deletions: need to use Date::Format and FS::Misc qw(send_email) in cust_credit.pm, need a link to delete unapplied credits too
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/view/cust_main.cgi6
1 files changed, 5 insertions, 1 deletions
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index 8123b2f82..ee5f86973 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -668,12 +668,16 @@ if ( $conf->config('payby-default') ne 'HIDE' ) {
qsearch('cust_credit',{'custnum'=>$custnum});
foreach my $credit (@credits) {
my($cref)=$credit->hashref;
+ my $delete =
+ $credit->closed !~ /^Y/i && $conf->exists('deletecredits')
+ ? qq! (<A HREF="javascript:cust_credit_areyousure('${p}misc/delete-cust_credit.cgi?!. $credit->crednum. qq!')">delete</A>)!
+ : '';
push @history,
$cref->{_date} . "\t" .
qq!<A HREF="! . popurl(2). qq!edit/cust_credit_bill.cgi?!. $cref->{crednum} . qq!">!.
'<b><font size="+1" color="#ff0000">Unapplied credit #' .
$cref->{crednum} . "</font></b></A>: ".
- $cref->{reason} . "\t\t\t" . $credit->credited . "\t";
+ $cref->{reason} . "$delete\t\t\t" . $credit->credited . "\t";
}
my(@refunds)=qsearch('cust_refund',{'custnum'=> $custnum } );