[freeside-commits] freeside/httemplate/edit cust_main.cgi, 1.96, 1.97
Jeff Finucane,420,,
jeff at wavetail.420.am
Fri Feb 20 07:07:13 PST 2009
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail.420.am:/tmp/cvs-serv3820
Modified Files:
cust_main.cgi
Log Message:
support a default tax location outside us/ca with cch data and better handling of response from USPS (RT 4857)
Index: cust_main.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_main.cgi,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- cust_main.cgi 19 Feb 2009 13:38:28 -0000 1.96
+++ cust_main.cgi 20 Feb 2009 15:07:10 -0000 1.97
@@ -361,16 +361,23 @@
% if ( $conf->exists('enable_taxproducts') ) {
- if ( ( error || ship_error ) &&
- ( document.bottomform.elements['country'].value == 'CA' ||
+ if ( <% $taxpre %>error ) {
+
+ if ( document.bottomform.elements['country'].value == 'CA' ||
document.bottomform.elements['country'].value == 'US'
)
- )
- {
+ {
- var url = "cust_main/choose_tax_location.html?data_vendor=cch-zip;city="+document.bottomform.elements['city'].value+";state="+document.bottomform.elements['state'].value+";zip="+document.bottomform.elements['zip'].value+";country="+document.bottomform.elements['country'].value+";";
- // popup a chooser
- OLgetAJAX( url, update_geocode, 300 );
+ var url = "cust_main/choose_tax_location.html?data_vendor=cch-zip;city="+document.bottomform.elements['city'].value+";state="+document.bottomform.elements['state'].value+";zip="+document.bottomform.elements['zip'].value+";country="+document.bottomform.elements['country'].value+";";
+ // popup a chooser
+ OLgetAJAX( url, update_geocode, 300 );
+
+ } else {
+
+ document.bottomform.elements['geocode'].value = 'DEFAULT';
+ document.bottomform.submit();
+
+ }
} else
@@ -690,6 +697,7 @@
my $conf = new FS::Conf;
+my $taxpre = $conf->exists('tax-ship_address') ? 'ship_' : '';
#get record
my($custnum, $username, $password, $popnum, $cust_main, $saved_pkgpart, $saved_domsvc);
More information about the freeside-commits
mailing list