public static function getNotifiers($list, $map) { $nl = array(); foreach ($list as $el) { $nf = $map[$el]; $nl[] = CalemFactory::createInstance($nf); } return $nl; }
public function __construct() { parent::__construct(); global $_CALEM_conf; $this->conf = $_CALEM_conf['wo_conf']['wo_generation']; $this->releaseBo = CalemFactory::createInstance($this->conf['releaseBo']); $this->pmDbo = CalemFactory::getDbo('pm'); $this->pmAssetDbo = CalemFactory::getDbo('pm_asset'); }
public function getNotifier($it) { global $_CALEM_conf; $conf = $_CALEM_conf['in_conf']['tran_notifier_map']; if (isset($it['checkout_type_id']) && $it['checkout_type_id']) { $notifier = CalemFactory::createInstance($conf[$it['checkout_type_id']]); } else { $notifier = new CalemInTranNotifierNone(); } return $notifier; }
/** * Init instance... */ public function init() { //Get configuration global $_CALEM_conf; $this->conf = $_CALEM_conf['wo_conf']['wo_generation']; $this->pdmBo = new CalemPmDependencyBo(); $this->pmDbo = CalemFactory::getDbo('pm'); $this->pmAssetDbo = CalemFactory::getDbo('pm_asset'); $this->scheduleBo = CalemFactory::createInstance($this->conf['scheduleBo']); $this->releaseBo = CalemFactory::createInstance($this->conf['releaseBo']); $this->depReleaseBo = CalemFactory::createInstance($this->conf['depReleaseBo']); $this->semDbo = CalemFactory::getDbo('wo_semaphore'); }
/** * Common functions for return */ private function _returnCommon($inDbo, $inTranRow, $tran) { //Now starts a transaction $inDbo->beginTransaction(); //Lock inventory table first $inDbo->executeBySqlParam('select id from inventory where id=? for update', $inTranRow['in_id']); //Adjust stock level first $in = $this->_addStock($inDbo, $inTranRow['in_id'], $inTranRow['location_id'], $tran['qty']); $costMd = isset($in['valuation_type_id']) && $in['valuation_type_id'] ? $in['valuation_type_id'] : $this->conf['valuation']['default']; $costHdlr = CalemFactory::createInstance($this->conf['valuation'][$costMd]); $cost = $costHdlr->setUnitCostByReturn($inTranRow, $tran['qty']); return array($inDbo, $cost, $in); }
public function getUidGen() { $dbo = 'CalemUid'; $dboInst = CalemFactory::createInstance($dbo); return $dboInst; }