X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fconfirm-address_standardize.html;h=2eae011c497bf752e49c945c4ca3666d2e09385a;hb=bfff7e209a89e413eac7de2dd0958c184717fbf0;hp=a6f4b06e830c2a1a13b496d92e3376222cb577a9;hpb=84fa358b56b89205fff99927080d5c28c01d57ff;p=freeside.git diff --git a/httemplate/misc/confirm-address_standardize.html b/httemplate/misc/confirm-address_standardize.html index a6f4b06e8..2eae011c4 100644 --- a/httemplate/misc/confirm-address_standardize.html +++ b/httemplate/misc/confirm-address_standardize.html @@ -2,7 +2,7 @@ th { line-height: 150% }

-% if ( $new{error} or $new{ship_error} ) { +% if ( $new{bill_error} or $new{ship_error} ) { Address standardization error % } % else { @@ -11,83 +11,89 @@ Confirm address standardization

-% my @prefixes; -% if ( $old{onlyship} ) { -% @prefixes = ('ship_'); -% } elsif ( $old{same} ) { -% @prefixes = (''); -% } else { -% @prefixes = ('', 'ship_'); +% my @prefixes = (''); +% if ( $old{same} ) { +% @prefixes = ('bill_'); +% } elsif ( $old{billship} ) { +% @prefixes = ('bill_', 'ship_'); % } -% for my $pre ('', 'ship_') { -% my $name = $pre eq 'ship_' ? 'service' : 'billing'; -% if ( $new{$pre.'addr_clean'} ) { +% for my $pre (@prefixes) { +% my $name = $pre eq 'bill_' ? 'billing' : 'service'; +% if ( $new{$pre.'error'} ) { - - % if ( $old{$pre.'company'} ) { - % } - + - - - -% } # if addr_clean -% elsif ( $new{$pre.'error'} ) { +% } else { # not an error + + +% if ( !$new{$pre.'addr_clean'} ) { + + + +% } + % if ( $old{$pre.'company'} ) { + % } - + + + -% } #if error + +% } # if error % } # for $pre %# only do this part if address standardization provided a censustract -% if ( $new{'ship_censustract'} ) { +% my $pre = $old{same} ? 'bill_' : 'ship_'; +% my $censustract = $new{$pre.'censustract'}; +% my $census_error = $new{$pre.'census_error'}; +% if ( $censustract ) { - + % } #if censustract -% if ( $new{error} or $new{ship_error} ) { +% if ( grep {$new{$_.'error'}} @prefixes ) { -% } -% else { +% } else {
Entered <%$name%> addressStandardized <%$name%> address
<% $old{$pre.'company'} %><% $new{$pre.'company'} %>
<% $old{$pre.'address1'} %><% $new{$pre.'address1'} %><% $new{$pre.'error'} %>
<% $old{$pre.'address2'} %><% $new{$pre.'address2'} %>
<% $old{$pre.'city'} %>, <% $old{$pre.'state'} %> <% $old{$pre.'zip'} %><% $new{$pre.'city'} %>, <% $new{$pre.'state'} %> <% $new{$pre.'zip'} %>
Entered <%$name%> addressStandardized <%$name%> address
(unverified)
<% $old{$pre.'company'} %><% $new{$pre.'company'} %>
<% $old{$pre.'address1'} %><% $new{$pre.'error'} %><% $new{$pre.'address1'} %>
<% $old{$pre.'address2'} %><% $new{$pre.'address2'} %>
<% $old{$pre.'city'} %>, <% $old{$pre.'state'} %> <% $old{$pre.'zip'} %><% $new{$pre.'city'} %>, <% $new{$pre.'state'} %> <% $new{$pre.'zip'} %>
Entered census tract Calculated census tract
<% $old{'ship_censustract'} %><% $old{$pre.'censustract'} %> -% if ( $new{'ship_census_error'} ) { - <% $new{'ship_census_error'} %> +% if ( $census_error ) { + <% $census_error %> % } else { - <% $new{'ship_censustract'} %> + <% $censustract %> % }
- @@ -125,6 +130,6 @@ my $q = decode_json($cgi->param('q')); my %old = %{ $q->{old} }; my %new = %{ $q->{new} }; -my $addresses = $old{onlyship} ? 'address' : 'addresses'; +my $addresses = $old{billship} ? 'addresses' : 'address';