diff options
-rw-r--r-- | FS/FS/Schema.pm | 2 | ||||
-rw-r--r-- | FS/FS/cust_main.pm | 79 | ||||
-rwxr-xr-x | httemplate/edit/cust_main.cgi | 13 |
3 files changed, 8 insertions, 86 deletions
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 2c9af0ae2..85f68e248 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -1010,7 +1010,6 @@ sub tables_hashref { 'latitude', 'decimal', 'NULL', '10,7', '', '', 'longitude','decimal', 'NULL', '10,7', '', '', 'coord_auto', 'char', 'NULL', 1, '', '', - 'addr_clean', 'char', 'NULL', 1, '', '', 'daytime', 'varchar', 'NULL', 20, '', '', 'night', 'varchar', 'NULL', 20, '', '', 'fax', 'varchar', 'NULL', 12, '', '', @@ -1029,7 +1028,6 @@ sub tables_hashref { 'ship_latitude', 'decimal', 'NULL', '10,7', '', '', 'ship_longitude','decimal', 'NULL', '10,7', '', '', 'ship_coord_auto', 'char', 'NULL', 1, '', '', - 'ship_addr_clean', 'char', 'NULL', 1, '', '', 'ship_daytime', 'varchar', 'NULL', 20, '', '', 'ship_night', 'varchar', 'NULL', 20, '', '', 'ship_fax', 'varchar', 'NULL', 12, '', '', diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 321349e9a..9e39b3006 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -1792,20 +1792,6 @@ sub check { || $self->ut_snumbern('spouse_birthdate') || $self->ut_snumbern('anniversary_date') || $self->ut_textn('company') -<<<<<<< HEAD -======= - || $self->ut_text('address1') - || $self->ut_textn('address2') - || $self->ut_text('city') - || $self->ut_textn('county') - || $self->ut_textn('state') - || $self->ut_country('country') - || $self->ut_coordn('latitude') - || $self->ut_coordn('longitude') - || $self->ut_enum('coord_auto', [ '', 'Y' ]) - || $self->ut_enum('addr_clean', [ '', 'Y' ]) - || $self->ut_numbern('censusyear') ->>>>>>> 13763 || $self->ut_anything('comments') || $self->ut_numbern('referral_custnum') || $self->ut_textn('stateid') @@ -1876,72 +1862,7 @@ sub check { } -<<<<<<< HEAD #ship_ fields are gone -======= - if ( $self->has_ship_address - && scalar ( grep { $self->getfield($_) ne $self->getfield("ship_$_") } - $self->addr_fields ) - ) - { - my $error = - $self->ut_name('ship_last') - || $self->ut_name('ship_first') - || $self->ut_textn('ship_company') - || $self->ut_text('ship_address1') - || $self->ut_textn('ship_address2') - || $self->ut_text('ship_city') - || $self->ut_textn('ship_county') - || $self->ut_textn('ship_state') - || $self->ut_country('ship_country') - || $self->ut_coordn('ship_latitude') - || $self->ut_coordn('ship_longitude') - || $self->ut_enum('ship_coord_auto', [ '', 'Y' ] ) - ; - return $error if $error; - - #false laziness with above - unless ( qsearchs('cust_main_county', { - 'country' => $self->ship_country, - 'state' => '', - } ) ) { - return "Unknown ship_state/ship_county/ship_country: ". - $self->ship_state. "/". $self->ship_county. "/". $self->ship_country - unless qsearch('cust_main_county',{ - 'state' => $self->ship_state, - 'county' => $self->ship_county, - 'country' => $self->ship_country, - } ); - } - #eofalse - - $error = - $self->ut_phonen('ship_daytime', $self->ship_country) - || $self->ut_phonen('ship_night', $self->ship_country) - || $self->ut_phonen('ship_fax', $self->ship_country) - || $self->ut_phonen('ship_mobile', $self->ship_country) - ; - return $error if $error; - - unless ( $ignore_illegal_zip ) { - $error = $self->ut_zip('ship_zip', $self->ship_country); - return $error if $error; - } - return "Unit # is required." - if $self->ship_address2 =~ /^\s*$/ - && $conf->exists('cust_main-require_address2'); - - } else { # ship_ info eq billing info, so don't store dup info in database - - $self->setfield("ship_$_", '') - foreach $self->addr_fields; - - return "Unit # is required." - if $self->address2 =~ /^\s*$/ - && $conf->exists('cust_main-require_address2'); - - } ->>>>>>> 13763 #$self->payby =~ /^(CARD|DCRD|CHEK|DCHK|LECB|BILL|COMP|PREPAY|CASH|WEST|MCRD)$/ # or return "Illegal payby: ". $self->payby; diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index f744884d7..8c4eb8375 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -315,9 +315,6 @@ if ( $cgi->param('error') ) { $stateid = ''; $payinfo = ''; - $cust_main->coord_auto('Y'); - $cust_main->ship_coord_auto('Y'); - if ( $cgi->param('qualnum') =~ /^(\d+)$/ ) { my $qualnum = $1; my $qual = qsearchs('qual', { 'qualnum' => $qualnum } ) @@ -357,12 +354,18 @@ if ( $cgi->param('error') ) { my $statedefault = $conf->config('statedefault') || 'CA'; $cust_main->set('bill_location', FS::cust_location->new( - { country => $countrydefault, state => $statedefault } + { country => $countrydefault, + state => $statedefault, + coord_auto => 'Y' + } ) ); $cust_main->set('ship_location', FS::cust_location->new( - { country => $countrydefault, state => $statedefault } + { country => $countrydefault, + state => $statedefault, + coord_auto => 'Y' + } ) ); } |