summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
authorjeff <jeff>2001-09-01 21:52:20 +0000
committerjeff <jeff>2001-09-01 21:52:20 +0000
commit6412f71a3557249225abf5eb2096ebad1729c585 (patch)
treee8365251d39c29387ba68dce8a3fb56564d407b7 /httemplate/view
parentcdd5aa1d86cd5b266e02bed58570c97c2d7698ba (diff)
add cust_credit_bill relating multiple invoices to credits
Diffstat (limited to 'httemplate/view')
-rwxr-xr-xhttemplate/view/cust_main.cgi12
1 files changed, 9 insertions, 3 deletions
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index cba702670..492183d11 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -1,5 +1,5 @@
<%
-#<!-- $Id: cust_main.cgi,v 1.5 2001-08-28 14:34:14 ivan Exp $ -->
+#<!-- $Id: cust_main.cgi,v 1.6 2001-09-01 21:52:20 jeff Exp $ -->
use strict;
use vars qw ( $cgi $query $custnum $cust_main $hashref $agent $referral
@@ -357,9 +357,15 @@ foreach $bill (@bills) {
@credits = qsearch('cust_credit',{'custnum'=>$custnum});
foreach $credit (@credits) {
my($cref)=$credit->hashref;
+ my($credited)=$credit->credited;
push @history,
- $cref->{_date} . "\tCredit #" . $cref->{crednum} . ", (Balance \$" .
- $cref->{credited} . ") by " . $cref->{otaker} . " - " .
+ $cref->{_date} . "\t" .
+ ($credited ?
+ (qq!<A HREF="! . popurl(2). qq!edit/cust_credit_bill.cgi?!. $cref->{crednum} . qq!">!) :
+ "") .
+ "Credit #" .
+ $cref->{crednum} . ", (Balance \$" .
+ $credited . ")" . ($credited ? "</A>" : "") .
$cref->{reason} . "\t\t\t" . $cref->{amount} . "\t";
my(@refunds)=qsearch('cust_refund',{'crednum'=> $cref->{crednum} } );