X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Fxmlhttp-address_standardize.html;h=be58618d091c13271f5b70dd778126815ad5ff17;hp=618265364e14e4ad51d08f594371962445ef5991;hb=949a80c148a8bbeeeec54c5a0be5d73b292423a5;hpb=54a357b171aa44f9399b4c146acd2afd3b686075 diff --git a/httemplate/misc/xmlhttp-address_standardize.html b/httemplate/misc/xmlhttp-address_standardize.html index 618265364..be58618d0 100644 --- a/httemplate/misc/xmlhttp-address_standardize.html +++ b/httemplate/misc/xmlhttp-address_standardize.html @@ -23,6 +23,7 @@ if ( $old{same} ) { @prefixes = ('bill_', 'ship_'); } my $all_same = 1; +my $all_clean = 1; foreach my $pre ( @prefixes ) { my $location = { @@ -43,9 +44,18 @@ foreach my $pre ( @prefixes ) { last if !$all_same; } + $all_same = 0 if ( length( $old{$pre.'censustract'} ) > 0 && + length( $new{$pre.'censustract'} ) > 0 && + $old{$pre.'censustract'} ne $new{$pre.'censustract'} ); + $all_same = 0 if $new{$pre.'error'}; + + $all_clean = 0 if !$new{$pre.'addr_clean'}; } -my $return = { old => \%old, new => \%new, all_same => $all_same }; +my $return = { old => \%old, + new => \%new, + all_same => $all_same, + all_clean => $all_clean }; warn "result:\n".encode_json($return) if $DEBUG;