customer bill/ship location refactoring, #940
[freeside.git] / FS / FS / cust_main / Packages.pm
index 06331d3..887ac49 100644 (file)
@@ -40,7 +40,8 @@ FS::cust_pkg object
 
 =item cust_location
 
-Optional FS::cust_location object
+Optional FS::cust_location object.  If not specified, the customer's 
+ship_location will be used.
 
 =item svcs
 
@@ -105,6 +106,9 @@ sub order_pkg {
     }
     $cust_pkg->locationnum($opt->{'cust_location'}->locationnum);
   }
+  else {
+    $cust_pkg->locationnum($self->ship_locationnum);
+  }
 
   $cust_pkg->custnum( $self->custnum );