summaryrefslogtreecommitdiff
path: root/FS/FS/cust_bill.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2014-05-20 18:15:18 -0700
committerMark Wells <mark@freeside.biz>2014-05-20 18:15:18 -0700
commit523a0d904238cd573e4ae6a4a12dfcfea37cd703 (patch)
tree1714c4534bdccc56ac645699c3a21a347e7fcf9c /FS/FS/cust_bill.pm
parent2224bc4165a482da4bbaf4f09210f358cd825f99 (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 cd85f67..1b765fa 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -3317,6 +3317,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.
@@ -3368,6 +3384,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}};