summaryrefslogtreecommitdiff
path: root/httemplate/misc
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2012-11-09 17:03:41 -0800
committerMark Wells <mark@freeside.biz>2012-11-09 17:03:41 -0800
commit84fa358b56b89205fff99927080d5c28c01d57ff (patch)
tree3d379de290752f896db598a39cc8aa1879f1260f /httemplate/misc
parenta5318b8239e3a35cbbeb5510b451f5ba5f622846 (diff)
various customer location-related fixes, #13763
Diffstat (limited to 'httemplate/misc')
-rw-r--r--httemplate/misc/confirm-address_standardize.html9
-rw-r--r--httemplate/misc/xmlhttp-address_standardize.html11
2 files changed, 17 insertions, 3 deletions
diff --git a/httemplate/misc/confirm-address_standardize.html b/httemplate/misc/confirm-address_standardize.html
index 3603b95d9..a6f4b06e8 100644
--- a/httemplate/misc/confirm-address_standardize.html
+++ b/httemplate/misc/confirm-address_standardize.html
@@ -11,8 +11,15 @@ Confirm address standardization
</B><BR><BR>
<TABLE WIDTH="100%">
+% my @prefixes;
+% if ( $old{onlyship} ) {
+% @prefixes = ('ship_');
+% } elsif ( $old{same} ) {
+% @prefixes = ('');
+% } else {
+% @prefixes = ('', 'ship_');
+% }
% for my $pre ('', 'ship_') {
-% next if !$pre and $old{onlyship};
% my $name = $pre eq 'ship_' ? 'service' : 'billing';
% if ( $new{$pre.'addr_clean'} ) {
<TR>
diff --git a/httemplate/misc/xmlhttp-address_standardize.html b/httemplate/misc/xmlhttp-address_standardize.html
index f53c35fca..e28c06f3a 100644
--- a/httemplate/misc/xmlhttp-address_standardize.html
+++ b/httemplate/misc/xmlhttp-address_standardize.html
@@ -16,8 +16,15 @@ my %old = %{ decode_json($cgi->param('arg')) }
my %new;
-foreach my $pre ( '', 'ship_' ) {
- next unless ($pre || !$old{onlyship});
+my @prefixes;
+if ($old{onlyship}) {
+ @prefixes = ('ship_');
+} elsif ( $old{same} ) {
+ @prefixes = ('');
+} else {
+ @prefixes = ('', 'ship_');
+}
+foreach my $pre ( @prefixes ) {
my $location = {
map { $_ => $old{$pre.$_} }