projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DID selection for fibernetics, RT#19883
[freeside.git]
/
httemplate
/
misc
/
xmlhttp-address_standardize.html
diff --git
a/httemplate/misc/xmlhttp-address_standardize.html
b/httemplate/misc/xmlhttp-address_standardize.html
index
e28c06f
..
9880571
100644
(file)
--- a/
httemplate/misc/xmlhttp-address_standardize.html
+++ b/
httemplate/misc/xmlhttp-address_standardize.html
@@
-20,10
+20,11
@@
my @prefixes;
if ($old{onlyship}) {
@prefixes = ('ship_');
} elsif ( $old{same} ) {
if ($old{onlyship}) {
@prefixes = ('ship_');
} elsif ( $old{same} ) {
- @prefixes = ('');
+ @prefixes = ('
bill_
');
} else {
} else {
- @prefixes = ('', 'ship_');
+ @prefixes = ('
bill_
', 'ship_');
}
}
+my $all_same = 1;
foreach my $pre ( @prefixes ) {
my $location = {
foreach my $pre ( @prefixes ) {
my $location = {
@@
-38,8
+39,13
@@
foreach my $pre ( @prefixes ) {
foreach ( keys(%$cache) ) {
$new{$pre.$_} = $cache->get($_);
}
foreach ( keys(%$cache) ) {
$new{$pre.$_} = $cache->get($_);
}
+
+ foreach ( qw(address1 address2 city state zip country) ) {
+ $all_same = 0 if ( $new{$pre.$_} ne $old{$pre.$_} );
+ last if !$all_same;
+ }
}
}
-my $return = { old => \%old, new => \%new };
+my $return = { old => \%old, new => \%new
, all_same => $all_same
};
warn "result:\n".encode_json($return) if $DEBUG;
</%init>
warn "result:\n".encode_json($return) if $DEBUG;
</%init>