diff --git a/Admin/Install/nav.install.json b/Admin/Install/nav.install.json index 6b18f3f..1a00bea 100644 --- a/Admin/Install/nav.install.json +++ b/Admin/Install/nav.install.json @@ -122,5 +122,67 @@ "children": [] } ] + }, + { + "id": 1004807001, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 2, + "subtype": 1, + "name": "Stock", + "uri": "/{/lang}/backend/warehousing/stock/list", + "target": "self", + "icon": null, + "order": 10, + "from": "ItemManagement", + "permission": null, + "parent": 1001301001, + "children": [ + { + "id": 1004807101, + "pid": "e9b2adda603aaee5f852c05fabe394bd56cf0426", + "type": 3, + "subtype": 1, + "name": "List", + "uri": "/{/lang}/backend/warehousing/stock/list", + "target": "self", + "icon": null, + "order": 1, + "from": "ItemManagement", + "permission": null, + "parent": 1004807001, + "children": [ + { + "id": 1004807301, + "pid": "4a41925386568368ad4dd823b3945199e8e2628e", + "type": 3, + "subtype": 1, + "name": "Article", + "uri": "/{/lang}/backend/warehousing/stock/single", + "target": "self", + "icon": null, + "order": 1, + "from": "ItemManagement", + "permission": null, + "parent": 1004807101, + "children": [] + } + ] + }, + { + "id": 1004807201, + "pid": "e9b2adda603aaee5f852c05fabe394bd56cf0426", + "type": 3, + "subtype": 1, + "name": "Create", + "uri": "/{/lang}/backend/warehousing/stock/create", + "target": "self", + "icon": null, + "order": 5, + "from": "ItemManagement", + "permission": null, + "parent": 1004807001, + "children": [] + } + ] } ] diff --git a/Controller.php b/Controller.php index 066c571..b351017 100644 --- a/Controller.php +++ b/Controller.php @@ -85,8 +85,10 @@ class Controller extends ModuleAbstract implements WebInterface protected static $routes = [ '^.*/backend/sales/item/list.*$' => [['dest' => '\Modules\ItemManagement\Controller:viewItemManagementSalesList', 'method' => 'GET', 'type' => ViewLayout::MAIN],], '^.*/backend/purchase/item/list.*$' => [['dest' => '\Modules\ItemManagement\Controller:viewItemManagementPurchaseList', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/backend/warehousing/stock/list.*$' => [['dest' => '\Modules\ItemManagement\Controller:viewItemManagementWarehousingList', 'method' => 'GET', 'type' => ViewLayout::MAIN],], '^.*/backend/sales/item/create.*$' => [['dest' => '\Modules\ItemManagement\Controller:viewItemManagementSalesCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],], '^.*/backend/purchase/item/create.*$' => [['dest' => '\Modules\ItemManagement\Controller:viewItemManagementPurchaseCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/backend/warehousing/stock/create.*$' => [['dest' => '\Modules\ItemManagement\Controller:viewItemManagementWarehousingCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],], ]; /** @@ -127,6 +129,25 @@ class Controller extends ModuleAbstract implements WebInterface return $view; } + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewItemManagementWarehousingList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/ItemManagement/Theme/backend/stock-list'); + $view->addData('nav', $this->createNavigation(1004807001, $request, $response)); + + return $view; + } + /** * @param RequestAbstract $request Request * @param ResponseAbstract $response Response @@ -165,6 +186,25 @@ class Controller extends ModuleAbstract implements WebInterface return $view; } + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewItemManagementWarehousingCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/ItemManagement/Theme/backend/item-create'); + $view->addData('nav', $this->createNavigation(1004807001, $request, $response)); + + return $view; + } + /** * @param int $pageId Page/parent Id for navigation * @param RequestAbstract $request Request diff --git a/Theme/backend/stock-list.tpl.php b/Theme/backend/stock-list.tpl.php new file mode 100644 index 0000000..18f6e2c --- /dev/null +++ b/Theme/backend/stock-list.tpl.php @@ -0,0 +1,53 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +/** + * @var \phpOMS\Views\View $this + */ + +$footerView = new \Web\Views\Lists\PaginationView($this->app, $this->request, $this->response); +$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig'); + +$footerView->setPages(1 / 25); +$footerView->setPage(1); +$footerView->setResults(1); + +echo $this->getData('nav')->render(); ?> + +
+ + + + + + + $value) : $c++; + $url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/business/department/profile?id=' . $value->getId()); ?> + + +
l11n->lang['ItemManagement']['Stock']; ?>
l11n->lang[0]['ID']; ?> + l11n->lang['ItemManagement']['Article']; ?> + l11n->lang['ItemManagement']['Quantity']; ?> +
render(); ?> +
getId(); ?> + getName(); ?> + getParent(); ?> + getUnit(); ?> + + +
l11n->lang[0]['Empty']; ?> + +
+
diff --git a/info.json b/info.json index 861a68d..95ad4be 100644 --- a/info.json +++ b/info.json @@ -23,7 +23,8 @@ { "pid": [ "e3d6f58661c6f42309e273740944547c93ff76a0", - "e9b2adda603aaee5f852c05fabe394bd56cf0426" + "e9b2adda603aaee5f852c05fabe394bd56cf0426", + "69737ca3a3dfa6a55a1a0402474ac634c371ea9f" ], "type": 4, "for": 0, @@ -42,7 +43,8 @@ { "pid": [ "e3d6f58661c6f42309e273740944547c93ff76a0", - "e9b2adda603aaee5f852c05fabe394bd56cf0426" + "e9b2adda603aaee5f852c05fabe394bd56cf0426", + "69737ca3a3dfa6a55a1a0402474ac634c371ea9f" ], "type": 5, "for": "Content",