'expcat',
'custinfo', // create a base customer based on company.
+ 'location', // default warehouse.
+
// accounts - fixme - we need a better 'base set'
// 'costcat' -- fixme - we need to init this..
$this->updateMetricValue();
- $this->addWarehouse();
- $this->addExtraYears();
+ $this->addExtraYears();
$this->addAccounts();
$this->addBankAccounts();
}
*/
-
- 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()
- ));
- }
-
+
function addExtraYears()