X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fconfirm-address_standardize.html;h=2eae011c497bf752e49c945c4ca3666d2e09385a;hb=2dccc0bab4f744c2fcc21f966f5033de7a687a7d;hp=57201ea5ac5692becae176fc99a3c83580e050a9;hpb=2bb7db96a07599e980323c1b6b23a8c79cc17a9a;p=freeside.git diff --git a/httemplate/misc/confirm-address_standardize.html b/httemplate/misc/confirm-address_standardize.html index 57201ea5a..2eae011c4 100644 --- a/httemplate/misc/confirm-address_standardize.html +++ b/httemplate/misc/confirm-address_standardize.html @@ -11,62 +11,65 @@ Confirm address standardization

-% my @prefixes; -% if ( $old{onlyship} ) { -% @prefixes = ('ship_'); -% } elsif ( $old{same} ) { +% my @prefixes = (''); +% if ( $old{same} ) { % @prefixes = ('bill_'); -% } else { +% } elsif ( $old{billship} ) { % @prefixes = ('bill_', 'ship_'); % } % for my $pre (@prefixes) { -% my $name = $pre eq 'ship_' ? 'service' : 'billing'; -% if ( $new{$pre.'addr_clean'} ) { +% 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 @@ -90,7 +93,7 @@ Confirm address standardization % } #if censustract -% if ( $new{bill_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'} %>
- @@ -128,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';