+ } # foreach my $field
+ # finished importing columns
+
+ $bill_location{'country'} ||= $conf->config('countrydefault') || 'US';
+ $cust_main{'bill_location'} = FS::cust_location->new(\%bill_location);
+ if ( grep $_, values(%ship_location) ) {
+ $ship_location{'country'} ||= $conf->config('countrydefault') || 'US';
+ $cust_main{'ship_location'} = FS::cust_location->new(\%ship_location);
+ } else {
+ $cust_main{'ship_location'} = $cust_main{'bill_location'};