diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e1e05f8..278096d 100755 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,10 +13,15 @@ on: - cron: '0 0 1,15 * *' jobs: - general_module_workflow: + general_module_workflow_php: uses: Karaka-Management/Karaka/.github/workflows/php_template.yml@develop secrets: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_PAT: ${{ secrets.GH_PAT }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - + general_module_workflow_js: + uses: Karaka-Management/Karaka/.github/workflows/js_template.yml@develop + secrets: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_PAT: ${{ secrets.GH_PAT }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/Admin/Hooks/Manual.php b/Admin/Hooks/Manual.php index 1b4ede3..a000226 100644 --- a/Admin/Hooks/Manual.php +++ b/Admin/Hooks/Manual.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement * @copyright Dennis Eichhorn diff --git a/Admin/Install/ClientManagement.php b/Admin/Install/ClientManagement.php index f0c4743..c7b8be5 100644 --- a/Admin/Install/ClientManagement.php +++ b/Admin/Install/ClientManagement.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Admin\Install * @copyright Dennis Eichhorn diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index a4c8bf1..13239fa 100755 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -19,7 +19,7 @@ "type": 2, "subtype": 1, "name": "Stock", - "uri": "{/base}/warehouse/stock/list?{?}", + "uri": "{/base}/warehouse/stock/list", "target": "self", "icon": null, "order": 1, @@ -33,7 +33,7 @@ "type": 3, "subtype": 1, "name": "Stocks", - "uri": "{/base}/warehouse/stock/list?{?}", + "uri": "{/base}/warehouse/stock/list", "target": "self", "icon": null, "order": 1, @@ -48,7 +48,7 @@ "type": 3, "subtype": 1, "name": "Locations", - "uri": "{/base}/warehouse/stock/location/list?{?}", + "uri": "{/base}/warehouse/stock/location/list", "target": "self", "icon": null, "order": 5, @@ -63,7 +63,7 @@ "type": 3, "subtype": 1, "name": "Types", - "uri": "{/base}/warehouse/stock/type/list?{?}", + "uri": "{/base}/warehouse/stock/type/list", "target": "self", "icon": null, "order": 10, diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php index 6b651a7..3b16eb2 100755 --- a/Admin/Install/Navigation.php +++ b/Admin/Install/Navigation.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Admin\Install * @copyright Dennis Eichhorn diff --git a/Admin/Install/SupplierManagement.php b/Admin/Install/SupplierManagement.php index f492892..3daa427 100644 --- a/Admin/Install/SupplierManagement.php +++ b/Admin/Install/SupplierManagement.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Admin\Install * @copyright Dennis Eichhorn diff --git a/Admin/Install/types.json b/Admin/Install/types.json index 4f1da66..a60675a 100644 --- a/Admin/Install/types.json +++ b/Admin/Install/types.json @@ -6,6 +6,13 @@ "de": "Standard" } }, + { + "name": "virtual", + "l11n": { + "en": "Virtual", + "de": "Virtuell" + } + }, { "name": "incoming", "l11n": { @@ -47,5 +54,19 @@ "en": "Retention sample", "de": "Rückstellmuster" } + }, + { + "name": "consignment", + "l11n": { + "en": "Consignment stock", + "de": "Konsignationslager" + } + }, + { + "name": "duty_free", + "l11n": { + "en": "Duty-free", + "de": "Zollfreilager" + } } ] \ No newline at end of file diff --git a/Admin/Installer.php b/Admin/Installer.php index 1b24b7d..e2afccc 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Admin * @copyright Dennis Eichhorn diff --git a/Admin/Routes/Web/Api.php b/Admin/Routes/Web/Api.php index 1db5ae7..98b155c 100644 --- a/Admin/Routes/Web/Api.php +++ b/Admin/Routes/Web/Api.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement * @copyright Dennis Eichhorn diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index fe7986c..1576f4a 100755 --- a/Admin/Routes/Web/Backend.php +++ b/Admin/Routes/Web/Backend.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement * @copyright Dennis Eichhorn @@ -18,10 +18,11 @@ use phpOMS\Account\PermissionType; use phpOMS\Router\RouteVerb; return [ - '^.*/warehouse/stock/list(\?.*$|$)' => [ + '^/warehouse/stock/list(\?.*$|$)' => [ [ 'dest' => '\Modules\WarehouseManagement\Controller\BackendController:viewStockList', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -29,10 +30,11 @@ return [ ], ], ], - '^.*/warehouse/stock(\?.*)?$' => [ + '^/warehouse/stock/view(\?.*$|$)' => [ [ 'dest' => '\Modules\WarehouseManagement\Controller\BackendController:viewStock', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -40,10 +42,23 @@ return [ ], ], ], - '^.*/warehouse/stock/type/list(\?.*$|$)' => [ + '^/warehouse/stock/create(\?.*$|$)' => [ + [ + 'dest' => '\Modules\WarehouseManagement\Controller\BackendController:viewStockCreate', + 'verb' => RouteVerb::GET, + 'active' => true, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::CREATE, + 'state' => PermissionCategory::STOCK, + ], + ], + ], + '^/warehouse/stock/type/list(\?.*$|$)' => [ [ 'dest' => '\Modules\WarehouseManagement\Controller\BackendController:viewStockTypeList', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -51,10 +66,11 @@ return [ ], ], ], - '^.*/warehouse/stock/type(\?.*)?$' => [ + '^/warehouse/stock/type/view(\?.*$|$)' => [ [ 'dest' => '\Modules\WarehouseManagement\Controller\BackendController:viewStockType', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -62,10 +78,23 @@ return [ ], ], ], - '^.*/warehouse/stock/location/list(\?.*$|$)' => [ + '^/warehouse/stock/type/create(\?.*$|$)' => [ + [ + 'dest' => '\Modules\WarehouseManagement\Controller\BackendController:viewStockTypeCreate', + 'verb' => RouteVerb::GET, + 'active' => true, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::CREATE, + 'state' => PermissionCategory::STOCK, + ], + ], + ], + '^/warehouse/stock/location/list(\?.*$|$)' => [ [ 'dest' => '\Modules\WarehouseManagement\Controller\BackendController:viewStockLocationList', 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, @@ -73,10 +102,23 @@ return [ ], ], ], - '^.*/warehouse/stock/location(\?.*)?$' => [ + '^/warehouse/stock/location/view(\?.*$|$)' => [ [ 'dest' => '\Modules\WarehouseManagement\Controller\BackendController:viewStockLocation', 'verb' => RouteVerb::GET, + 'active' => true, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::READ, + 'state' => PermissionCategory::STOCK_LOCATION, + ], + ], + ], + '^/warehouse/stock/location/create(\?.*$|$)' => [ + [ + 'dest' => '\Modules\WarehouseManagement\Controller\BackendController:viewStockLocationCreate', + 'verb' => RouteVerb::GET, + 'active' => true, 'permission' => [ 'module' => BackendController::NAME, 'type' => PermissionType::READ, diff --git a/Admin/Status.php b/Admin/Status.php index 8894b49..2076f51 100755 --- a/Admin/Status.php +++ b/Admin/Status.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Admin * @copyright Dennis Eichhorn diff --git a/Admin/Uninstaller.php b/Admin/Uninstaller.php index c06b0a7..24e5580 100755 --- a/Admin/Uninstaller.php +++ b/Admin/Uninstaller.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Admin * @copyright Dennis Eichhorn diff --git a/Admin/Updater.php b/Admin/Updater.php index 07cc804..904dc3d 100755 --- a/Admin/Updater.php +++ b/Admin/Updater.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Admin * @copyright Dennis Eichhorn diff --git a/Controller/ApiAttributeController.php b/Controller/ApiAttributeController.php index aab1ba2..567a695 100644 --- a/Controller/ApiAttributeController.php +++ b/Controller/ApiAttributeController.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement * @copyright Dennis Eichhorn @@ -42,7 +42,7 @@ use phpOMS\Message\ResponseAbstract; final class ApiAttributeController extends Controller { /** - * Api method to create item attribute + * Api method to create Attribute * * @param RequestAbstract $request Request * @param ResponseAbstract $response Response @@ -69,7 +69,7 @@ final class ApiAttributeController extends Controller } /** - * Method to create item attribute from request. + * Method to create lot attribute from request. * * @param RequestAbstract $request Request * diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 2b39d3c..db114a6 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement * @copyright Dennis Eichhorn @@ -21,6 +21,8 @@ use Modules\Billing\Models\BillTransferType; use Modules\ClientManagement\Models\NullClient; use Modules\ItemManagement\Models\StockIdentifierType; use Modules\SupplierManagement\Models\NullSupplier; +use Modules\WarehouseManagement\Models\NullStock; +use Modules\WarehouseManagement\Models\NullStockType; use Modules\WarehouseManagement\Models\Stock; use Modules\WarehouseManagement\Models\StockDistribution; use Modules\WarehouseManagement\Models\StockDistributionMapper; @@ -184,7 +186,9 @@ final class ApiController extends Controller { $location = new StockLocation(); $location->name = $request->getDataString('name') ?? ''; - $location->stock = $request->getDataInt('stock') ?? 1; + $location->stock = new NullStock($request->getDataInt('stock') ?? 1); + + $location->type = $request->hasData('type') ? new NullStockType((int) $request->getDataInt('type')) : null; return $location; } @@ -434,7 +438,7 @@ final class ApiController extends Controller /** @var \Modules\WarehouseManagement\Models\StockTransaction[] $transactions */ $transactions = StockTransactionMapper::getAll() ->where('billElement', $new->id) - ->execute(); + ->executeGetArray(); /* if ($new->item === $old->item) { @@ -463,7 +467,7 @@ final class ApiController extends Controller /** @var \Modules\WarehouseManagement\Models\StockTransaction[] $transactions */ $transactions = StockTransactionMapper::getAll() ->where('billElement', $new->id) - ->execute(); + ->executeGetArray(); StockTransactionMapper::delete()->execute($transactions); } elseif ($trigger === 'Billing-bill-delete') { @@ -471,7 +475,7 @@ final class ApiController extends Controller /** @var \Modules\WarehouseManagement\Models\StockTransaction[] $transactions */ $transactions = StockTransactionMapper::getAll() ->where('billElement', $element->id) - ->execute(); + ->executeGetArray(); StockTransactionMapper::delete()->execute($transactions); // @todo consider not to delete but mark as deleted? @@ -491,7 +495,7 @@ final class ApiController extends Controller /** @var \Modules\WarehouseManagement\Models\StockTransaction[] $transactions */ $transactions = StockTransactionMapper::getAll() ->where('billElement', $element->id) - ->execute(); + ->executeGetArray(); foreach ($transactions as $transaction) { $transaction->state = StockTransactionState::TRANSIT; // @todo change to more specific diff --git a/Controller/ApiStockTypeController.php b/Controller/ApiStockTypeController.php index b7b9202..b83caaa 100644 --- a/Controller/ApiStockTypeController.php +++ b/Controller/ApiStockTypeController.php @@ -3,7 +3,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement * @copyright Dennis Eichhorn @@ -62,7 +62,7 @@ final class ApiStockTypeController extends Controller } /** - * Method to create item attribute from request. + * Method to create StockType from request. * * @param RequestAbstract $request Request * @@ -83,7 +83,7 @@ final class ApiStockTypeController extends Controller } /** - * Validate item attribute create request + * Validate StockType create request * * @param RequestAbstract $request Request * @@ -104,7 +104,7 @@ final class ApiStockTypeController extends Controller } /** - * Api method to create item attribute l11n + * Api method to create StockType l11n * * @param RequestAbstract $request Request * @param ResponseAbstract $response Response @@ -131,7 +131,7 @@ final class ApiStockTypeController extends Controller } /** - * Method to create item attribute l11n from request. + * Method to create StockType l11n from request. * * @param RequestAbstract $request Request * @@ -150,7 +150,7 @@ final class ApiStockTypeController extends Controller } /** - * Validate item attribute l11n create request + * Validate StockType l11n create request * * @param RequestAbstract $request Request * diff --git a/Controller/BackendController.php b/Controller/BackendController.php index efbc585..0a6f76f 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement * @copyright Dennis Eichhorn @@ -70,7 +70,7 @@ final class BackendController extends Controller ->with('l11n') ->where('l11n/language', $response->header->l11n->language) ->limit(25) - ->execute(); + ->executeGetArray(); } return $view; @@ -106,7 +106,7 @@ final class BackendController extends Controller } else { $view->data['stocks'] = StockMapper::getAll() ->limit(25) - ->execute(); + ->executeGetArray(); } return $view; @@ -128,10 +128,43 @@ final class BackendController extends Controller { $view = new View($this->app->l11nManager, $request, $response); - $view->setTemplate('/Modules/WarehouseManagement/Theme/Backend/stock'); + $view->setTemplate('/Modules/WarehouseManagement/Theme/Backend/stock-view'); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1001302001, $request, $response); - $view->data['stock'] = StockMapper::get()->where('id', (int) $request->getData('id'))->execute(); + $view->data['stock'] = StockMapper::get() + ->with('locations') + ->with('locations/type') + ->with('locations/type/l11n') + ->where('id', (int) $request->getData('id')) + ->where('locations/type/l11n/language', [$request->header->l11n->language, null]) + ->execute(); + + $view->data['types'] = StockTypeMapper::getAll() + ->with('l11n') + ->where('l11n/language', $request->header->l11n->language) + ->executeGetArray(); + + return $view; + } + + /** + * Routing end-point for application behavior. + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return RenderableInterface Returns a renderable object + * + * @since 1.0.0 + * @codeCoverageIgnore + */ + public function viewStockCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface + { + $view = new View($this->app->l11nManager, $request, $response); + + $view->setTemplate('/Modules/WarehouseManagement/Theme/Backend/stock-view'); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1001302001, $request, $response); return $view; } @@ -155,18 +188,42 @@ final class BackendController extends Controller $view->setTemplate('/Modules/WarehouseManagement/Theme/Backend/stock-type-view'); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1001302001, $request, $response); - $view->data['type'] = StockMapper::get()->where('id', (int) $request->getData('id'))->execute(); + $view->data['type'] = StockMapper::get() + ->where('id', (int) $request->getData('id'))->execute(); $l11nValues = StockTypeL11nMapper::getAll() ->with('type') ->where('ref', $view->data['type']->id) - ->execute(); + ->executeGetArray(); + $view->data['l11nView'] = new \Web\Backend\Views\L11nView($this->app->l11nManager, $request, $response); $view->data['l11nValues'] = $l11nValues; return $view; } + /** + * Routing end-point for application behavior. + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return RenderableInterface Returns a renderable object + * + * @since 1.0.0 + * @codeCoverageIgnore + */ + public function viewStockTypeCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface + { + $view = new View($this->app->l11nManager, $request, $response); + + $view->setTemplate('/Modules/WarehouseManagement/Theme/Backend/stock-type-view'); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1001302001, $request, $response); + + return $view; + } + /** * Routing end-point for application behavior. * @@ -186,22 +243,13 @@ final class BackendController extends Controller $view->setTemplate('/Modules/WarehouseManagement/Theme/Backend/stock-location-list'); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1001302001, $request, $response); - if ($request->getData('ptype') === 'p') { - $view->data['locations'] = StockLocationMapper::getAll() - ->with('stock') - ->limit(25) - ->execute(); - } elseif ($request->getData('ptype') === 'n') { - $view->data['locations'] = StockLocationMapper::getAll() - ->with('stock') - ->limit(25) - ->execute(); - } else { - $view->data['locations'] = StockLocationMapper::getAll() - ->with('stock') - ->limit(25) - ->execute(); - } + $view->data['locations'] = StockLocationMapper::getAll() + ->with('stock') + ->with('type') + ->with('type/l11n') + ->where('type/l11n/language', [$request->header->l11n->language, null]) + ->limit(25) + ->executeGetArray(); return $view; } @@ -222,10 +270,49 @@ final class BackendController extends Controller { $view = new View($this->app->l11nManager, $request, $response); - $view->setTemplate('/Modules/WarehouseManagement/Theme/Backend/stock-location'); + $view->setTemplate('/Modules/WarehouseManagement/Theme/Backend/stock-location-view'); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1001302001, $request, $response); - $view->data['location'] = StockLocationMapper::get()->where('id', (int) $request->getData('id'))->execute(); + $view->data['location'] = StockLocationMapper::get() + ->with('stock') + ->with('shelfs') + ->with('type') + ->with('type/l11n') + ->where('type/l11n/language', [$request->header->l11n->language, null]) + ->where('id', (int) $request->getData('id')) + ->execute(); + + $view->data['types'] = StockTypeMapper::getAll() + ->with('l11n') + ->where('l11n/language', $request->header->l11n->language) + ->executeGetArray(); + + return $view; + } + + /** + * Routing end-point for application behavior. + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return RenderableInterface Returns a renderable object + * + * @since 1.0.0 + * @codeCoverageIgnore + */ + public function viewStockLocationCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface + { + $view = new View($this->app->l11nManager, $request, $response); + + $view->setTemplate('/Modules/WarehouseManagement/Theme/Backend/stock-location-view'); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1001302001, $request, $response); + + $view->data['types'] = StockTypeMapper::getAll() + ->with('l11n') + ->where('l11n/language', $request->header->l11n->language) + ->executeGetArray(); return $view; } diff --git a/Controller/Controller.php b/Controller/Controller.php index ce0abc0..c64cb4d 100755 --- a/Controller/Controller.php +++ b/Controller/Controller.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement * @copyright Dennis Eichhorn diff --git a/ICAL.txt b/ICLA.txt old mode 100755 new mode 100644 similarity index 100% rename from ICAL.txt rename to ICLA.txt diff --git a/Models/Attribute/LotAttributeMapper.php b/Models/Attribute/LotAttributeMapper.php index 3e4d300..b5352e0 100644 --- a/Models/Attribute/LotAttributeMapper.php +++ b/Models/Attribute/LotAttributeMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models\Attribute * @copyright Dennis Eichhorn diff --git a/Models/Attribute/LotAttributeTypeL11nMapper.php b/Models/Attribute/LotAttributeTypeL11nMapper.php index afa96cc..09c5fbb 100644 --- a/Models/Attribute/LotAttributeTypeL11nMapper.php +++ b/Models/Attribute/LotAttributeTypeL11nMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models\Attribute * @copyright Dennis Eichhorn diff --git a/Models/Attribute/LotAttributeTypeMapper.php b/Models/Attribute/LotAttributeTypeMapper.php index ec2122d..ffc228d 100644 --- a/Models/Attribute/LotAttributeTypeMapper.php +++ b/Models/Attribute/LotAttributeTypeMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models\Attribute * @copyright Dennis Eichhorn diff --git a/Models/Attribute/LotAttributeValueL11nMapper.php b/Models/Attribute/LotAttributeValueL11nMapper.php index f8c52a9..94f4a6f 100644 --- a/Models/Attribute/LotAttributeValueL11nMapper.php +++ b/Models/Attribute/LotAttributeValueL11nMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models\Attribute * @copyright Dennis Eichhorn diff --git a/Models/Attribute/LotAttributeValueMapper.php b/Models/Attribute/LotAttributeValueMapper.php index 6298a10..b274fd5 100644 --- a/Models/Attribute/LotAttributeValueMapper.php +++ b/Models/Attribute/LotAttributeValueMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models\Attribute * @copyright Dennis Eichhorn diff --git a/Models/CountingList.php b/Models/CountingList.php index 9419e28..f311f02 100755 --- a/Models/CountingList.php +++ b/Models/CountingList.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Warehousing\Models * @copyright Dennis Eichhorn diff --git a/Models/NullStock.php b/Models/NullStock.php index 491e203..8b98e44 100755 --- a/Models/NullStock.php +++ b/Models/NullStock.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models * @copyright Dennis Eichhorn diff --git a/Models/NullStockDistribution.php b/Models/NullStockDistribution.php index c20a709..5034ed3 100644 --- a/Models/NullStockDistribution.php +++ b/Models/NullStockDistribution.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models * @copyright Dennis Eichhorn diff --git a/Models/NullStockLocation.php b/Models/NullStockLocation.php index de73bfe..604f9b5 100755 --- a/Models/NullStockLocation.php +++ b/Models/NullStockLocation.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models * @copyright Dennis Eichhorn diff --git a/Models/NullStockShelf.php b/Models/NullStockShelf.php index 8badd2c..b591885 100755 --- a/Models/NullStockShelf.php +++ b/Models/NullStockShelf.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models * @copyright Dennis Eichhorn diff --git a/Models/NullStockTransaction.php b/Models/NullStockTransaction.php index 36c048e..0a0baed 100644 --- a/Models/NullStockTransaction.php +++ b/Models/NullStockTransaction.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models * @copyright Dennis Eichhorn diff --git a/Models/NullStockType.php b/Models/NullStockType.php new file mode 100644 index 0000000..e5e891c --- /dev/null +++ b/Models/NullStockType.php @@ -0,0 +1,46 @@ +id = $id; + } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } +} diff --git a/Models/PermissionCategory.php b/Models/PermissionCategory.php index 5bd227b..794d975 100755 --- a/Models/PermissionCategory.php +++ b/Models/PermissionCategory.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models * @copyright Dennis Eichhorn diff --git a/Models/Stock.php b/Models/Stock.php index 647559c..2fbad9e 100755 --- a/Models/Stock.php +++ b/Models/Stock.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Warehousing\Models * @copyright Dennis Eichhorn @@ -59,6 +59,8 @@ class Stock public bool $inventory = false; + public array $locations = []; + /** * Constructor. * diff --git a/Models/StockDistribution.php b/Models/StockDistribution.php index 265b79a..c00bf67 100644 --- a/Models/StockDistribution.php +++ b/Models/StockDistribution.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Warehousing\Models * @copyright Dennis Eichhorn @@ -41,4 +41,6 @@ class StockDistribution public int $stock = 0; public int $stockType = 0; + + // @remark We don't care about the location because that is just an internal thing and not all companies really care about that. } diff --git a/Models/StockDistributionMapper.php b/Models/StockDistributionMapper.php index aced4a6..f4097b6 100644 --- a/Models/StockDistributionMapper.php +++ b/Models/StockDistributionMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models * @copyright Dennis Eichhorn diff --git a/Models/StockEvaluation.php b/Models/StockEvaluation.php index 44cd3e7..c86fe23 100644 --- a/Models/StockEvaluation.php +++ b/Models/StockEvaluation.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models * @copyright Dennis Eichhorn diff --git a/Models/StockEvaluationMethod.php b/Models/StockEvaluationMethod.php index 5becc1f..d90ad23 100644 --- a/Models/StockEvaluationMethod.php +++ b/Models/StockEvaluationMethod.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models * @copyright Dennis Eichhorn diff --git a/Models/StockEvaluationType.php b/Models/StockEvaluationType.php index 359ea0a..3e24184 100644 --- a/Models/StockEvaluationType.php +++ b/Models/StockEvaluationType.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models * @copyright Dennis Eichhorn diff --git a/Models/StockLocation.php b/Models/StockLocation.php index 428cf3c..1a337bd 100755 --- a/Models/StockLocation.php +++ b/Models/StockLocation.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Warehousing\Models * @copyright Dennis Eichhorn @@ -34,9 +34,9 @@ class StockLocation public string $name = ''; - public int | Stock $stock = 0; + public Stock $stock; - public ?int $type = null; + public ?StockType $type = null; public int $x = 0; @@ -44,6 +44,8 @@ class StockLocation public int $z = 0; + public array $shelfs = []; + /** * Constructor. * @@ -54,5 +56,6 @@ class StockLocation public function __construct(string $name = '') { $this->name = $name; + $this->stock = new NullStock(); } } diff --git a/Models/StockLocationMapper.php b/Models/StockLocationMapper.php index c30bcc8..6e4a15a 100755 --- a/Models/StockLocationMapper.php +++ b/Models/StockLocationMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models * @copyright Dennis Eichhorn @@ -58,6 +58,34 @@ final class StockLocationMapper extends DataMapperFactory ], ]; + /** + * Has one relation. + * + * @var array + * @since 1.0.0 + */ + public const OWNS_ONE = [ + 'type' => [ + 'mapper' => StockTypeMapper::class, + 'external' => 'warehousemgmt_stocklocation_type', + ], + ]; + + /** + * Has many relation. + * + * @var array + * @since 1.0.0 + */ + public const HAS_MANY = [ + 'shelfs' => [ + 'mapper' => StockShelfMapper::class, + 'table' => 'warehousemgmt_stockshelf', + 'self' => 'warehousemgmt_stockshelf_location', + 'external' => null, + ], + ]; + /** * Primary table. * diff --git a/Models/StockMapper.php b/Models/StockMapper.php index 2c869b8..e7d8d69 100755 --- a/Models/StockMapper.php +++ b/Models/StockMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models * @copyright Dennis Eichhorn @@ -80,6 +80,21 @@ final class StockMapper extends DataMapperFactory ], ]; + /** + * Has many relation. + * + * @var array + * @since 1.0.0 + */ + public const HAS_MANY = [ + 'locations' => [ + 'mapper' => StockLocationMapper::class, + 'table' => 'warehousemgmt_stocklocation', + 'self' => 'warehousemgmt_stocklocation_stock', + 'external' => null, + ], + ]; + /** * Primary table. * @@ -125,7 +140,7 @@ final class StockMapper extends DataMapperFactory /** @var \Modules\WarehouseManagement\Models\StockDistribution[] $temp */ $temp = StockDistributionMapper::getAll() ->where('item', $items, 'IN') - ->execute(); + ->executeGetArray(); foreach ($temp as $t) { if (!isset($dists[$t->item])) { diff --git a/Models/StockShelf.php b/Models/StockShelf.php index e5c0fc0..2eadd79 100755 --- a/Models/StockShelf.php +++ b/Models/StockShelf.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Warehousing\Models * @copyright Dennis Eichhorn diff --git a/Models/StockShelfMapper.php b/Models/StockShelfMapper.php index 8972ecb..07a1653 100755 --- a/Models/StockShelfMapper.php +++ b/Models/StockShelfMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models * @copyright Dennis Eichhorn diff --git a/Models/StockTransaction.php b/Models/StockTransaction.php index 4d02ca7..7da3352 100644 --- a/Models/StockTransaction.php +++ b/Models/StockTransaction.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Warehousing\Models * @copyright Dennis Eichhorn diff --git a/Models/StockTransactionMapper.php b/Models/StockTransactionMapper.php index f517799..e75d373 100644 --- a/Models/StockTransactionMapper.php +++ b/Models/StockTransactionMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models * @copyright Dennis Eichhorn diff --git a/Models/StockTransactionState.php b/Models/StockTransactionState.php index 1ddb816..720acfc 100644 --- a/Models/StockTransactionState.php +++ b/Models/StockTransactionState.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models * @copyright Dennis Eichhorn diff --git a/Models/StockTransactionType.php b/Models/StockTransactionType.php index 35ac364..8ba60b9 100644 --- a/Models/StockTransactionType.php +++ b/Models/StockTransactionType.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models * @copyright Dennis Eichhorn diff --git a/Models/StockType.php b/Models/StockType.php index ce266ab..8fb6e90 100644 --- a/Models/StockType.php +++ b/Models/StockType.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Warehousing\Models * @copyright Dennis Eichhorn diff --git a/Models/StockTypeL11nMapper.php b/Models/StockTypeL11nMapper.php index 8ca1b15..72d37e1 100644 --- a/Models/StockTypeL11nMapper.php +++ b/Models/StockTypeL11nMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models * @copyright Dennis Eichhorn diff --git a/Models/StockTypeMapper.php b/Models/StockTypeMapper.php index bea188e..52e8e32 100644 --- a/Models/StockTypeMapper.php +++ b/Models/StockTypeMapper.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\Models * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.ar.lang.php b/Theme/Backend/Lang/Navigation.ar.lang.php index 2b24cc4..7730f46 100755 --- a/Theme/Backend/Lang/Navigation.ar.lang.php +++ b/Theme/Backend/Lang/Navigation.ar.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.cs.lang.php b/Theme/Backend/Lang/Navigation.cs.lang.php index 88b10d1..457ea1b 100755 --- a/Theme/Backend/Lang/Navigation.cs.lang.php +++ b/Theme/Backend/Lang/Navigation.cs.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.da.lang.php b/Theme/Backend/Lang/Navigation.da.lang.php index 401e56b..081d218 100755 --- a/Theme/Backend/Lang/Navigation.da.lang.php +++ b/Theme/Backend/Lang/Navigation.da.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.de.lang.php b/Theme/Backend/Lang/Navigation.de.lang.php index 7fd2189..1453e27 100755 --- a/Theme/Backend/Lang/Navigation.de.lang.php +++ b/Theme/Backend/Lang/Navigation.de.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.el.lang.php b/Theme/Backend/Lang/Navigation.el.lang.php index b22dcf5..e60450d 100755 --- a/Theme/Backend/Lang/Navigation.el.lang.php +++ b/Theme/Backend/Lang/Navigation.el.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.en.lang.php b/Theme/Backend/Lang/Navigation.en.lang.php index 425897e..813a0a2 100755 --- a/Theme/Backend/Lang/Navigation.en.lang.php +++ b/Theme/Backend/Lang/Navigation.en.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.es.lang.php b/Theme/Backend/Lang/Navigation.es.lang.php index 683aadf..08af616 100755 --- a/Theme/Backend/Lang/Navigation.es.lang.php +++ b/Theme/Backend/Lang/Navigation.es.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.fi.lang.php b/Theme/Backend/Lang/Navigation.fi.lang.php index ac6fb36..69971a6 100755 --- a/Theme/Backend/Lang/Navigation.fi.lang.php +++ b/Theme/Backend/Lang/Navigation.fi.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.fr.lang.php b/Theme/Backend/Lang/Navigation.fr.lang.php index d39a5e9..7ceaf39 100755 --- a/Theme/Backend/Lang/Navigation.fr.lang.php +++ b/Theme/Backend/Lang/Navigation.fr.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.hu.lang.php b/Theme/Backend/Lang/Navigation.hu.lang.php index e486d7a..fcd22ac 100755 --- a/Theme/Backend/Lang/Navigation.hu.lang.php +++ b/Theme/Backend/Lang/Navigation.hu.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.it.lang.php b/Theme/Backend/Lang/Navigation.it.lang.php index ac93e71..4ee8a42 100755 --- a/Theme/Backend/Lang/Navigation.it.lang.php +++ b/Theme/Backend/Lang/Navigation.it.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.ja.lang.php b/Theme/Backend/Lang/Navigation.ja.lang.php index 620d4e5..dabc2ca 100755 --- a/Theme/Backend/Lang/Navigation.ja.lang.php +++ b/Theme/Backend/Lang/Navigation.ja.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.ko.lang.php b/Theme/Backend/Lang/Navigation.ko.lang.php index 49d1ac3..222b473 100755 --- a/Theme/Backend/Lang/Navigation.ko.lang.php +++ b/Theme/Backend/Lang/Navigation.ko.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.no.lang.php b/Theme/Backend/Lang/Navigation.no.lang.php index c80b920..68bce8e 100755 --- a/Theme/Backend/Lang/Navigation.no.lang.php +++ b/Theme/Backend/Lang/Navigation.no.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.pl.lang.php b/Theme/Backend/Lang/Navigation.pl.lang.php index b8b88e7..a49534f 100755 --- a/Theme/Backend/Lang/Navigation.pl.lang.php +++ b/Theme/Backend/Lang/Navigation.pl.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.pt.lang.php b/Theme/Backend/Lang/Navigation.pt.lang.php index a60b78c..562a1f4 100755 --- a/Theme/Backend/Lang/Navigation.pt.lang.php +++ b/Theme/Backend/Lang/Navigation.pt.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.ru.lang.php b/Theme/Backend/Lang/Navigation.ru.lang.php index 4e8c357..f6e4b2a 100755 --- a/Theme/Backend/Lang/Navigation.ru.lang.php +++ b/Theme/Backend/Lang/Navigation.ru.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.sv.lang.php b/Theme/Backend/Lang/Navigation.sv.lang.php index 50526ac..73c780c 100755 --- a/Theme/Backend/Lang/Navigation.sv.lang.php +++ b/Theme/Backend/Lang/Navigation.sv.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.th.lang.php b/Theme/Backend/Lang/Navigation.th.lang.php index 0cd1929..04926db 100755 --- a/Theme/Backend/Lang/Navigation.th.lang.php +++ b/Theme/Backend/Lang/Navigation.th.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.tr.lang.php b/Theme/Backend/Lang/Navigation.tr.lang.php index e1af33a..705ac4e 100755 --- a/Theme/Backend/Lang/Navigation.tr.lang.php +++ b/Theme/Backend/Lang/Navigation.tr.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.uk.lang.php b/Theme/Backend/Lang/Navigation.uk.lang.php index 36bd1f6..e17e525 100755 --- a/Theme/Backend/Lang/Navigation.uk.lang.php +++ b/Theme/Backend/Lang/Navigation.uk.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/Navigation.zh.lang.php b/Theme/Backend/Lang/Navigation.zh.lang.php index b4a1c17..bdf67a5 100755 --- a/Theme/Backend/Lang/Navigation.zh.lang.php +++ b/Theme/Backend/Lang/Navigation.zh.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/ar.lang.php b/Theme/Backend/Lang/ar.lang.php index 3a00c19..d6bf175 100755 --- a/Theme/Backend/Lang/ar.lang.php +++ b/Theme/Backend/Lang/ar.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/cs.lang.php b/Theme/Backend/Lang/cs.lang.php index 68a5700..7ad835e 100755 --- a/Theme/Backend/Lang/cs.lang.php +++ b/Theme/Backend/Lang/cs.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/da.lang.php b/Theme/Backend/Lang/da.lang.php index edbed16..7ed836b 100755 --- a/Theme/Backend/Lang/da.lang.php +++ b/Theme/Backend/Lang/da.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/de.lang.php b/Theme/Backend/Lang/de.lang.php index 946ea15..5e7f755 100755 --- a/Theme/Backend/Lang/de.lang.php +++ b/Theme/Backend/Lang/de.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn @@ -13,12 +13,12 @@ declare(strict_types=1); return ['WarehouseManagement' => [ - 'Language' => '', - 'Localization' => '', - 'Localizations' => '', - 'Locations' => '', - 'Name' => 'Name', - 'Stock' => 'Aktie', - 'Stocks' => '', - 'Type' => 'Typ', + 'Locations' => 'Lagerplätze', + 'Name' => 'Name', + 'Stock' => 'Lager', + 'Stocks' => 'Lager', + 'Shelfs' => 'Fächer', + 'Shelf' => 'Fach', + 'Type' => 'Typ', + 'Location' => 'Lagerplatz', ]]; diff --git a/Theme/Backend/Lang/el.lang.php b/Theme/Backend/Lang/el.lang.php index 3219db9..d890d2d 100755 --- a/Theme/Backend/Lang/el.lang.php +++ b/Theme/Backend/Lang/el.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index 35d0be0..96d91d8 100755 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn @@ -13,12 +13,12 @@ declare(strict_types=1); return ['WarehouseManagement' => [ - 'Language' => '', - 'Localization' => '', - 'Localizations' => '', - 'Locations' => 'Locations', - 'Name' => 'Name', - 'Stock' => 'Stock', - 'Stocks' => 'Stocks', - 'Type' => 'Type', + 'Locations' => 'Locations', + 'Name' => 'Name', + 'Stock' => 'Stock', + 'Stocks' => 'Stocks', + 'Shelfs' => 'Shelfs', + 'Shelf' => 'Shelf', + 'Type' => 'Type', + 'Location' => 'Location', ]]; diff --git a/Theme/Backend/Lang/es.lang.php b/Theme/Backend/Lang/es.lang.php index d3a6e73..96a5251 100755 --- a/Theme/Backend/Lang/es.lang.php +++ b/Theme/Backend/Lang/es.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/fi.lang.php b/Theme/Backend/Lang/fi.lang.php index 41fa5a6..09b549d 100755 --- a/Theme/Backend/Lang/fi.lang.php +++ b/Theme/Backend/Lang/fi.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/fr.lang.php b/Theme/Backend/Lang/fr.lang.php index 0ea9378..4b35640 100755 --- a/Theme/Backend/Lang/fr.lang.php +++ b/Theme/Backend/Lang/fr.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/hu.lang.php b/Theme/Backend/Lang/hu.lang.php index 8c9bdb9..ab5a476 100755 --- a/Theme/Backend/Lang/hu.lang.php +++ b/Theme/Backend/Lang/hu.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/it.lang.php b/Theme/Backend/Lang/it.lang.php index 3512158..3ead3aa 100755 --- a/Theme/Backend/Lang/it.lang.php +++ b/Theme/Backend/Lang/it.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/ja.lang.php b/Theme/Backend/Lang/ja.lang.php index 523c864..5306d8f 100755 --- a/Theme/Backend/Lang/ja.lang.php +++ b/Theme/Backend/Lang/ja.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/ko.lang.php b/Theme/Backend/Lang/ko.lang.php index 582a4f4..0f557b9 100755 --- a/Theme/Backend/Lang/ko.lang.php +++ b/Theme/Backend/Lang/ko.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/no.lang.php b/Theme/Backend/Lang/no.lang.php index edbed16..7ed836b 100755 --- a/Theme/Backend/Lang/no.lang.php +++ b/Theme/Backend/Lang/no.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/pl.lang.php b/Theme/Backend/Lang/pl.lang.php index ce8bffa..9bf3e3d 100755 --- a/Theme/Backend/Lang/pl.lang.php +++ b/Theme/Backend/Lang/pl.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/pt.lang.php b/Theme/Backend/Lang/pt.lang.php index e84aa5c..604293c 100755 --- a/Theme/Backend/Lang/pt.lang.php +++ b/Theme/Backend/Lang/pt.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/ru.lang.php b/Theme/Backend/Lang/ru.lang.php index 80efdb6..49e91f5 100755 --- a/Theme/Backend/Lang/ru.lang.php +++ b/Theme/Backend/Lang/ru.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/sv.lang.php b/Theme/Backend/Lang/sv.lang.php index 86a566a..7208266 100755 --- a/Theme/Backend/Lang/sv.lang.php +++ b/Theme/Backend/Lang/sv.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/th.lang.php b/Theme/Backend/Lang/th.lang.php index 6b1c0e6..3218fe0 100755 --- a/Theme/Backend/Lang/th.lang.php +++ b/Theme/Backend/Lang/th.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/tr.lang.php b/Theme/Backend/Lang/tr.lang.php index 72518d4..6ec3ee6 100755 --- a/Theme/Backend/Lang/tr.lang.php +++ b/Theme/Backend/Lang/tr.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/uk.lang.php b/Theme/Backend/Lang/uk.lang.php index e4b39b2..def9dcf 100755 --- a/Theme/Backend/Lang/uk.lang.php +++ b/Theme/Backend/Lang/uk.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/Lang/zh.lang.php b/Theme/Backend/Lang/zh.lang.php index 4b87aea..eec50e4 100755 --- a/Theme/Backend/Lang/zh.lang.php +++ b/Theme/Backend/Lang/zh.lang.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Localization * @copyright Dennis Eichhorn diff --git a/Theme/Backend/stock-list.tpl.php b/Theme/Backend/stock-list.tpl.php index 1582bbd..cdcbc71 100755 --- a/Theme/Backend/stock-list.tpl.php +++ b/Theme/Backend/stock-list.tpl.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement * @copyright Dennis Eichhorn @@ -21,7 +21,11 @@ echo $this->data['nav']->render(); ?>
-
getHtml('Stocks'); ?>download
+
+ getHtml('Stocks'); ?> + download + getHtml('New', '0', '0'); ?> +
@@ -31,7 +35,7 @@ echo $this->data['nav']->render(); ?> $value) : ++$count; - $url = UriFactory::build('{/base}/warehouse/stock?{?}&id=' . $value->id); + $url = UriFactory::build('{/base}/warehouse/stock/view?{?}&id=' . $value->id); ?> $value) : ++$count; - $url = UriFactory::build('{/base}/warehouse/stock/location?{?}&id=' . $value->id); + $url = UriFactory::build('{/base}/warehouse/stock/location/view?{?}&id=' . $value->id); ?>
id; ?> diff --git a/Theme/Backend/stock-location-list.tpl.php b/Theme/Backend/stock-location-list.tpl.php index 6ef94e8..42e11b0 100755 --- a/Theme/Backend/stock-location-list.tpl.php +++ b/Theme/Backend/stock-location-list.tpl.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement * @copyright Dennis Eichhorn @@ -29,15 +29,17 @@ echo $this->data['nav']->render(); ?> getHtml('ID', '0', '0'); ?> getHtml('Stock'); ?> getHtml('Name'); ?> + getHtml('Type'); ?>
id; ?> stock->name; ?> name; ?> + printHtml($value->type->getL11n()); ?>
getHtml('Empty', '0', '0'); ?> diff --git a/Theme/Backend/stock-location-view.tpl.php b/Theme/Backend/stock-location-view.tpl.php new file mode 100644 index 0000000..dce2f11 --- /dev/null +++ b/Theme/Backend/stock-location-view.tpl.php @@ -0,0 +1,153 @@ +data['location'] ?? new NullStockLocation(); +$isNew = $location->id === 0; + +echo $this->data['nav']->render(); +?> + +
+
+
+
+
getHtml('Location'); ?>
+
+
+ + +
+ +
+ + > +
+ +
+ + +
+ +
+ + +
+
+
+ + + + + + +
+
+
+
+
+ + +
+
+
+
+
getHtml('Shelf'); ?>
+
+
+ + +
+ +
+ + +
+ + +
+
+ + + +
+
+
+
+ +
+
+
getHtml('Shelfs'); ?>download
+
+ + + + + + shelfs as $key => $value) : + ++$c; + $url = UriFactory::build('{/base}/warehouse/stock/location/shelf/view?id=' . $value->id); + ?> + + +
+ getHtml('ID', '0', '0'); ?> + getHtml('Name', '0', '0'); ?> +
+ settings + + + + + + + id; ?> + name; ?> + + +
getHtml('Empty', '0', '0'); ?> + +
+
+
+
+
+ \ No newline at end of file diff --git a/Theme/Backend/stock-location.tpl.php b/Theme/Backend/stock-location.tpl.php deleted file mode 100755 index 5af5f61..0000000 --- a/Theme/Backend/stock-location.tpl.php +++ /dev/null @@ -1,26 +0,0 @@ -data['location']; - -echo $this->data['nav']->render(); -?> -
-
-
-
printHtml($location->name); ?>
-
-
-
-
\ No newline at end of file diff --git a/Theme/Backend/stock-type-list.tpl.php b/Theme/Backend/stock-type-list.tpl.php index 96bc843..b54842c 100644 --- a/Theme/Backend/stock-type-list.tpl.php +++ b/Theme/Backend/stock-type-list.tpl.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement * @copyright Dennis Eichhorn @@ -21,7 +21,11 @@ echo $this->data['nav']->render(); ?>
-
getHtml('Stocks'); ?>download
+
+ getHtml('Stocks'); ?> + download + getHtml('New', '0', '0'); ?> +
@@ -31,7 +35,7 @@ echo $this->data['nav']->render(); ?> $value) : ++$count; - $url = UriFactory::build('{/base}/warehouse/stock/type?id=' . $value->id); + $url = UriFactory::build('{/base}/warehouse/stock/type/view?id=' . $value->id); ?>
id; ?> diff --git a/Theme/Backend/stock-type-view.tpl.php b/Theme/Backend/stock-type-view.tpl.php index eaadc64..99dfa0c 100644 --- a/Theme/Backend/stock-type-view.tpl.php +++ b/Theme/Backend/stock-type-view.tpl.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\Profile * @copyright Dennis Eichhorn @@ -12,82 +12,50 @@ */ declare(strict_types=1); -$type = $this->data['type']; +use Modules\WarehouseManagement\Models\NullStockType; +use phpOMS\Uri\UriFactory; + +$type = $this->data['type'] ?? new NullStockType(); +$isNew = $type->id === 0; echo $this->data['nav']->render(); ?>
-
+
+
getHtml('Type'); ?>
+
+ + +
+
- + >
-
-
- -
-
-
getHtml('Localizations'); ?>download
-
- - - - - - data['l11nValues']; - foreach ($itemL11n as $value) : ++$c; ?> - - -
- getHtml('ID', '0', '0'); ?> - getHtml('Name'); ?>expand_lessexpand_more - getHtml('Language'); ?>expand_lessexpand_more - getHtml('Localization'); ?>expand_lessexpand_more -
- settings - type->isRequired) : ?> - - - - - - - - id; ?> - printHtml($value->type->title); ?> - printHtml($value->language); ?> - printHtml(\substr($value->content, 0, 100))); ?> - - -
getHtml('Empty', '0', '0'); ?> - -
+
+ + + + + +
+
+ + +
+ data['l11nView']->render( + $this->data['l11nValues'], + [], + '{/api}warehouse/stock/type/l11n?csrf={$CSRF}' + ); + ?> +
+ diff --git a/Theme/Backend/stock-view.tpl.php b/Theme/Backend/stock-view.tpl.php new file mode 100644 index 0000000..9f65ceb --- /dev/null +++ b/Theme/Backend/stock-view.tpl.php @@ -0,0 +1,150 @@ +data['stock'] ?? new NullStock(); +$isNew = $stock->id === 0; + +echo $this->data['nav']->render(); +?> +
+
+
+
+
getHtml('Stock'); ?>
+
+
+ + +
+ +
+ + +
+
+
+ + + + + + +
+
+ +
+
+ + +
+
+
+
+
getHtml('Location'); ?>
+
+
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+
+ + + +
+
+
+
+ +
+
+
getHtml('Locations'); ?>download
+
+ + + + + + locations as $key => $value) : + ++$c; + $url = UriFactory::build('{/base}/warehouse/stock/location/view?id=' . $value->id); + ?> + + +
+ getHtml('ID', '0', '0'); ?> + getHtml('Type', '0', '0'); ?> + getHtml('Name', '0', '0'); ?> +
+ settings + + + + + + + id; ?> + printHtml($value->type->getL11n()); ?> + name; ?> + + +
getHtml('Empty', '0', '0'); ?> + +
+
+
+
+
+ \ No newline at end of file diff --git a/Theme/Backend/stock.tpl.php b/Theme/Backend/stock.tpl.php deleted file mode 100755 index d686e4e..0000000 --- a/Theme/Backend/stock.tpl.php +++ /dev/null @@ -1,31 +0,0 @@ -data['stock']; - -echo $this->data['nav']->render(); -?> -
-
-
-
getHtml('Stock'); ?>
-
-
- - -
-
-
-
-
\ No newline at end of file diff --git a/tests/Admin/AdminTest.php b/tests/Admin/AdminTest.php index 935baa4..81aa005 100755 --- a/tests/Admin/AdminTest.php +++ b/tests/Admin/AdminTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Autoloader.php b/tests/Autoloader.php index 128e4b7..9f4d385 100755 --- a/tests/Autoloader.php +++ b/tests/Autoloader.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules/tests * @copyright Dennis Eichhorn diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php index eb0b0b5..c7a58ec 100755 --- a/tests/Bootstrap.php +++ b/tests/Bootstrap.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package Modules\WarehouseManagement\tests * @copyright Dennis Eichhorn diff --git a/tests/Models/NullStockLocationTest.php b/tests/Models/NullStockLocationTest.php index fc30313..e386a0d 100644 --- a/tests/Models/NullStockLocationTest.php +++ b/tests/Models/NullStockLocationTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Models/NullStockShelfTest.php b/tests/Models/NullStockShelfTest.php index a768017..c707d35 100644 --- a/tests/Models/NullStockShelfTest.php +++ b/tests/Models/NullStockShelfTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Models/NullStockTest.php b/tests/Models/NullStockTest.php index 82e90d8..e0bd57a 100644 --- a/tests/Models/NullStockTest.php +++ b/tests/Models/NullStockTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Models/StockLocationTest.php b/tests/Models/StockLocationTest.php index 0c1fea1..6e26485 100755 --- a/tests/Models/StockLocationTest.php +++ b/tests/Models/StockLocationTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Models/StockMovementTest.php b/tests/Models/StockMovementTest.php index accc44f..c044c06 100755 --- a/tests/Models/StockMovementTest.php +++ b/tests/Models/StockMovementTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Models/StockShelfTest.php b/tests/Models/StockShelfTest.php index 3b9a20d..5db5578 100755 --- a/tests/Models/StockShelfTest.php +++ b/tests/Models/StockShelfTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn diff --git a/tests/Models/StockTest.php b/tests/Models/StockTest.php index 1f8396b..4baf144 100755 --- a/tests/Models/StockTest.php +++ b/tests/Models/StockTest.php @@ -2,7 +2,7 @@ /** * Jingga * - * PHP Version 8.1 + * PHP Version 8.2 * * @package tests * @copyright Dennis Eichhorn