summaryrefslogtreecommitdiff
path: root/httemplate/search
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-01-19 14:05:51 -0800
committerIvan Kohler <ivan@freeside.biz>2014-01-19 14:05:51 -0800
commit2a5d3c4f83803a2ef0059b7e03bb6286efcbe900 (patch)
treee7ed52feb325c6deb26f3f734cd4a82a6511eded /httemplate/search
parent3503a3527328d16733369027ecbe5c17908fa223 (diff)
select quick payment entry batch in payment report, RT#26343
Diffstat (limited to 'httemplate/search')
-rwxr-xr-xhttemplate/search/elements/cust_pay_or_refund.html6
-rw-r--r--httemplate/search/elements/report_cust_pay_or_refund.html10
2 files changed, 14 insertions, 2 deletions
diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html
index 234121fa3..c272a1614 100755
--- a/httemplate/search/elements/cust_pay_or_refund.html
+++ b/httemplate/search/elements/cust_pay_or_refund.html
@@ -440,8 +440,6 @@ if ( $cgi->param('magic') ) {
$cgi->param('paybatch') =~ /^([\w\/\:\-\.]+)$/
or die "illegal paybatch: ". $cgi->param('paybatch');
- push @search, "paybatch = '$1'";
-
$orderby = "LOWER(company || ' ' || last || ' ' || first )";
} elsif ( $cgi->param('magic') eq 'batchnum' ) {
@@ -457,6 +455,10 @@ if ( $cgi->param('magic') ) {
die "unknown search magic: ". $cgi->param('magic');
}
+ if ( $cgi->param('paybatch') =~ /^([\w\/\:\-\.]+)$/ ) {
+ push @search, "paybatch = '$1'";
+ }
+
#unapplied payment/refund
if ( $unapplied ) {
push @select, '(' . "FS::$table"->unapplied_sql . ') AS unapplied_amount';
diff --git a/httemplate/search/elements/report_cust_pay_or_refund.html b/httemplate/search/elements/report_cust_pay_or_refund.html
index b39c7c088..25f7cdadd 100644
--- a/httemplate/search/elements/report_cust_pay_or_refund.html
+++ b/httemplate/search/elements/report_cust_pay_or_refund.html
@@ -89,6 +89,16 @@ Examples:
</TR>
% }
+% if ( $table eq 'cust_pay' ) {
+
+% # payment batch
+% # <& /elements/tr-select-batchnum.html &>
+
+% #payment "entry" batch (should probably just all become the same thing)
+ <& /elements/tr-select-paybatch.html &>
+
+% }
+
<& /elements/tr-input-lessthan_greaterthan.html,
'label' => emt('Amount'),
'field' => 'paid',