[freeside-commits] branch FREESIDE_4_BRANCH updated. 46d94c06672255639c63691db91accc651f32ba6
Christopher Burger
burgerc at 420.am
Wed Jun 28 08:34:03 PDT 2017
The branch, FREESIDE_4_BRANCH has been updated
via 46d94c06672255639c63691db91accc651f32ba6 (commit)
from 64700058e120b5ec2b0e4002cc8cbbf5db60d230 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 46d94c06672255639c63691db91accc651f32ba6
Author: Christopher Burger <burgerc at freeside.biz>
Date: Wed Jun 28 08:37:52 2017 -0400
RT# 76312 - improved code by using an array datatype rather than a string that is then later manipulated.
diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html
index b83617d..1e0b8f2 100755
--- a/httemplate/search/elements/cust_pay_or_refund.html
+++ b/httemplate/search/elements/cust_pay_or_refund.html
@@ -617,17 +617,15 @@ if ( $cgi->param('magic') ) {
}
#check for customer tags
- my $tagcount;
- my $tags;
+ my @tags;
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(',', at tags);
push @search, "cust_tag.tagnum in ($tags)";
}
-----------------------------------------------------------------------
Summary of changes:
httemplate/search/elements/cust_pay_or_refund.html | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
More information about the freeside-commits
mailing list