[freeside-commits] branch master updated. b35525aa2582072e01d9a62f125e6803b5d3cb34

Christopher Burger burgerc at 420.am
Tue Jun 27 08:08:57 PDT 2017


The branch, master has been updated
       via  b35525aa2582072e01d9a62f125e6803b5d3cb34 (commit)
      from  aadc07f765a7cdb6bc00cf89089c7e147b58d6f1 (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 b35525aa2582072e01d9a62f125e6803b5d3cb34
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Tue Jun 27 11:08:06 2017 -0400

    RT# 76312 - added customer tags to search options for payment report.

diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html
index 96d044f..6bd3db6 100755
--- a/httemplate/search/elements/cust_pay_or_refund.html
+++ b/httemplate/search/elements/cust_pay_or_refund.html
@@ -462,6 +462,21 @@ 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)";
+  }
+
   if ( $cgi->param('tax_names') ) {
     if ( dbh->{Driver}->{Name} =~ /^Pg/i ) {
 
diff --git a/httemplate/search/elements/report_cust_pay_or_refund.html b/httemplate/search/elements/report_cust_pay_or_refund.html
index b69f826..e05f1af 100644
--- a/httemplate/search/elements/report_cust_pay_or_refund.html
+++ b/httemplate/search/elements/report_cust_pay_or_refund.html
@@ -127,6 +127,10 @@ Examples:
     </TH>
   </TR>
 
+  <& /elements/tr-select-cust_tag.html,
+             'custnum' => $opt{'custnum'},
+  &>
+
   <& /elements/tr-select-agent.html,
                  'curr_value'    => scalar($cgi->param('agentnum')),
                  'label'         => emt('Agent'),

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

Summary of changes:
 httemplate/search/elements/cust_pay_or_refund.html      |   15 +++++++++++++++
 .../search/elements/report_cust_pay_or_refund.html      |    4 ++++
 2 files changed, 19 insertions(+)




More information about the freeside-commits mailing list