+
+ foreach ( grep { $unlike{$_} } qw( daytime night fax mobile ) ) {
+ my $phone = $cust_main->get("ship_$_");
+ next if !$phone;
+ my $contact_phone = FS::contact_phone->new({
+ 'contactnum' => $contact->contactnum,
+ 'phonetypenum' => $opt{phone_type}->{$_}->phonetypenum,
+ FS::contact::_parse_phonestring( $phone )
+ });
+ $error = $contact_phone->insert;
+ return "error migrating service contact phone for customer $custnum: $error"
+ if $error;
+ $cust_main->set("ship_$_" => '');
+ }
+
+ $cust_main->set("ship_$_" => '') foreach qw(last first company);
+ } #if %unlike
+ } #if ship_address1
+
+ # special case: should go with whichever location is used to calculate
+ # taxes, because that's the one it originally came from
+ if ( my $geocode = $cust_main->get('geocode') ) {
+ $bill_location->set('geocode' => '');
+ $ship_location->set('geocode' => '');
+
+ if ( $opt{tax_prefix} eq 'bill_' ) {
+ $bill_location->set('geocode', $geocode);
+ } elsif ( $opt{tax_prefix} eq 'ship_' ) {
+ $ship_location->set('geocode', $geocode);