summaryrefslogtreecommitdiff
path: root/FS/FS/cust_bill.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2014-05-20 18:14:58 -0700
committerMark Wells <mark@freeside.biz>2014-05-20 18:14:58 -0700
commit8b1320ce3eca72830fe8b138f07b22968e349f96 (patch)
tree8f2a668754a84f72e65dc014ee82496b1b28e18b /FS/FS/cust_bill.pm
parent24b3cded842823df810e6bee6ef66237c783f033 (diff)
search voided invoices, #28684
Diffstat (limited to 'FS/FS/cust_bill.pm')
-rw-r--r--FS/FS/cust_bill.pm24
1 files changed, 24 insertions, 0 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm
index 44e7b4682..3a5007a0c 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -3375,6 +3375,22 @@ flag, return net invoices only
=item newest_percust
+=item custnum
+
+Return only invoices belonging to that customer.
+
+=item cust_classnum
+
+Limit to that customer class (single value or arrayref).
+
+=item payby
+
+Limit to customers with that payment method (single value or arrayref).
+
+=item refnum
+
+Limit to customers with that advertising source.
+
=back
Note: validates all passed-in data; i.e. safe to use with unchecked CGI params.
@@ -3426,6 +3442,14 @@ sub search_sql_where {
}
+ #payby
+ if ( $param->{payby} ) {
+ my $payby = $param->{payby};
+ $payby = [ $payby ] unless ref $payby;
+ my $payby_in = join(',', map {dbh->quote($_)} @$payby);
+ push @search, "cust_main.payby IN($payby_in)" if length($payby_in);
+ }
+
#_date
if ( $param->{_date} ) {
my($beginning, $ending) = @{$param->{_date}};