don't enable 'Void invoices' by default, being overused in lieu of more accounting...
[freeside.git] / FS / FS / location_Mixin.pm
index 675e002..d32b4a3 100644 (file)
@@ -36,8 +36,22 @@ Returns the label of the location object (see L<FS::cust_location>).
 
 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;