/** * * @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; }
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"); }