projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git]
/
httemplate
/
search
/
elements
/
cust_pay_or_refund.html
diff --git
a/httemplate/search/elements/cust_pay_or_refund.html
b/httemplate/search/elements/cust_pay_or_refund.html
index
6bd3db6
..
187fc83
100755
(executable)
--- a/
httemplate/search/elements/cust_pay_or_refund.html
+++ b/
httemplate/search/elements/cust_pay_or_refund.html
@@
-463,17
+463,15
@@
if ( $cgi->param('magic') ) {
}
#check for customer tags
}
#check for customer tags
- my $tagcount;
- my $tags;
+ my @tags;
foreach my $p (keys $cgi->Vars) {
if ($p =~ /^tagnum(\d+)/ && $1) {
foreach my $p (keys $cgi->Vars) {
if ($p =~ /^tagnum(\d+)/ && $1) {
- $tagcount++;
- $addl_from .= " LEFT JOIN cust_tag ON (cust_tag.custnum = cust_pay.custnum)" unless $tagcount > 1;
- $tags .= "$1,";
+ $addl_from .= " LEFT JOIN cust_tag ON (cust_tag.custnum = cust_pay.custnum)" unless @tags;
+ push @tags, $1;
}
}
}
}
- if (
$
tags) {
-
$tags =~ s/,$//
;
+ if (
@
tags) {
+
my $tags = join(',',@tags)
;
push @search, "cust_tag.tagnum in ($tags)";
}
push @search, "cust_tag.tagnum in ($tags)";
}