diff options
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/cust_main.pm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index d9b052859..2baf3ac16 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -8279,6 +8279,22 @@ sub search_sql { ; } + ### + # invoice terms + ### + + if ( $params->{'invoice_terms'} =~ /^([\w ]+)$/ ) { + my $terms = $1; + if ( $1 eq 'NULL' ) { + push @where, + "( cust_main.invoice_terms IS NULL OR cust_main.invoice_terms = '' )"; + } else { + push @where, + "cust_main.invoice_terms IS NOT NULL", + "cust_main.invoice_terms = '$1'"; + } + } + ## # amounts ## |