From eaf1b3660fc8ce4436dae0b2e50545c563c6a8b5 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Mon, 25 Mar 2013 23:45:45 -0700 Subject: [PATCH] add "with postal invoicing" to customer search, RT#14148 --- FS/FS/cust_main/Search.pm | 10 ++++++++++ httemplate/search/cust_main.html | 2 +- httemplate/search/report_cust_main.html | 20 +++++++++++++++++++- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm index f799b519e..d8f620f90 100644 --- a/FS/FS/cust_main/Search.pm +++ b/FS/FS/cust_main/Search.pm @@ -646,6 +646,16 @@ sub search { if $params->{'with_email'}; ## + # "with postal mail invoices" checkbox + ## + + push @where, + "EXISTS ( SELECT 1 FROM cust_main_invoice + WHERE cust_main_invoice.custnum = cust_main.custnum + AND dest = 'POST' )" + if $params->{'POST'}; + + ## # "without postal mail invoices" checkbox ## diff --git a/httemplate/search/cust_main.html b/httemplate/search/cust_main.html index af9e95998..24348ff8a 100755 --- a/httemplate/search/cust_main.html +++ b/httemplate/search/cust_main.html @@ -42,7 +42,7 @@ my %search_hash = (); #scalars my @scalars = qw ( agentnum status address zip paydate_year paydate_month invoice_terms - no_censustract with_geocode with_email no_POST + no_censustract with_geocode with_email POST no_POST custbatch usernum cancelled_pkgs cust_fields flattened_pkgs diff --git a/httemplate/search/report_cust_main.html b/httemplate/search/report_cust_main.html index 13f9396b9..bac4346cf 100755 --- a/httemplate/search/report_cust_main.html +++ b/httemplate/search/report_cust_main.html @@ -184,10 +184,28 @@ + <% mt('With postal mail invoices') |h %> + + + + <% mt('Without postal mail invoices') |h %> - + + +   -- 2.11.0