From: ivan Date: Sat, 14 Nov 2009 00:08:21 +0000 (+0000) Subject: add invoice terms to advanced customer report. dogfood. X-Git-Tag: freeside_1_9_2~231 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=2339b763230e33505b8a5302acd32269fbfd9f7e;p=freeside.git add invoice terms to advanced customer report. dogfood. --- 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 ## diff --git a/httemplate/elements/select-terms.html b/httemplate/elements/select-terms.html index 629d1e464..52f9fb542 100644 --- a/httemplate/elements/select-terms.html +++ b/httemplate/elements/select-terms.html @@ -2,7 +2,18 @@ ID = "invoice_terms" <% $opt{'disabled'} ? 'DISABLED' : ''%> > -