From e679fff4ed72a972cc650a394814e6869719f98b Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Sun, 2 Nov 2014 12:33:23 -0800 Subject: [PATCH] search for tax-exempt customers, RT#31481 --- FS/FS/cust_main/Search.pm | 12 ++++++++++++ httemplate/search/cust_main.html | 2 +- httemplate/search/report_cust_main.html | 30 +++++++++++++++++++++++++++++- 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm index bb5891d5d..461633a72 100644 --- a/FS/FS/cust_main/Search.pm +++ b/FS/FS/cust_main/Search.pm @@ -832,6 +832,18 @@ sub search { if $params->{'no_POST'}; ## + # "tax exempt" checkbox + ## + push @where, "cust_main.tax = 'Y'" + if $params->{'tax'}; + + ## + # "not tax exempt" checkbox + ## + push @where, "(cust_main.tax = '' OR cust_main.tax IS NULL )" + if $params->{'no_tax'}; + + ## # dates ## diff --git a/httemplate/search/cust_main.html b/httemplate/search/cust_main.html index a30746307..19456e651 100755 --- a/httemplate/search/cust_main.html +++ b/httemplate/search/cust_main.html @@ -43,7 +43,7 @@ my %search_hash = (); my @scalars = qw ( agentnum salesnum status address county state zip country paydate_year paydate_month invoice_terms - no_censustract with_geocode with_email POST no_POST + no_censustract with_geocode with_email tax no_tax 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 16a8122e8..994f9503b 100755 --- a/httemplate/search/report_cust_main.html +++ b/httemplate/search/report_cust_main.html @@ -204,7 +204,35 @@ } } - + +% my @exempt_groups = grep /\S/, $conf->config('tax-cust_exempt-groups'); +% unless ( @exempt_groups ) { + +% #falze laziness with With/Without postal mail invoices + + <% mt('Tax exempt') |h %> + + + + + <% mt('Not tax exempt') |h %> + + + + +% } + <% mt('Invoice terms') |h %> -- 2.11.0