summaryrefslogtreecommitdiff
path: root/httemplate/search/elements
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2017-06-27 11:08:06 -0400
committerChristopher Burger <burgerc@freeside.biz>2017-06-27 11:08:06 -0400
commitb35525aa2582072e01d9a62f125e6803b5d3cb34 (patch)
treeaf848a55bc7367ecf7f78b35eaf42b513137d15b /httemplate/search/elements
parentaadc07f765a7cdb6bc00cf89089c7e147b58d6f1 (diff)
RT# 76312 - added customer tags to search options for payment report.
Diffstat (limited to 'httemplate/search/elements')
-rwxr-xr-xhttemplate/search/elements/cust_pay_or_refund.html15
-rw-r--r--httemplate/search/elements/report_cust_pay_or_refund.html4
2 files changed, 19 insertions, 0 deletions
diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html
index 96d044fa0..6bd3db622 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 b69f82624..e05f1af73 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'),