Merge branch 'patch-6' of https://github.com/gjones2/Freeside (#13854 as this bug...
[freeside.git] / httemplate / edit / cust_main.cgi
index 9b30d31..be00213 100755 (executable)
@@ -53,6 +53,7 @@
     <& /elements/location.html,
         object => $cust_main->bill_location,
         prefix => 'bill_',
+        enable_coords => 1,
     &>
     <& cust_main/after_bill_location.html, $cust_main &>
     </TABLE>
@@ -77,6 +78,7 @@
         prefix => 'ship_',
         enable_censustract => 1,
         enable_district => 1,
+        enable_coords => 1,
     &>
     </TABLE>
     <TABLE CLASS="fsinnerbox" ID="table_ship_location_blank"
@@ -313,6 +315,8 @@ if ( $cgi->param('error') ) {
   $stateid = '';
   $payinfo = '';
 
+  $cgi->param('tagnum', FS::part_tag->default_tags);
+
   if ( $cgi->param('qualnum') =~ /^(\d+)$/ ) {
     my $qualnum = $1;
     my $qual = qsearchs('qual', { 'qualnum' => $qualnum } )
@@ -351,14 +355,18 @@ if ( $cgi->param('error') ) {
     my $countrydefault = $conf->config('countrydefault') || 'US';
     my $statedefault = $conf->config('statedefault') || 'CA';
     $cust_main->set('bill_location', 
-      FS::cust_location->new(
-        { country => $countrydefault, state => $statedefault }
-      )
+      FS::cust_location->new( {
+          country => $countrydefault,
+          state => $statedefault,
+          coord_auto => 'Y',
+      } )
     );
     $cust_main->set('ship_location',
-      FS::cust_location->new(
-        { country => $countrydefault, state => $statedefault }
-      )
+      FS::cust_location->new( {
+          country => $countrydefault,
+          state => $statedefault,
+          coord_auto => 'Y',
+      } )
     );
   }