X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Flocation_Mixin.pm;h=d32b4a37ca06eb940d866ce140496f9b4c9dc5d8;hb=10c9cff441ddc9e46e419ca8bb566bf752a8c7cf;hp=675e0025598e1ccb91446428130be10522510a87;hpb=9e570867c27b5336f4fa701c84b70fd65791f87c;p=freeside.git diff --git a/FS/FS/location_Mixin.pm b/FS/FS/location_Mixin.pm index 675e00255..d32b4a37c 100644 --- a/FS/FS/location_Mixin.pm +++ b/FS/FS/location_Mixin.pm @@ -36,8 +36,22 @@ Returns the label of the location object (see L). sub location_label { my $self = shift; - my $object = $self->cust_location_or_main; + my $object = $self->cust_location_or_main or return ''; $object->location_label(@_); } +=item location_hash + +Returns a hash of values for the location, either from the location object, +the cust_main shipping address, or the cust_main address, whichever is present +first. + +=cut + +sub location_hash { + my $self = shift; + my $object = $self->cust_location_or_main; + $object->location_hash(@_); +} + 1;