[freeside-commits] branch FREESIDE_3_BRANCH updated. 0abc5c7f0616ac61a7704f884c0fe717fd309728

Christopher Burger burgerc at 420.am
Wed Jun 28 07:43:42 PDT 2017


The branch, FREESIDE_3_BRANCH has been updated
       via  0abc5c7f0616ac61a7704f884c0fe717fd309728 (commit)
      from  48040fe7e64a95cb98182c308d3e385dbe48f483 (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 0abc5c7f0616ac61a7704f884c0fe717fd309728
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Wed Jun 28 10:42: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 f84ac3b..0eefc10 100755
--- a/httemplate/search/elements/cust_pay_or_refund.html
+++ b/httemplate/search/elements/cust_pay_or_refund.html
@@ -582,18 +582,11 @@ if ( $cgi->param('magic') ) {
   }
 
   #check for customer tags
-  my $tagcount;
-  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,";
-    }
-  }
-  if ($tags) {
-    $tags =~ s/,$//;
-    push @search, "cust_tag.tagnum in ($tags)";
+  my @tags = $cgi->param('tagnum');
+  if (@tags) {
+   my $tags = join(',', at tags);
+   $addl_from .= " LEFT JOIN cust_tag ON (cust_tag.custnum = cust_pay.custnum)";
+   push @search, "cust_tag.tagnum in ($tags)"; 
   }
 
   if ( $cgi->param('tax_names') ) {

-----------------------------------------------------------------------

Summary of changes:
 httemplate/search/elements/cust_pay_or_refund.html |   17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)




More information about the freeside-commits mailing list