summaryrefslogtreecommitdiff
path: root/httemplate/misc
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-01-13 14:22:21 -0800
committerMark Wells <mark@freeside.biz>2013-01-13 14:22:21 -0800
commitf88dda7fe57054bd030491a5b9363a1aff601bf2 (patch)
tree058e03c5a6c4d184b65906126733715e7574992b /httemplate/misc
parent2659c88ba3c5b34cf6087d874c1a26a24bed9243 (diff)
fix address standardization when changing package locations, #13763
Diffstat (limited to 'httemplate/misc')
-rwxr-xr-xhttemplate/misc/change_pkg.cgi3
-rw-r--r--httemplate/misc/confirm-address_standardize.html12
-rw-r--r--httemplate/misc/order_pkg.html3
-rw-r--r--httemplate/misc/xmlhttp-address_standardize.html10
4 files changed, 10 insertions, 18 deletions
diff --git a/httemplate/misc/change_pkg.cgi b/httemplate/misc/change_pkg.cgi
index 7b08f7b10..03e336cba 100755
--- a/httemplate/misc/change_pkg.cgi
+++ b/httemplate/misc/change_pkg.cgi
@@ -32,9 +32,6 @@
<& /elements/standardize_locations.html,
'form' => "OrderPkgForm",
- 'onlyship' => 1,
- 'no_company' => 1,
- 'no_census' => 1,
'callback' => 'document.OrderPkgForm.submit();',
&>
diff --git a/httemplate/misc/confirm-address_standardize.html b/httemplate/misc/confirm-address_standardize.html
index 57201ea5a..420e8ea1d 100644
--- a/httemplate/misc/confirm-address_standardize.html
+++ b/httemplate/misc/confirm-address_standardize.html
@@ -11,16 +11,14 @@ Confirm address standardization
</B><BR><BR>
<TABLE WIDTH="100%">
-% 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';
+% my $name = $pre eq 'bill_' ? 'billing' : 'service';
% if ( $new{$pre.'addr_clean'} ) {
<TR>
<TH>Entered <%$name%> address</TH>
@@ -128,6 +126,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';
</%init>
diff --git a/httemplate/misc/order_pkg.html b/httemplate/misc/order_pkg.html
index bfc7b6903..993ea366c 100644
--- a/httemplate/misc/order_pkg.html
+++ b/httemplate/misc/order_pkg.html
@@ -129,9 +129,6 @@
<& /elements/standardize_locations.html,
'form' => "OrderPkgForm",
- 'onlyship' => 1,
- 'no_company' => 1,
- 'no_census' => 1,
'callback' => 'document.OrderPkgForm.submit();',
&>
diff --git a/httemplate/misc/xmlhttp-address_standardize.html b/httemplate/misc/xmlhttp-address_standardize.html
index 988057163..15f266ab0 100644
--- a/httemplate/misc/xmlhttp-address_standardize.html
+++ b/httemplate/misc/xmlhttp-address_standardize.html
@@ -16,12 +16,10 @@ my %old = %{ decode_json($cgi->param('arg')) }
my %new;
-my @prefixes;
-if ($old{onlyship}) {
- @prefixes = ('ship_');
-} elsif ( $old{same} ) {
+my @prefixes = ('');
+if ( $old{same} ) {
@prefixes = ('bill_');
-} else {
+} elsif ( $old{billship} ) {
@prefixes = ('bill_', 'ship_');
}
my $all_same = 1;
@@ -44,6 +42,8 @@ foreach my $pre ( @prefixes ) {
$all_same = 0 if ( $new{$pre.$_} ne $old{$pre.$_} );
last if !$all_same;
}
+
+ $all_same = 0 if $new{$pre.'error'};
}
my $return = { old => \%old, new => \%new, all_same => $all_same };