diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2012-12-20 01:51:32 -0800 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2012-12-20 01:51:32 -0800 |
| commit | ddc6218aa921664c4a3baa7e0daa81b6fbeaa658 (patch) | |
| tree | 3b505c7ca6466bbce7ca0d4577be412bb43e19dd /FS | |
| parent | 464ac8197ad03bc735092060ba20a3c3ef9c8d61 (diff) | |
add "with email address(es)" and "without postal mail invoices" to adv. customer search, RT#20708
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/cust_main/Search.pm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm index a6eb0a54d..fb516ee39 100644 --- a/FS/FS/cust_main/Search.pm +++ b/FS/FS/cust_main/Search.pm @@ -619,6 +619,27 @@ sub search { if $params->{'with_geocode'}; ## + # "with email address(es)" checkbox + ## + + push @where, + 'EXISTS ( SELECT 1 FROM cust_main_invoice + WHERE cust_main_invoice.custnum = cust_main.custnum + AND length(dest) > 5 + )' # AND dest LIKE '%@%' + if $params->{'with_email'}; + + ## + # "without postal mail invoices" checkbox + ## + + push @where, + "NOT EXISTS ( SELECT 1 FROM cust_main_invoice + WHERE cust_main_invoice.custnum = cust_main.custnum + AND dest = 'POST' )" + if $params->{'no_POST'}; + + ## # dates ## |
