diff options
| author | Mark Wells <mark@freeside.biz> | 2012-07-13 10:56:10 -0700 |
|---|---|---|
| committer | Mark Wells <mark@freeside.biz> | 2012-07-13 10:56:10 -0700 |
| commit | 0ad946f751d3a953c8a41eea1d30ad362ba38ace (patch) | |
| tree | 6780a5e8eaee29e65750cd19c090555062b84c22 /httemplate/search/elements | |
| parent | 26004f55ce70242d07fc8de51e24439e783e9e49 (diff) | |
one-way check batches, #17623
Diffstat (limited to 'httemplate/search/elements')
| -rw-r--r-- | httemplate/search/elements/cust_pay_batch_top.html | 2 | ||||
| -rwxr-xr-x | httemplate/search/elements/cust_pay_or_refund.html | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/httemplate/search/elements/cust_pay_batch_top.html b/httemplate/search/elements/cust_pay_batch_top.html index 005b76182..739e65b50 100644 --- a/httemplate/search/elements/cust_pay_batch_top.html +++ b/httemplate/search/elements/cust_pay_batch_top.html @@ -103,7 +103,7 @@ Batch is <% $statustext{$status} %><BR> % } </%def> <%shared> -my $show_gateways = FS::payment_gateway->count("gateway_namespace = 'Business::BatchPayment'"); +my $show_gateways = FS::payment_gateway->count("gateway_namespace = 'Business::BatchPayment' AND disabled IS NULL"); </%shared> <%init> my %opt = @_; diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html index dc3cb2a99..c60411107 100755 --- a/httemplate/search/elements/cust_pay_or_refund.html +++ b/httemplate/search/elements/cust_pay_or_refund.html @@ -357,6 +357,15 @@ if ( $cgi->param('magic') ) { $orderby = "LOWER(company || ' ' || last || ' ' || first )"; + } elsif ( $cgi->param('magic') eq 'batchnum' ) { + + $cgi->param('batchnum') =~ /^(\d+)$/ + or die "illegal batchnum: ".$cgi->param('batchnum'); + + push @search, "batchnum = $1"; + + $orderby = "LOWER(company || ' ' || last || ' ' || first )"; + } else { die "unknown search magic: ". $cgi->param('magic'); } |
