From 5ca9ba1f1e2831b1f22bbaeb414e68202093515a Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 31 Oct 2010 19:04:56 +0000 Subject: [PATCH] add search on harcoded geocode customers w/cch, RT#10376 --- FS/FS/cust_main/Search.pm | 18 ++++++++++++++++++ httemplate/search/cust_main.html | 2 +- httemplate/search/report_cust_main.html | 9 +++++++-- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm index a87928f6a..a7f876fcc 100644 --- a/FS/FS/cust_main/Search.pm +++ b/FS/FS/cust_main/Search.pm @@ -520,6 +520,13 @@ sub search { if $params->{'no_censustract'}; ## + # parse with hardcoded tax location checkbox + ## + + push @where, "geocode is not null" + if $params->{'with_geocode'}; + + ## # dates ## @@ -704,6 +711,17 @@ sub search { } + if ( $params->{'with_geocode'} ) { + + unshift @extra_headers, 'Tax location override', 'Calculated tax location'; + unshift @extra_fields, sub { my $c = shift; $c->get('geocode'); }, + sub { my $c = shift; + $c->set('geocode', ''); + $c->geocode('cch'); #XXX only cch right now + }; + + } + my $sql_query = { 'table' => 'cust_main', 'select' => $select, diff --git a/httemplate/search/cust_main.html b/httemplate/search/cust_main.html index 57538d8ca..5bfdf170b 100755 --- a/httemplate/search/cust_main.html +++ b/httemplate/search/cust_main.html @@ -45,7 +45,7 @@ my %search_hash = (); #scalars my @scalars = qw ( agentnum status address paydate_year paydate_month invoice_terms - no_censustract custbatch usernum + no_censustract with_geocode 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 5b1b878af..03b3452d6 100755 --- a/httemplate/search/report_cust_main.html +++ b/httemplate/search/report_cust_main.html @@ -110,13 +110,18 @@ -% if ( $conf->exists('cust_main-require_censustract') ) { - Without census tract +% if ( $conf->exists('enable_taxproducts') ) { + + + With hardcoded tax location + + + % } -- 2.11.0