diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index 65a9a16..7193faf 100755 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -128,8 +128,8 @@ "pid": "/", "type": 2, "subtype": 1, - "name": "Stock", - "uri": "{/prefix}warehouse/stock/list", + "name": "Articles", + "uri": "{/prefix}warehouse/item/list", "target": "self", "icon": null, "order": 10, @@ -139,11 +139,11 @@ "children": [ { "id": 1004807101, - "pid": "/warehouse/stock", + "pid": "/warehouse/item", "type": 3, "subtype": 1, "name": "List", - "uri": "{/prefix}warehouse/stock/list", + "uri": "{/prefix}warehouse/item/list", "target": "self", "icon": null, "order": 1, @@ -153,11 +153,11 @@ "children": [ { "id": 1004807301, - "pid": "/warehouse/stock", + "pid": "/warehouse/item", "type": 3, "subtype": 1, "name": "Article", - "uri": "{/prefix}warehouse/stock/single?{?}", + "uri": "{/prefix}warehouse/item/single?{?}", "target": "self", "icon": null, "order": 1, @@ -170,11 +170,11 @@ }, { "id": 1004807201, - "pid": "/warehouse/stock", + "pid": "/warehouse/item", "type": 3, "subtype": 1, "name": "Create", - "uri": "{/prefix}warehouse/stock/create?{?}", + "uri": "{/prefix}warehouse/item/create?{?}", "target": "self", "icon": null, "order": 5, diff --git a/Admin/Install/db.json b/Admin/Install/db.json index 31849c8..ff0497b 100755 --- a/Admin/Install/db.json +++ b/Admin/Install/db.json @@ -295,5 +295,31 @@ "foreignKey": "media_id" } } + }, + "itemmgmt_item_note": { + "name": "itemmgmt_item_note", + "fields": { + "itemmgmt_item_note_id": { + "name": "itemmgmt_item_note_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "itemmgmt_item_note_item": { + "name": "itemmgmt_item_note_item", + "type": "INT", + "null": false, + "foreignTable": "itemmgmt_item", + "foreignKey": "itemmgmt_item_id" + }, + "itemmgmt_item_note_doc": { + "name": "itemmgmt_item_note_doc", + "type": "INT", + "null": false, + "foreignTable": "editor_doc", + "foreignKey": "editor_doc_id" + } + } } } \ No newline at end of file diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index 3b2d34b..d0068c8 100755 --- a/Admin/Routes/Web/Backend.php +++ b/Admin/Routes/Web/Backend.php @@ -28,7 +28,7 @@ return [ ], ], ], - '^.*/warehouse/stock/list.*$' => [ + '^.*/warehouse/item/list.*$' => [ [ 'dest' => '\Modules\ItemManagement\Controller\BackendController:viewItemManagementWarehousingList', 'verb' => RouteVerb::GET, @@ -61,7 +61,7 @@ return [ ], ], ], - '.*/warehouse/stock/create.*$' => [ + '.*/warehouse/item/create.*$' => [ [ 'dest' => '\Modules\ItemManagement\Controller\BackendController:viewItemManagementWarehousingCreate', 'verb' => RouteVerb::GET, @@ -83,4 +83,26 @@ return [ ], ], ], + '^.*/purchase/item/profile.*$' => [ + [ + 'dest' => '\Modules\ItemManagement\Controller\BackendController:viewItemManagementPurchaseItem', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::MODULE_NAME, + 'type' => PermissionType::READ, + 'state' => PermissionState::PURCHASE_ITEM, + ], + ], + ], + '^.*/warehouse/item/profile.*$' => [ + [ + 'dest' => '\Modules\ItemManagement\Controller\BackendController:viewItemManagementWarehouseItem', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::MODULE_NAME, + 'type' => PermissionType::READ, + 'state' => PermissionState::STOCK_ITEM, + ], + ], + ], ]; diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 5b0bb35..474efd5 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -607,4 +607,26 @@ final class ApiController extends Controller $this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Image', 'Image successfully updated', $uploaded); } + + /** + * Api method to create item files + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiNoteCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : void + { + $request->setData('virtualpath', '/Modules/ItemManagement/Articles/' . $request->getData('id'), true); + $this->app->moduleManager->get('Editor')->apiEditorCreate($request, $response, $data); + + $model = $response->get($request->uri->__toString())['response']; + $this->createModelRelation($request->header->account, $request->getData('id'), $model->getId(), ItemMapper::class, 'notes', '', $request->getOrigin()); + } } diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 2b14b0f..e2d19e2 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -16,7 +16,7 @@ namespace Modules\ItemManagement\Controller; use Model\SettingsEnum; use Modules\Admin\Models\LocalizationMapper; -use Modules\Billing\Models\BillMapper; +use Modules\Billing\Models\SalesBillMapper; use Modules\Billing\Models\BillTypeL11n; use Modules\ItemManagement\Models\ItemAttributeMapper; use Modules\ItemManagement\Models\ItemL11nMapper; @@ -105,6 +105,9 @@ final class BackendController extends Controller $view->setTemplate('/Modules/ItemManagement/Theme/Backend/stock-list'); $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1004807001, $request, $response)); + $items = ItemMapper::withConditional('language', $response->getLanguage())::getAfterPivot(0, null, 25); + $view->addData('items', $items); + return $view; } @@ -213,16 +216,16 @@ final class BackendController extends Controller // stats if ($this->app->moduleManager->isActive('Billing')) { - $ytd = BillMapper::getSalesByItemId($item->getId(), new SmartDateTime('Y-01-01'), new SmartDateTime('now')); - $mtd = BillMapper::getSalesByItemId($item->getId(), new SmartDateTime('Y-m-01'), new SmartDateTime('now')); - $avg = BillMapper::getAvgSalesPriceByItemId($item->getId(), (new SmartDateTime('now'))->smartModify(-1), new SmartDateTime('now')); - $lastOrder = BillMapper::getLastOrderDateByItemId($item->getId()); + $ytd = SalesBillMapper::getSalesByItemId($item->getId(), new SmartDateTime('Y-01-01'), new SmartDateTime('now')); + $mtd = SalesBillMapper::getSalesByItemId($item->getId(), new SmartDateTime('Y-m-01'), new SmartDateTime('now')); + $avg = SalesBillMapper::getAvgSalesPriceByItemId($item->getId(), (new SmartDateTime('now'))->smartModify(-1), new SmartDateTime('now')); + $lastOrder = SalesBillMapper::getLastOrderDateByItemId($item->getId()); // @todo: why is the conditional array necessary, shouldn't the mapper realize when it mustn't use the conditional (when the field doesn't exist in the mapper) - $newestInvoices = BillMapper::withConditional('language', $response->getLanguage(), [BillTypeL11n::class])::getNewestItemInvoices($item->getId(), 5); - $topCustomers = BillMapper::getItemTopCustomers($item->getId(), new SmartDateTime('Y-01-01'), new SmartDateTime('now'), 5); - $regionSales = BillMapper::getItemRegionSales($item->getId(), new SmartDateTime('Y-01-01'), new SmartDateTime('now')); - $countrySales = BillMapper::getItemCountrySales($item->getId(), new SmartDateTime('Y-01-01'), new SmartDateTime('now'), 5); - $monthlySalesCosts = BillMapper::getItemMonthlySalesCosts($item->getId(), (new SmartDateTime('now'))->createModify(-1), new SmartDateTime('now')); + $newestInvoices = SalesBillMapper::withConditional('language', $response->getLanguage(), [BillTypeL11n::class])::getNewestItemInvoices($item->getId(), 5); + $topCustomers = SalesBillMapper::getItemTopCustomers($item->getId(), new SmartDateTime('Y-01-01'), new SmartDateTime('now'), 5); + $regionSales = SalesBillMapper::getItemRegionSales($item->getId(), new SmartDateTime('Y-01-01'), new SmartDateTime('now')); + $countrySales = SalesBillMapper::getItemCountrySales($item->getId(), new SmartDateTime('Y-01-01'), new SmartDateTime('now'), 5); + $monthlySalesCosts = SalesBillMapper::getItemMonthlySalesCosts($item->getId(), (new SmartDateTime('now'))->createModify(-1), new SmartDateTime('now')); } else { $ytd = new Money(); $mtd = new Money(); @@ -245,6 +248,50 @@ final class BackendController extends Controller $view->addData('countrySales', $countrySales); $view->addData('monthlySalesCosts', $monthlySalesCosts); + return $view; + } + + /** + * Routing end-point for application behaviour. + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @codeCoverageIgnore + */ + public function viewItemManagementPurchaseItem(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = $this->viewItemManagementSalesItem($request, $response, $data); + $view->setTemplate('/Modules/ItemManagement/Theme/Backend/sales-item-profile'); + $view->setData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1004806001, $request, $response)); + + + return $view; + } + + /** + * Routing end-point for application behaviour. + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @codeCoverageIgnore + */ + public function viewItemManagementWarehouseItem(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = $this->viewItemManagementSalesItem($request, $response, $data); + $view->setTemplate('/Modules/ItemManagement/Theme/Backend/sales-item-profile'); + $view->setData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1004806001, $request, $response)); + + return $view; } } diff --git a/Models/Item.php b/Models/Item.php index 668ff18..0ada2f2 100755 --- a/Models/Item.php +++ b/Models/Item.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Modules\ItemManagement\Models; +use Modules\Editor\Models\EditorDoc; use Modules\Media\Models\Media; use Modules\Media\Models\NullMedia; use phpOMS\Localization\Money; @@ -60,6 +61,14 @@ class Item */ private array $files = []; + /** + * Files. + * + * @var EditorDoc[] + * @since 1.0.0 + */ + private array $notes = []; + /** * Localizations. * @@ -190,6 +199,44 @@ class Item $this->files[] = $media; } + /** + * Add doc to item + * + * @param EditorDoc $note Note + * + * @return void + * + * @since 1.0.0 + */ + public function addNote(EditorDoc $note) : void + { + $this->notes[] = $note; + } + + /** + * Get notes + * + * @return EditorDoc[] + * + * @since 1.0.0 + */ + public function getNotes() : array + { + return $this->notes; + } + + /** + * Get files + * + * @return Media[] + * + * @since 1.0.0 + */ + public function getFiles() : array + { + return $this->files; + } + /** * Get media file by type * diff --git a/Models/ItemMapper.php b/Models/ItemMapper.php index 3deeaa3..701d68e 100755 --- a/Models/ItemMapper.php +++ b/Models/ItemMapper.php @@ -15,6 +15,7 @@ declare(strict_types=1); namespace Modules\ItemManagement\Models; use Modules\Media\Models\MediaMapper; +use Modules\Editor\Models\EditorDocMapper; use phpOMS\DataStorage\Database\DataMapperAbstract; /** @@ -74,6 +75,12 @@ final class ItemMapper extends DataMapperAbstract 'external' => 'itemmgmt_item_media_media', 'self' => 'itemmgmt_item_media_item', ], + 'notes' => [ + 'mapper' => EditorDocMapper::class, /* mapper of the related object */ + 'table' => 'itemmgmt_item_note', /* table of the related object, null if no relation table is used (many->1) */ + 'external' => 'itemmgmt_item_note_doc', + 'self' => 'itemmgmt_item_note_item', + ], 'l11n' => [ 'mapper' => ItemL11nMapper::class, 'table' => 'itemmgmt_item_l11n', diff --git a/Theme/Backend/Lang/de.lang.php b/Theme/Backend/Lang/de.lang.php old mode 100755 new mode 100644 index 28f5981..215f82f --- a/Theme/Backend/Lang/de.lang.php +++ b/Theme/Backend/Lang/de.lang.php @@ -4,7 +4,7 @@ * * PHP Version 8.0 * - * @package Modules\ItemManagement + * @package Modules\Localization * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 @@ -20,6 +20,7 @@ return ['ItemManagement' => [ 'Attribute' => 'Attribut', 'Attributes' => 'Attribute', 'Available' => 'Verfügbar', + 'AvgPrice' => '', 'Bonus' => 'Bonus', 'ClientGroup' => 'Kunde/Gruppe', 'Commission' => 'Kommission', @@ -27,7 +28,9 @@ return ['ItemManagement' => [ 'CostCenter' => 'Kostenstelle', 'CostIndicator' => 'Kostenkennzeichen', 'CostObject' => 'Kostenträger', + 'Countries' => '', 'Country' => 'Land', + 'Created' => '', 'Customer' => 'Kunde', 'CustomerGroup' => 'Kundengruppe', 'CustomsID' => 'Kunden ID', @@ -36,50 +39,64 @@ return ['ItemManagement' => [ 'Discount' => 'Rabatt', 'DiscountP' => 'Rabatt in %', 'Disposal' => 'Verschrottung', + 'Documents' => '', 'EarningIndicator' => 'Umsatzkennzeichen', 'End' => 'Ende', 'Files' => 'Dateien', 'General' => 'Allgemein', 'GrossWeight' => 'Brutto Gewicht', 'Group' => 'Gruppe', + 'Groups' => '', 'Height' => 'Höhe', 'ID' => 'ID', + 'ILV' => '', 'Info' => 'Info', 'IsActive' => 'Aktiv?', 'Item' => 'Artikel', 'Items' => 'Artikel', 'Language' => 'Sprache', + 'LastOrder' => '', 'Leadtime' => 'Lieferzeit', 'Length' => 'Länge', 'Localization' => 'Lokalisierung', + 'Localizations' => '', 'Location' => 'Ort', 'Log' => 'Log', 'Logs' => 'Logs', 'Lot' => 'Charge', + 'MRR' => '', + 'MTDSales' => '', 'Makespan' => 'Produktionszeit', + 'Margin' => '', 'Master' => 'Master', 'MaximumLevel' => 'Höchstwert', 'Media' => 'Media', 'MinimumLevel' => 'Mindestbestand', + 'Modified' => '', 'Name' => 'Name', 'Name1' => 'Name1', 'Name2' => 'Name2', 'Name3' => 'Name3', 'Name4' => 'Name4', 'Name5' => 'Name5', + 'Net' => '', 'NetWeight' => 'Netto Gewicht', 'None' => 'Keine', + 'Notes' => '', + 'Number' => '', 'Ordered' => 'Bestellt', 'Packaging' => 'Verpackung', 'Price' => 'Preis', - 'Prices' => 'Preise', + 'PriceChange' => '', 'PriceUnit' => 'Stückpreis', + 'Prices' => 'Preise', 'Productgroup' => 'Produktgruppe', 'Production' => 'Produktion', 'Profile' => 'Profil', 'Properties' => 'Attribute', 'Property' => 'Attribut', 'Purchase' => 'Einkauf', + 'PurchasePrice' => '', 'Purchasing' => 'Einkaufen', 'QA' => 'QS', 'QM' => 'QM', @@ -87,10 +104,11 @@ return ['ItemManagement' => [ 'QuantityUnit' => 'Mengeneinheit', 'ReorderLevel' => 'Bestellgrenze', 'Reserved' => 'Reservierd', + 'SN' => 'SN', 'Sales' => 'Umsatz', + 'SalesPrice' => '', 'Segment' => 'Segment', 'ShelfLife' => 'Haltbarkeit', - 'SN' => 'SN', 'Source' => 'Quelle', 'Start' => 'Start', 'Status' => 'Status', @@ -112,4 +130,5 @@ return ['ItemManagement' => [ 'Volume' => 'Volumen', 'Warehouse' => 'Lager', 'Width' => 'Breite', + 'YTDSales' => '', ]]; diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php old mode 100755 new mode 100644 index daa97ec..75072fa --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -4,7 +4,7 @@ * * PHP Version 8.0 * - * @package Modules\ItemManagement + * @package Modules\Localization * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 @@ -20,6 +20,7 @@ return ['ItemManagement' => [ 'Attribute' => 'Attribute', 'Attributes' => 'Attributes', 'Available' => 'Available', + 'AvgPrice' => 'Avg. Price', 'Bonus' => 'Bonus', 'ClientGroup' => 'Client/Group', 'Commission' => 'Commission', @@ -27,7 +28,9 @@ return ['ItemManagement' => [ 'CostCenter' => 'CostCenter', 'CostIndicator' => 'Cost Indicator', 'CostObject' => 'CostObject', + 'Countries' => 'Countries', 'Country' => 'Country', + 'Created' => 'Created', 'Customer' => 'Customer ', 'CustomerGroup' => 'Customer Group', 'CustomsID' => 'Customs ID', @@ -36,50 +39,64 @@ return ['ItemManagement' => [ 'Discount' => 'Discount', 'DiscountP' => 'Discount in %', 'Disposal' => 'Disposal', + 'Documents' => 'Documents', 'EarningIndicator' => 'Earning Indicator', 'End' => 'End', 'Files' => 'Files', 'General' => 'General', 'GrossWeight' => 'Gross Weight', 'Group' => 'Group', + 'Groups' => '', 'Height' => 'Height', 'ID' => 'ID', + 'ILV' => 'ILV', 'Info' => 'Info', 'IsActive' => 'Active?', 'Item' => 'Item', 'Items' => 'Items', 'Language' => 'Language', + 'LastOrder' => 'Last Order', 'Leadtime' => 'Lead time', 'Length' => 'Length', 'Localization' => 'Localization', + 'Localizations' => 'Localizations', 'Location' => 'Location', 'Log' => 'Log', 'Logs' => 'Logs', 'Lot' => 'Lot', + 'MRR' => 'MRR', + 'MTDSales' => 'MTD Sales', 'Makespan' => 'Makespan', + 'Margin' => 'Margin', 'Master' => 'Master', 'MaximumLevel' => 'Maximum stock level', 'Media' => 'Media', 'MinimumLevel' => 'Minimum stock level', + 'Modified' => 'Modified', 'Name' => 'Name', 'Name1' => 'Name1', 'Name2' => 'Name2', 'Name3' => 'Name3', 'Name4' => 'Name4', 'Name5' => 'Name5', + 'Net' => 'Net Weight', 'NetWeight' => 'Net Weight', 'None' => 'None', + 'Notes' => 'Notes', + 'Number' => 'Number', 'Ordered' => 'Ordered', 'Packaging' => 'Packaging', 'Price' => 'Price', - 'Prices' => 'Prices', + 'PriceChange' => 'Price Change', 'PriceUnit' => 'Unit of price', + 'Prices' => 'Prices', 'Productgroup' => 'Productgroup', 'Production' => 'Production', 'Profile' => 'Profile', 'Properties' => 'Properties', 'Property' => 'Property', 'Purchase' => 'Purchase', + 'PurchasePrice' => 'Purchase Price', 'Purchasing' => 'Purchasing', 'QA' => 'QA', 'QM' => 'QM', @@ -87,10 +104,11 @@ return ['ItemManagement' => [ 'QuantityUnit' => 'Unit of quantity', 'ReorderLevel' => 'Reorder level', 'Reserved' => 'Reserved', + 'SN' => 'SN', 'Sales' => 'Sales', + 'SalesPrice' => 'Sales Price', 'Segment' => 'Segment', 'ShelfLife' => 'Shelf life', - 'SN' => 'SN', 'Source' => 'Source', 'Start' => 'Start', 'Status' => 'Status', @@ -112,4 +130,5 @@ return ['ItemManagement' => [ 'Volume' => 'Volume', 'Warehouse' => 'Warehouse', 'Width' => 'Width', + 'YTDSales' => 'YTD Sales', ]]; diff --git a/Theme/Backend/purchase-item-list.tpl.php b/Theme/Backend/purchase-item-list.tpl.php index 15f5852..aec5fe3 100755 --- a/Theme/Backend/purchase-item-list.tpl.php +++ b/Theme/Backend/purchase-item-list.tpl.php @@ -24,7 +24,7 @@ echo $this->getData('nav')->render(); ?>
getHtml('Items'); ?>
- +
$value) : ++$count; - $url = UriFactory::build('{/prefix}sales/item/profile?{?}&id=' . $value->getId()); + $url = UriFactory::build('{/prefix}purchase/item/profile?{?}&id=' . $value->getId()); $image = $value->getFileByType('backend_image'); ?> @@ -66,7 +66,7 @@ echo $this->getData('nav')->render(); ?>
@@ -54,7 +54,7 @@ echo $this->getData('nav')->render(); ?>
printHtml($value->getL11n('name1')->description); ?> printHtml($value->getL11n('name2')->description); ?> printHtml($value->getL11n('name3')->description); ?> - + printHtml($value->purchasePrice->getCurrency()); ?> diff --git a/Theme/Backend/sales-item-profile.tpl.php b/Theme/Backend/sales-item-profile.tpl.php index 7262726..43e5a65 100755 --- a/Theme/Backend/sales-item-profile.tpl.php +++ b/Theme/Backend/sales-item-profile.tpl.php @@ -25,6 +25,9 @@ $item = $this->getData('item'); $itemL11n = $this->getData('itemL11n'); $itemAttribute = $this->getData('itemAttribute'); +$notes = $item->getNotes(); +$files = $item->getFiles(); + $newestInvoices = $this->getData('newestInvoices') ?? []; $topCustomers = $this->getData('topCustomers') ?? []; $regionSales = $this->getData('regionSales') ?? []; @@ -102,7 +105,7 @@ echo $this->getData('nav')->render();
- +
getHtml('YTDSales'); ?>: getData('ytd')->getCurrency(); ?>
getHtml('MTDSales'); ?>: @@ -119,7 +122,7 @@ echo $this->getData('nav')->render();
- +
getHtml('LastOrder'); ?>: getData('lastOrder') !== null ? $this->getData('lastOrder')->format('Y-m-d H:i') : ''; ?>
getHtml('PriceChange'); ?>: @@ -136,7 +139,7 @@ echo $this->getData('nav')->render();
- +
getHtml('SalesPrice'); ?>: salesPrice->getCurrency(); ?>
getHtml('PurchasePrice'); ?>: @@ -155,14 +158,42 @@ echo $this->getData('nav')->render();
getHtml('Notes'); ?>
-
+ + + + + getId()); + ?> + +
getHtml('Title'); ?> + getHtml('CreatedAt'); ?> +
title; ?> + createdAt->format('Y-m-d'); ?> + +
getHtml('Documents'); ?>
-
+ + + + + getId()); + ?> + +
getHtml('Title'); ?> + + getHtml('CreatedAt'); ?> +
name; ?> + extension; ?> + createdAt->format('Y-m-d'); ?> + +
diff --git a/Theme/Backend/stock-list.tpl.php b/Theme/Backend/stock-list.tpl.php index dca1e81..c36a03d 100755 --- a/Theme/Backend/stock-list.tpl.php +++ b/Theme/Backend/stock-list.tpl.php @@ -12,45 +12,65 @@ */ declare(strict_types=1); -/** - * @var \phpOMS\Views\View $this - */ +use Modules\Media\Models\NullMedia; +use phpOMS\Uri\UriFactory; -$footerView = new \phpOMS\Views\PaginationView($this->l11nManager, $this->request, $this->response); -$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig'); - -$footerView->setPages(25); -$footerView->setPage(1); -$footerView->setResults(1); +/** @var \phpOMS\Views\View $this */ +$items = $this->getData('items'); echo $this->getData('nav')->render(); ?>
-
- - +
+
getHtml('Items'); ?>
+
getHtml('Stock'); ?>
+ - - $value) : ++$c; - $url = \phpOMS\Uri\UriFactory::build('{/prefix}business/department/profile?{?}&id=' . $value->getId()); ?> - - - +
getHtml('ID', '0', '0'); ?> - getHtml('Article'); ?> - getHtml('Quantity'); ?> -
+ + + getHtml('Name'); ?> + + + getHtml('Name'); ?> + + + getHtml('Name'); ?> + + + getHtml('Available'); ?> + + + getHtml('Reserved'); ?> + + + getHtml('Ordered'); ?> + +
getId(); ?> - printHtml($value->name); ?> - printHtml($value->parent); ?> - printHtml($value->getUnit()); ?> - - -
getHtml('Empty', '0', '0'); ?> - + $value) : ++$count; + $url = UriFactory::build('{/prefix}warehouse/item/profile?{?}&id=' . $value->getId()); + $image = $value->getFileByType('backend_image'); + ?> +
+ printHtml($value->number); ?> + printHtml($value->getL11n('name1')->description); ?> + printHtml($value->getL11n('name2')->description); ?> + printHtml($value->getL11n('name3')->description); ?> + + + + + +
getHtml('Empty', '0', '0'); ?> +
-
+
diff --git a/info.json b/info.json index 76c8e62..a3c4137 100755 --- a/info.json +++ b/info.json @@ -17,7 +17,8 @@ "description": "Event Management module.", "directory": "ItemManagement", "dependencies": { - "Admin": "1.0.0" + "Admin": "1.0.0", + "Editor": "1.0.0" }, "providing": { "Navigation": "*",