diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-11-20 01:45:20 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-11-20 01:45:20 -0800 |
commit | 4ed0a352b2319c2fc14ee7af09a21caf727e7b12 (patch) | |
tree | 0ddcc1a2eb26483bfec073fc0d1826574ba90a95 /FS/FS/cust_main | |
parent | 3cd4fcd5ba52826336c727b855ac12a6407a4b35 (diff) |
creating address-less free customers, RT#24968
Diffstat (limited to 'FS/FS/cust_main')
-rw-r--r-- | FS/FS/cust_main/Location.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/FS/FS/cust_main/Location.pm b/FS/FS/cust_main/Location.pm index 52fe313c6..4bcffab41 100644 --- 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); - 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); - shift->ship_location->$f + my $l = shift->ship_location; + $l ? $l->$f : ''; }; } $init++; |