X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fconfirm-address_standardize.html;h=9d1a5c13547a17e1484459a048ab821a6701443a;hb=6cca67f8c829f96a51684060f432b105c831af0a;hp=2eae011c497bf752e49c945c4ca3666d2e09385a;hpb=b1d823bed5c9d953a62f2b6245b71cbbab191bda;p=freeside.git diff --git a/httemplate/misc/confirm-address_standardize.html b/httemplate/misc/confirm-address_standardize.html index 2eae011c4..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,38 +17,47 @@ 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'; +% my $rows = 5; % if ( $new{$pre.'error'} ) { - + + + + -% if ( $old{$pre.'company'} ) { - - +% if ( $old{$pre.'company'} ) { + % } + - + - + - + % } else { # not an error +% $rows++ if !$new{$pre.'addr_clean'}; + + % if ( !$new{$pre.'addr_clean'} ) { @@ -52,21 +68,21 @@ Confirm address standardization % if ( $old{$pre.'company'} ) { - - + + % } - - + + - - + + - - + + % } # if error @@ -75,11 +91,16 @@ Confirm address standardization %# 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 ) { + + @@ -93,35 +114,21 @@ Confirm address standardization % } #if censustract -% if ( grep {$new{$_.'error'}} @prefixes ) { + + -% } else { - - - - -
Entered <%$name%> address CLASS="td_radio"> + + Entered <%$name%> address +
<% $old{$pre.'company'} %>
<% $old{$pre.'company'} |h %>
<% $old{$pre.'address1'} %><% $old{$pre.'address1'} |h %> <% $new{$pre.'error'} %>
<% $old{$pre.'address2'} %><% $old{$pre.'address2'} |h %>
<% $old{$pre.'city'} %>, <% $old{$pre.'state'} %> <% $old{$pre.'zip'} %><% $old{$pre.'city'} |h %>, <% $old{$pre.'state'} |h %> <% $old{$pre.'zip'} |h %>
CLASS="td_radio"> + + Entered <%$name%> address Standardized <%$name%> address CLASS="td_radio"> + +
<% $old{$pre.'company'} %><% $new{$pre.'company'} %><% $old{$pre.'company'} |h %><% $new{$pre.'company'} |h %>
<% $old{$pre.'address1'} %><% $new{$pre.'address1'} %><% $old{$pre.'address1'} |h %><% $new{$pre.'address1'} |h %>
<% $old{$pre.'address2'} %><% $new{$pre.'address2'} %><% $old{$pre.'address2'} |h %><% $new{$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 %><% $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... @@ -132,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; +