projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adding line 246 "edit global pockage definitions costs" back in
[freeside.git]
/
FS
/
FS
/
cust_main
/
Location.pm
diff --git
a/FS/FS/cust_main/Location.pm
b/FS/FS/cust_main/Location.pm
index
52fe313
..
4f382af
100644
(file)
--- a/
FS/FS/cust_main/Location.pm
+++ b/
FS/FS/cust_main/Location.pm
@@
-24,11
+24,13
@@
BEGIN {
foreach my $f (@location_fields) {
*{"FS::cust_main::Location::$f"} = sub {
carp "WARNING: tried to set cust_main.$f with accessor" if (@_ > 1);
foreach my $f (@location_fields) {
*{"FS::cust_main::Location::$f"} = sub {
carp "WARNING: tried to set cust_main.$f with accessor" if (@_ > 1);
- shift->bill_location->$f
+ my $l = shift->bill_location;
+ $l ? $l->$f : '';
};
*{"FS::cust_main::Location::ship_$f"} = sub {
carp "WARNING: tried to set cust_main.ship_$f with accessor" if (@_ > 1);
};
*{"FS::cust_main::Location::ship_$f"} = sub {
carp "WARNING: tried to set cust_main.ship_$f with accessor" if (@_ > 1);
- shift->ship_location->$f
+ my $l = shift->ship_location;
+ $l ? $l->$f : '';
};
}
$init++;
};
}
$init++;
@@
-156,7
+158,11
@@
sub _upgrade_data {
}
}
}
}
- foreach my $cust_main (qsearch('cust_main', { bill_locationnum => '' })) {
+ foreach my $cust_main (qsearch('cust_main', {
+ bill_locationnum => '',
+ address1 => { op=>'!=', value=>'' },
+ }))
+ {
# Step 1: extract billing and service addresses into cust_location
my $custnum = $cust_main->custnum;
my $bill_location = FS::cust_location->new(
# Step 1: extract billing and service addresses into cust_location
my $custnum = $cust_main->custnum;
my $bill_location = FS::cust_location->new(