-
- function addWarehouse()
- {
- $l = DB_DataObject::Factory('location');
- if ($l->count()) {
- echo "location exists - SKIP\n";
- return;
- }
- $cust = DB_DataObject::Factory('custinfo');
- $cc =$cust->count() ;
- if ($cc != 1) {
- echo "location create - needs 1 custinfo - got $cc\n";
- return;
- }
- $cust->find(true);
-
- $l->setFrom(array(
- 'location_name' => 'Warehouse',
- 'location_descrip' => 'Warehouse',
- 'location_cust_id' => $cust->pid()
- ));
- }
-