コード例 #1
0
ファイル: VimController.php プロジェクト: Eximagen/sochi
 /**
  * 
  * @return \Application\Model\Collection\InventoryRotationCollection
  */
 private function getInventoryRotation()
 {
     $name = 'inventory-rotation';
     $storageService = $this->getStorageService();
     $inventoryRotation = $storageService->getValue($name);
     if (!$inventoryRotation) {
         $inventoryRotation = InventoryRotationQuery::create()->find();
         $storageService->saveValue($inventoryRotation, $name);
     }
     return $inventoryRotation;
 }
コード例 #2
0
ファイル: RestockController.php プロジェクト: Eximagen/sochi
 public function dataAction()
 {
     $this->view->contentTitle = $this->i18n->_("Required Data");
     $inventory = InventoryRotationQuery::create()->find();
     $products = ProductQuery::create()->whereAdd(Product::ITEM_CODE, $inventory->getDistinctItemCodes(), BaseQuery::IN)->whereAdd(Product::STATUS, array(Product::$Status["Hold"], Product::$Status["Line"]), ProductQuery::IN)->addAscendingOrderBy(Product::ITEM_CODE)->find();
     $this->view->products = $products->getProductsWithoutRestockRequiredData();
     $this->view->setTpl("Data");
 }