X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fconfirm-address_standardize.html;h=9d1a5c13547a17e1484459a048ab821a6701443a;hb=6cca67f8c829f96a51684060f432b105c831af0a;hp=420e8ea1dff4c5827fa4966bee392f49e997a91d;hpb=3d0a1bb06b895c5be6e3f0517d355442a6b1e125;p=freeside.git diff --git a/httemplate/misc/confirm-address_standardize.html b/httemplate/misc/confirm-address_standardize.html index 420e8ea1d..9d1a5c135 100644 --- a/httemplate/misc/confirm-address_standardize.html +++ b/httemplate/misc/confirm-address_standardize.html @@ -1,8 +1,15 @@

-% if ( $new{bill_error} or $new{ship_error} ) { +% if ( $is_error ) { Address standardization error % } % else { @@ -10,71 +17,90 @@ Confirm address standardization % }

+
-% my @prefixes = (''); -% if ( $old{same} ) { -% @prefixes = ('bill_'); -% } elsif ( $old{billship} ) { -% @prefixes = ('bill_', 'ship_'); -% } % for my $pre (@prefixes) { % my $name = $pre eq 'bill_' ? 'billing' : 'service'; -% if ( $new{$pre.'addr_clean'} ) { +% my $rows = 5; +% if ( $new{$pre.'error'} ) { - - + + + + % if ( $old{$pre.'company'} ) { - - - - + % } + - - + + - - + - - + - -% } # if addr_clean -% elsif ( $new{$pre.'error'} ) { +% } else { # not an error +% $rows++ if !$new{$pre.'addr_clean'}; + + + + +% 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 % my $pre = $old{same} ? 'bill_' : 'ship_'; % my $censustract = $new{$pre.'censustract'}; -% my $census_error = $new{$pre.'census_error'}; % if ( $censustract ) { + + @@ -88,36 +114,21 @@ Confirm address standardization % } #if censustract -% if ( $new{bill_error} or $new{ship_error} ) { + + -% } -% else { - - - - -
Entered <%$name%> addressStandardized <%$name%> address CLASS="td_radio"> + + Entered <%$name%> address +
<% $old{$pre.'company'} %><% $new{$pre.'company'} %>
<% $old{$pre.'company'} |h %>
<% $old{$pre.'address1'} %><% $new{$pre.'address1'} %><% $old{$pre.'address1'} |h %><% $new{$pre.'error'} %>
<% $old{$pre.'address2'} %><% $new{$pre.'address2'} %><% $old{$pre.'address2'} |h %>
<% $old{$pre.'city'} %>, <% $old{$pre.'state'} %> <% $old{$pre.'zip'} %><% $new{$pre.'city'} %>, <% $new{$pre.'state'} %> <% $new{$pre.'zip'} %><% $old{$pre.'city'} |h %>, <% $old{$pre.'state'} |h %> <% $old{$pre.'zip'} |h %>
CLASS="td_radio"> + + Entered <%$name%> addressStandardized <%$name%> address CLASS="td_radio"> + +
(unverified)
<% $old{$pre.'company'} %><% $old{$pre.'company'} |h %><% $new{$pre.'company'} |h %>
<% $old{$pre.'address1'} %><% $new{$pre.'error'} %><% $old{$pre.'address1'} |h %><% $new{$pre.'address1'} |h %>
<% $old{$pre.'address2'} %><% $old{$pre.'address2'} |h %><% $new{$pre.'address2'} |h %>
<% $old{$pre.'city'} %>, <% $old{$pre.'state'} %> <% $old{$pre.'zip'} %><% $old{$pre.'city'} |h %>, <% $old{$pre.'state'} |h %> <% $old{$pre.'zip'} |h %><% $new{$pre.'city'} |h %>, <% $new{$pre.'state'} |h %> <% $new{$pre.'zip'} |h %>
+ > + Entered census tract Calculated census tract + > +
<% $old{$pre.'censustract'} %>
-
- -
- -
-% } # !error +
<%init> # slightly weird interface... @@ -128,4 +139,14 @@ my %new = %{ $q->{new} }; my $addresses = $old{billship} ? 'addresses' : 'address'; +my @prefixes = (''); +if ( $old{same} ) { + @prefixes = ('bill_'); +} elsif ( $old{billship} ) { + @prefixes = ('bill_', 'ship_'); +} + +my $census_error = $new{'census_error'}; +my $is_error = $census_error || grep { $new{$_.'error'} } @prefixes; +