[freeside-commits] freeside/httemplate/edit/cust_main bottomfixup.js, 1.7, 1.8 choose_tax_location.html, 1.5, 1.6 contact.html, 1.14, 1.15
Jeff Finucane,420,,
jeff at wavetail.420.am
Mon Oct 5 07:04:12 PDT 2009
Update of /home/cvs/cvsroot/freeside/httemplate/edit/cust_main
In directory wavetail.420.am:/tmp/cvs-serv16258
Modified Files:
bottomfixup.js choose_tax_location.html contact.html
Log Message:
low hanging fruit: improvement in tax location selection RT#6000
Index: bottomfixup.js
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_main/bottomfixup.js,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- bottomfixup.js 22 Aug 2009 00:29:37 -0000 1.7
+++ bottomfixup.js 5 Oct 2009 14:04:10 -0000 1.8
@@ -197,6 +197,7 @@
var country_el = cf.elements['<% $taxpre %>country'];
var country = country_el.options[ country_el.selectedIndex ].value;
+ var geocode = cf.elements['geocode'].value;
if ( country == 'CA' || country == 'US' ) {
@@ -209,6 +210,7 @@
";state=" + state +
";zip=" + cf.elements['<% $taxpre %>zip'].value +
";country=" + country +
+ ";geocode=" + geocode +
";";
// popup a chooser
Index: contact.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_main/contact.html,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- contact.html 27 Jul 2009 03:26:46 -0000 1.14
+++ contact.html 5 Oct 2009 14:04:10 -0000 1.15
@@ -111,6 +111,8 @@
$cust_main->set('stateid_state', $cust_main->state )
unless $pre || $cust_main->get('stateid_state');
+$opt{geocode} ||= $cust_main->get('geocode');
+
if ( $conf->exists('cust_main-require_censustract') ) {
$opt{censustract} ||= $cust_main->censustract;
}
Index: choose_tax_location.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_main/choose_tax_location.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- choose_tax_location.html 29 Jun 2009 13:53:24 -0000 1.5
+++ choose_tax_location.html 5 Oct 2009 14:04:10 -0000 1.6
@@ -1,5 +1,6 @@
<FORM NAME="choosegeocodeform">
<CENTER><BR><B>Choose tax location</B><BR><BR>
+<P>the geocode is:<% $header %></P>
<P STYLE="<% $style %>"><% $header %></P>
<SELECT NAME='geocodes' ID='geocodes' STYLE="<% $style %>">
@@ -18,7 +19,7 @@
% foreach qw( city county state );
% $content .= $location->cityflag eq 'I' ? 'Y' : 'N' ;
% my $selected = '' ;
-% if (!$have_selected && lc($location->city) eq lc($location{city})) {
+% if ($geocode && $location->geocode eq $geocode) {
% $selected = 'SELECTED';
% }
<OPTION VALUE="<% $value %>" STYLE="<% $style %>" <% $selected %>><% $content %>
@@ -36,7 +37,6 @@
<%init>
my $conf = new FS::Conf;
-my $have_selected = 0;
my %location = ();
@@ -46,6 +46,8 @@
($location{zip}) = $cgi->param('zip') =~ /^([-\w ]+)$/;
($location{country}) = $cgi->param('country') =~ /^([\w ]+)$/;
+my($geocode) = $cgi->param('geocode') =~ /^([\w]+)$/;
+
my($zip5, $zip4) = split('-', $location{zip});
#only support US & CA
More information about the freeside-commits
mailing list