mirror of
https://github.com/Karaka-Management/oms-WarehouseManagement.git
synced 2026-01-11 07:08:41 +00:00
Merge branch 'develop'
This commit is contained in:
commit
ff9e9dd03d
9
.github/workflows/main.yml
vendored
9
.github/workflows/main.yml
vendored
|
|
@ -13,10 +13,15 @@ on:
|
||||||
- cron: '0 0 1,15 * *'
|
- cron: '0 0 1,15 * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
general_module_workflow:
|
general_module_workflow_php:
|
||||||
uses: Karaka-Management/Karaka/.github/workflows/php_template.yml@develop
|
uses: Karaka-Management/Karaka/.github/workflows/php_template.yml@develop
|
||||||
secrets:
|
secrets:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
GH_PAT: ${{ secrets.GH_PAT }}
|
GH_PAT: ${{ secrets.GH_PAT }}
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
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 }}
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement
|
* @package Modules\WarehouseManagement
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Admin\Install
|
* @package Modules\WarehouseManagement\Admin\Install
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "Stock",
|
"name": "Stock",
|
||||||
"uri": "{/base}/warehouse/stock/list?{?}",
|
"uri": "{/base}/warehouse/stock/list",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 1,
|
"order": 1,
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
"type": 3,
|
"type": 3,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "Stocks",
|
"name": "Stocks",
|
||||||
"uri": "{/base}/warehouse/stock/list?{?}",
|
"uri": "{/base}/warehouse/stock/list",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 1,
|
"order": 1,
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
"type": 3,
|
"type": 3,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "Locations",
|
"name": "Locations",
|
||||||
"uri": "{/base}/warehouse/stock/location/list?{?}",
|
"uri": "{/base}/warehouse/stock/location/list",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 5,
|
"order": 5,
|
||||||
|
|
@ -63,7 +63,7 @@
|
||||||
"type": 3,
|
"type": 3,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "Types",
|
"name": "Types",
|
||||||
"uri": "{/base}/warehouse/stock/type/list?{?}",
|
"uri": "{/base}/warehouse/stock/type/list",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 10,
|
"order": 10,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Admin\Install
|
* @package Modules\WarehouseManagement\Admin\Install
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Admin\Install
|
* @package Modules\WarehouseManagement\Admin\Install
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,13 @@
|
||||||
"de": "Standard"
|
"de": "Standard"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "virtual",
|
||||||
|
"l11n": {
|
||||||
|
"en": "Virtual",
|
||||||
|
"de": "Virtuell"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "incoming",
|
"name": "incoming",
|
||||||
"l11n": {
|
"l11n": {
|
||||||
|
|
@ -47,5 +54,19 @@
|
||||||
"en": "Retention sample",
|
"en": "Retention sample",
|
||||||
"de": "Rückstellmuster"
|
"de": "Rückstellmuster"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "consignment",
|
||||||
|
"l11n": {
|
||||||
|
"en": "Consignment stock",
|
||||||
|
"de": "Konsignationslager"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "duty_free",
|
||||||
|
"l11n": {
|
||||||
|
"en": "Duty-free",
|
||||||
|
"de": "Zollfreilager"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Admin
|
* @package Modules\WarehouseManagement\Admin
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement
|
* @package Modules\WarehouseManagement
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement
|
* @package Modules\WarehouseManagement
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
@ -18,10 +18,11 @@ use phpOMS\Account\PermissionType;
|
||||||
use phpOMS\Router\RouteVerb;
|
use phpOMS\Router\RouteVerb;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'^.*/warehouse/stock/list(\?.*$|$)' => [
|
'^/warehouse/stock/list(\?.*$|$)' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\WarehouseManagement\Controller\BackendController:viewStockList',
|
'dest' => '\Modules\WarehouseManagement\Controller\BackendController:viewStockList',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
|
'active' => true,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => BackendController::NAME,
|
'module' => BackendController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::READ,
|
||||||
|
|
@ -29,10 +30,11 @@ return [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'^.*/warehouse/stock(\?.*)?$' => [
|
'^/warehouse/stock/view(\?.*$|$)' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\WarehouseManagement\Controller\BackendController:viewStock',
|
'dest' => '\Modules\WarehouseManagement\Controller\BackendController:viewStock',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
|
'active' => true,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => BackendController::NAME,
|
'module' => BackendController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'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',
|
'dest' => '\Modules\WarehouseManagement\Controller\BackendController:viewStockTypeList',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
|
'active' => true,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => BackendController::NAME,
|
'module' => BackendController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::READ,
|
||||||
|
|
@ -51,10 +66,11 @@ return [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'^.*/warehouse/stock/type(\?.*)?$' => [
|
'^/warehouse/stock/type/view(\?.*$|$)' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\WarehouseManagement\Controller\BackendController:viewStockType',
|
'dest' => '\Modules\WarehouseManagement\Controller\BackendController:viewStockType',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
|
'active' => true,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => BackendController::NAME,
|
'module' => BackendController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'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',
|
'dest' => '\Modules\WarehouseManagement\Controller\BackendController:viewStockLocationList',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
|
'active' => true,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => BackendController::NAME,
|
'module' => BackendController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::READ,
|
||||||
|
|
@ -73,10 +102,23 @@ return [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'^.*/warehouse/stock/location(\?.*)?$' => [
|
'^/warehouse/stock/location/view(\?.*$|$)' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\WarehouseManagement\Controller\BackendController:viewStockLocation',
|
'dest' => '\Modules\WarehouseManagement\Controller\BackendController:viewStockLocation',
|
||||||
'verb' => RouteVerb::GET,
|
'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' => [
|
'permission' => [
|
||||||
'module' => BackendController::NAME,
|
'module' => BackendController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::READ,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Admin
|
* @package Modules\WarehouseManagement\Admin
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Admin
|
* @package Modules\WarehouseManagement\Admin
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Admin
|
* @package Modules\WarehouseManagement\Admin
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement
|
* @package Modules\WarehouseManagement
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
@ -42,7 +42,7 @@ use phpOMS\Message\ResponseAbstract;
|
||||||
final class ApiAttributeController extends Controller
|
final class ApiAttributeController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Api method to create item attribute
|
* Api method to create Attribute
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @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
|
* @param RequestAbstract $request Request
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement
|
* @package Modules\WarehouseManagement
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
@ -21,6 +21,8 @@ use Modules\Billing\Models\BillTransferType;
|
||||||
use Modules\ClientManagement\Models\NullClient;
|
use Modules\ClientManagement\Models\NullClient;
|
||||||
use Modules\ItemManagement\Models\StockIdentifierType;
|
use Modules\ItemManagement\Models\StockIdentifierType;
|
||||||
use Modules\SupplierManagement\Models\NullSupplier;
|
use Modules\SupplierManagement\Models\NullSupplier;
|
||||||
|
use Modules\WarehouseManagement\Models\NullStock;
|
||||||
|
use Modules\WarehouseManagement\Models\NullStockType;
|
||||||
use Modules\WarehouseManagement\Models\Stock;
|
use Modules\WarehouseManagement\Models\Stock;
|
||||||
use Modules\WarehouseManagement\Models\StockDistribution;
|
use Modules\WarehouseManagement\Models\StockDistribution;
|
||||||
use Modules\WarehouseManagement\Models\StockDistributionMapper;
|
use Modules\WarehouseManagement\Models\StockDistributionMapper;
|
||||||
|
|
@ -184,7 +186,9 @@ final class ApiController extends Controller
|
||||||
{
|
{
|
||||||
$location = new StockLocation();
|
$location = new StockLocation();
|
||||||
$location->name = $request->getDataString('name') ?? '';
|
$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;
|
return $location;
|
||||||
}
|
}
|
||||||
|
|
@ -434,7 +438,7 @@ final class ApiController extends Controller
|
||||||
/** @var \Modules\WarehouseManagement\Models\StockTransaction[] $transactions */
|
/** @var \Modules\WarehouseManagement\Models\StockTransaction[] $transactions */
|
||||||
$transactions = StockTransactionMapper::getAll()
|
$transactions = StockTransactionMapper::getAll()
|
||||||
->where('billElement', $new->id)
|
->where('billElement', $new->id)
|
||||||
->execute();
|
->executeGetArray();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if ($new->item === $old->item) {
|
if ($new->item === $old->item) {
|
||||||
|
|
@ -463,7 +467,7 @@ final class ApiController extends Controller
|
||||||
/** @var \Modules\WarehouseManagement\Models\StockTransaction[] $transactions */
|
/** @var \Modules\WarehouseManagement\Models\StockTransaction[] $transactions */
|
||||||
$transactions = StockTransactionMapper::getAll()
|
$transactions = StockTransactionMapper::getAll()
|
||||||
->where('billElement', $new->id)
|
->where('billElement', $new->id)
|
||||||
->execute();
|
->executeGetArray();
|
||||||
|
|
||||||
StockTransactionMapper::delete()->execute($transactions);
|
StockTransactionMapper::delete()->execute($transactions);
|
||||||
} elseif ($trigger === 'Billing-bill-delete') {
|
} elseif ($trigger === 'Billing-bill-delete') {
|
||||||
|
|
@ -471,7 +475,7 @@ final class ApiController extends Controller
|
||||||
/** @var \Modules\WarehouseManagement\Models\StockTransaction[] $transactions */
|
/** @var \Modules\WarehouseManagement\Models\StockTransaction[] $transactions */
|
||||||
$transactions = StockTransactionMapper::getAll()
|
$transactions = StockTransactionMapper::getAll()
|
||||||
->where('billElement', $element->id)
|
->where('billElement', $element->id)
|
||||||
->execute();
|
->executeGetArray();
|
||||||
|
|
||||||
StockTransactionMapper::delete()->execute($transactions);
|
StockTransactionMapper::delete()->execute($transactions);
|
||||||
// @todo consider not to delete but mark as deleted?
|
// @todo consider not to delete but mark as deleted?
|
||||||
|
|
@ -491,7 +495,7 @@ final class ApiController extends Controller
|
||||||
/** @var \Modules\WarehouseManagement\Models\StockTransaction[] $transactions */
|
/** @var \Modules\WarehouseManagement\Models\StockTransaction[] $transactions */
|
||||||
$transactions = StockTransactionMapper::getAll()
|
$transactions = StockTransactionMapper::getAll()
|
||||||
->where('billElement', $element->id)
|
->where('billElement', $element->id)
|
||||||
->execute();
|
->executeGetArray();
|
||||||
|
|
||||||
foreach ($transactions as $transaction) {
|
foreach ($transactions as $transaction) {
|
||||||
$transaction->state = StockTransactionState::TRANSIT; // @todo change to more specific
|
$transaction->state = StockTransactionState::TRANSIT; // @todo change to more specific
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement
|
* @package Modules\WarehouseManagement
|
||||||
* @copyright Dennis Eichhorn
|
* @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
|
* @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
|
* @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 RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @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
|
* @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
|
* @param RequestAbstract $request Request
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement
|
* @package Modules\WarehouseManagement
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
@ -70,7 +70,7 @@ final class BackendController extends Controller
|
||||||
->with('l11n')
|
->with('l11n')
|
||||||
->where('l11n/language', $response->header->l11n->language)
|
->where('l11n/language', $response->header->l11n->language)
|
||||||
->limit(25)
|
->limit(25)
|
||||||
->execute();
|
->executeGetArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
|
|
@ -106,7 +106,7 @@ final class BackendController extends Controller
|
||||||
} else {
|
} else {
|
||||||
$view->data['stocks'] = StockMapper::getAll()
|
$view->data['stocks'] = StockMapper::getAll()
|
||||||
->limit(25)
|
->limit(25)
|
||||||
->execute();
|
->executeGetArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
|
|
@ -128,10 +128,43 @@ final class BackendController extends Controller
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$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['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;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
@ -155,18 +188,42 @@ final class BackendController extends Controller
|
||||||
$view->setTemplate('/Modules/WarehouseManagement/Theme/Backend/stock-type-view');
|
$view->setTemplate('/Modules/WarehouseManagement/Theme/Backend/stock-type-view');
|
||||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1001302001, $request, $response);
|
$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()
|
$l11nValues = StockTypeL11nMapper::getAll()
|
||||||
->with('type')
|
->with('type')
|
||||||
->where('ref', $view->data['type']->id)
|
->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;
|
$view->data['l11nValues'] = $l11nValues;
|
||||||
|
|
||||||
return $view;
|
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.
|
* 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->setTemplate('/Modules/WarehouseManagement/Theme/Backend/stock-location-list');
|
||||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1001302001, $request, $response);
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1001302001, $request, $response);
|
||||||
|
|
||||||
if ($request->getData('ptype') === 'p') {
|
$view->data['locations'] = StockLocationMapper::getAll()
|
||||||
$view->data['locations'] = StockLocationMapper::getAll()
|
->with('stock')
|
||||||
->with('stock')
|
->with('type')
|
||||||
->limit(25)
|
->with('type/l11n')
|
||||||
->execute();
|
->where('type/l11n/language', [$request->header->l11n->language, null])
|
||||||
} elseif ($request->getData('ptype') === 'n') {
|
->limit(25)
|
||||||
$view->data['locations'] = StockLocationMapper::getAll()
|
->executeGetArray();
|
||||||
->with('stock')
|
|
||||||
->limit(25)
|
|
||||||
->execute();
|
|
||||||
} else {
|
|
||||||
$view->data['locations'] = StockLocationMapper::getAll()
|
|
||||||
->with('stock')
|
|
||||||
->limit(25)
|
|
||||||
->execute();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
@ -222,10 +270,49 @@ final class BackendController extends Controller
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$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['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;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement
|
* @package Modules\WarehouseManagement
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
0
ICAL.txt → ICLA.txt
Executable file → Normal file
0
ICAL.txt → ICLA.txt
Executable file → Normal file
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models\Attribute
|
* @package Modules\WarehouseManagement\Models\Attribute
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models\Attribute
|
* @package Modules\WarehouseManagement\Models\Attribute
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models\Attribute
|
* @package Modules\WarehouseManagement\Models\Attribute
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models\Attribute
|
* @package Modules\WarehouseManagement\Models\Attribute
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models\Attribute
|
* @package Modules\WarehouseManagement\Models\Attribute
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Warehousing\Models
|
* @package Modules\Warehousing\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models
|
* @package Modules\WarehouseManagement\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models
|
* @package Modules\WarehouseManagement\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models
|
* @package Modules\WarehouseManagement\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models
|
* @package Modules\WarehouseManagement\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models
|
* @package Modules\WarehouseManagement\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
46
Models/NullStockType.php
Normal file
46
Models/NullStockType.php
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Jingga
|
||||||
|
*
|
||||||
|
* PHP Version 8.2
|
||||||
|
*
|
||||||
|
* @package Modules\WarehouseManagement\Models
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://jingga.app
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\WarehouseManagement\Models;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Null model
|
||||||
|
*
|
||||||
|
* @package Modules\WarehouseManagement\Models
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @link https://jingga.app
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
final class NullStockType extends StockType
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param int $id Model id
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function __construct(int $id = 0)
|
||||||
|
{
|
||||||
|
$this->id = $id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function jsonSerialize() : mixed
|
||||||
|
{
|
||||||
|
return ['id' => $this->id];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models
|
* @package Modules\WarehouseManagement\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Warehousing\Models
|
* @package Modules\Warehousing\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
@ -59,6 +59,8 @@ class Stock
|
||||||
|
|
||||||
public bool $inventory = false;
|
public bool $inventory = false;
|
||||||
|
|
||||||
|
public array $locations = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Warehousing\Models
|
* @package Modules\Warehousing\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
@ -41,4 +41,6 @@ class StockDistribution
|
||||||
public int $stock = 0;
|
public int $stock = 0;
|
||||||
|
|
||||||
public int $stockType = 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.
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models
|
* @package Modules\WarehouseManagement\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models
|
* @package Modules\WarehouseManagement\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models
|
* @package Modules\WarehouseManagement\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models
|
* @package Modules\WarehouseManagement\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Warehousing\Models
|
* @package Modules\Warehousing\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
@ -34,9 +34,9 @@ class StockLocation
|
||||||
|
|
||||||
public string $name = '';
|
public string $name = '';
|
||||||
|
|
||||||
public int | Stock $stock = 0;
|
public Stock $stock;
|
||||||
|
|
||||||
public ?int $type = null;
|
public ?StockType $type = null;
|
||||||
|
|
||||||
public int $x = 0;
|
public int $x = 0;
|
||||||
|
|
||||||
|
|
@ -44,6 +44,8 @@ class StockLocation
|
||||||
|
|
||||||
public int $z = 0;
|
public int $z = 0;
|
||||||
|
|
||||||
|
public array $shelfs = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
|
|
@ -54,5 +56,6 @@ class StockLocation
|
||||||
public function __construct(string $name = '')
|
public function __construct(string $name = '')
|
||||||
{
|
{
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
|
$this->stock = new NullStock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models
|
* @package Modules\WarehouseManagement\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
@ -58,6 +58,34 @@ final class StockLocationMapper extends DataMapperFactory
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Has one relation.
|
||||||
|
*
|
||||||
|
* @var array<string, array{mapper:class-string, external:string, by?:string, column?:string, conditional?:bool}>
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public const OWNS_ONE = [
|
||||||
|
'type' => [
|
||||||
|
'mapper' => StockTypeMapper::class,
|
||||||
|
'external' => 'warehousemgmt_stocklocation_type',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Has many relation.
|
||||||
|
*
|
||||||
|
* @var array<string, array{mapper:class-string, table:string, self?:?string, external?:?string, column?:string}>
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public const HAS_MANY = [
|
||||||
|
'shelfs' => [
|
||||||
|
'mapper' => StockShelfMapper::class,
|
||||||
|
'table' => 'warehousemgmt_stockshelf',
|
||||||
|
'self' => 'warehousemgmt_stockshelf_location',
|
||||||
|
'external' => null,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Primary table.
|
* Primary table.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models
|
* @package Modules\WarehouseManagement\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
@ -80,6 +80,21 @@ final class StockMapper extends DataMapperFactory
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Has many relation.
|
||||||
|
*
|
||||||
|
* @var array<string, array{mapper:class-string, table:string, self?:?string, external?:?string, column?:string}>
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public const HAS_MANY = [
|
||||||
|
'locations' => [
|
||||||
|
'mapper' => StockLocationMapper::class,
|
||||||
|
'table' => 'warehousemgmt_stocklocation',
|
||||||
|
'self' => 'warehousemgmt_stocklocation_stock',
|
||||||
|
'external' => null,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Primary table.
|
* Primary table.
|
||||||
*
|
*
|
||||||
|
|
@ -125,7 +140,7 @@ final class StockMapper extends DataMapperFactory
|
||||||
/** @var \Modules\WarehouseManagement\Models\StockDistribution[] $temp */
|
/** @var \Modules\WarehouseManagement\Models\StockDistribution[] $temp */
|
||||||
$temp = StockDistributionMapper::getAll()
|
$temp = StockDistributionMapper::getAll()
|
||||||
->where('item', $items, 'IN')
|
->where('item', $items, 'IN')
|
||||||
->execute();
|
->executeGetArray();
|
||||||
|
|
||||||
foreach ($temp as $t) {
|
foreach ($temp as $t) {
|
||||||
if (!isset($dists[$t->item])) {
|
if (!isset($dists[$t->item])) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Warehousing\Models
|
* @package Modules\Warehousing\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models
|
* @package Modules\WarehouseManagement\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Warehousing\Models
|
* @package Modules\Warehousing\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models
|
* @package Modules\WarehouseManagement\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models
|
* @package Modules\WarehouseManagement\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models
|
* @package Modules\WarehouseManagement\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Warehousing\Models
|
* @package Modules\Warehousing\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models
|
* @package Modules\WarehouseManagement\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement\Models
|
* @package Modules\WarehouseManagement\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
@ -13,12 +13,12 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
return ['WarehouseManagement' => [
|
return ['WarehouseManagement' => [
|
||||||
'Language' => '',
|
'Locations' => 'Lagerplätze',
|
||||||
'Localization' => '',
|
'Name' => 'Name',
|
||||||
'Localizations' => '',
|
'Stock' => 'Lager',
|
||||||
'Locations' => '',
|
'Stocks' => 'Lager',
|
||||||
'Name' => 'Name',
|
'Shelfs' => 'Fächer',
|
||||||
'Stock' => 'Aktie',
|
'Shelf' => 'Fach',
|
||||||
'Stocks' => '',
|
'Type' => 'Typ',
|
||||||
'Type' => 'Typ',
|
'Location' => 'Lagerplatz',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
@ -13,12 +13,12 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
return ['WarehouseManagement' => [
|
return ['WarehouseManagement' => [
|
||||||
'Language' => '',
|
'Locations' => 'Locations',
|
||||||
'Localization' => '',
|
'Name' => 'Name',
|
||||||
'Localizations' => '',
|
'Stock' => 'Stock',
|
||||||
'Locations' => 'Locations',
|
'Stocks' => 'Stocks',
|
||||||
'Name' => 'Name',
|
'Shelfs' => 'Shelfs',
|
||||||
'Stock' => 'Stock',
|
'Shelf' => 'Shelf',
|
||||||
'Stocks' => 'Stocks',
|
'Type' => 'Type',
|
||||||
'Type' => 'Type',
|
'Location' => 'Location',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Localization
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement
|
* @package Modules\WarehouseManagement
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
@ -21,7 +21,11 @@ echo $this->data['nav']->render(); ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="portlet">
|
<div class="portlet">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Stocks'); ?><i class="g-icon download btn end-xs">download</i></div>
|
<div class="portlet-head">
|
||||||
|
<?= $this->getHtml('Stocks'); ?>
|
||||||
|
<i class="g-icon download btn end-xs">download</i>
|
||||||
|
<a class="button end-xs save" href="<?= UriFactory::build('{/base}/warehouse/stock/create'); ?>"><?= $this->getHtml('New', '0', '0'); ?></a>
|
||||||
|
</div>
|
||||||
<div class="slider">
|
<div class="slider">
|
||||||
<table id="stockList" class="default sticky">
|
<table id="stockList" class="default sticky">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
@ -31,7 +35,7 @@ echo $this->data['nav']->render(); ?>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php $count = 0; foreach ($stocks as $key => $value) :
|
<?php $count = 0; foreach ($stocks as $key => $value) :
|
||||||
++$count;
|
++$count;
|
||||||
$url = UriFactory::build('{/base}/warehouse/stock?{?}&id=' . $value->id);
|
$url = UriFactory::build('{/base}/warehouse/stock/view?{?}&id=' . $value->id);
|
||||||
?>
|
?>
|
||||||
<tr data-href="<?= $url; ?>">
|
<tr data-href="<?= $url; ?>">
|
||||||
<td><a href="<?= $url; ?>"><?= $value->id; ?></a>
|
<td><a href="<?= $url; ?>"><?= $value->id; ?></a>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement
|
* @package Modules\WarehouseManagement
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
@ -29,15 +29,17 @@ echo $this->data['nav']->render(); ?>
|
||||||
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
||||||
<td><?= $this->getHtml('Stock'); ?>
|
<td><?= $this->getHtml('Stock'); ?>
|
||||||
<td class="wf-100"><?= $this->getHtml('Name'); ?>
|
<td class="wf-100"><?= $this->getHtml('Name'); ?>
|
||||||
|
<td><?= $this->getHtml('Type'); ?>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php $count = 0; foreach ($locations as $key => $value) :
|
<?php $count = 0; foreach ($locations as $key => $value) :
|
||||||
++$count;
|
++$count;
|
||||||
$url = UriFactory::build('{/base}/warehouse/stock/location?{?}&id=' . $value->id);
|
$url = UriFactory::build('{/base}/warehouse/stock/location/view?{?}&id=' . $value->id);
|
||||||
?>
|
?>
|
||||||
<tr data-href="<?= $url; ?>">
|
<tr data-href="<?= $url; ?>">
|
||||||
<td><a href="<?= $url; ?>"><?= $value->id; ?></a>
|
<td><a href="<?= $url; ?>"><?= $value->id; ?></a>
|
||||||
<td><a href="<?= $url; ?>"><?= $value->stock->name; ?></a>
|
<td><a href="<?= $url; ?>"><?= $value->stock->name; ?></a>
|
||||||
<td><a href="<?= $url; ?>"><?= $value->name; ?></a>
|
<td><a href="<?= $url; ?>"><?= $value->name; ?></a>
|
||||||
|
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->type->getL11n()); ?></a>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php if ($count === 0) : ?>
|
<?php if ($count === 0) : ?>
|
||||||
<tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
<tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||||
|
|
|
||||||
153
Theme/Backend/stock-location-view.tpl.php
Normal file
153
Theme/Backend/stock-location-view.tpl.php
Normal file
|
|
@ -0,0 +1,153 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Jingga
|
||||||
|
*
|
||||||
|
* PHP Version 8.2
|
||||||
|
*
|
||||||
|
* @package Modules\Profile
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://jingga.app
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Modules\WarehouseManagement\Models\NullStockLocation;
|
||||||
|
use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
|
$location = $this->data['location'] ?? new NullStockLocation();
|
||||||
|
$isNew = $location->id === 0;
|
||||||
|
|
||||||
|
echo $this->data['nav']->render();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<section class="portlet">
|
||||||
|
<form id="locationForm" method="<?= $isNew ? 'PUT' : 'POST'; ?>" action="<?= UriFactory::build('{/api}warehouse/stock/location?csrf={$CSRF}'); ?>">
|
||||||
|
<div class="portlet-head"><?= $this->getHtml('Location'); ?></div>
|
||||||
|
<div class="portlet-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="iLocationId"><?= $this->getHtml('ID', '0', '0'); ?></label>
|
||||||
|
<input type="text" id="iLocationId" name="id" value="<?= $location->id; ?>" disabled>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="iLocationStock"><?= $this->getHtml('Stock'); ?></label>
|
||||||
|
<input type="text" id="iLocationStock" name="stock" value="<?= $location->stock->id; ?>"<?= $isNew ? ' required' : ' disabled'; ?>>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="iLocationName"><?= $this->getHtml('Name', '0', '0'); ?></label>
|
||||||
|
<input type="text" name="name" value="<?= $this->printHtml($location->name); ?>">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="iLocationType"><?= $this->getHtml('Type'); ?></label>
|
||||||
|
<select id="iLocationType" name="type">
|
||||||
|
<?php foreach ($this->data['types'] as $type) : ?>
|
||||||
|
<option value="<?= $type->id; ?>"<?= $type->id === $location->type?->id ? ' selected' : ''; ?>><?= $this->printHtml($type->getL11n()); ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-foot">
|
||||||
|
<?php if ($isNew) : ?>
|
||||||
|
<input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>" name="create-location">
|
||||||
|
<?php else : ?>
|
||||||
|
<input type="submit" value="<?= $this->getHtml('Save', '0', '0'); ?>" name="save-location">
|
||||||
|
<input class="cancel end-xs" type="submit" value="<?= $this->getHtml('Delete', '0', '0'); ?>" name="delete-location">
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if (!$isNew) : ?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<section class="portlet">
|
||||||
|
<form id="shelfForm" action="<?= UriFactory::build('{/api}warehouse/stock/location/shelf?csrf={$CSRF}'); ?>" method="post"
|
||||||
|
data-ui-container="#shelfTable tbody"
|
||||||
|
data-add-form="shelfForm"
|
||||||
|
data-add-tpl="#shelfTable tbody .oms-add-tpl-shelf">
|
||||||
|
<div class="portlet-head"><?= $this->getHtml('Shelf'); ?></div>
|
||||||
|
<div class="portlet-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="iShelfId"><?= $this->getHtml('ID', '0', '0'); ?></label>
|
||||||
|
<input type="text" id="iShelfId" name="id" data-tpl-text="/id" data-tpl-value="/id" disabled>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="iShelfName"><?= $this->getHtml('Name', '0', '0'); ?></label>
|
||||||
|
<input type="text" name="name" data-tpl-value="/name" value="">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="hidden" name="location" value="<?= $location->id; ?>">
|
||||||
|
</div>
|
||||||
|
<div class="portlet-foot">
|
||||||
|
<input id="bShelfAdd" formmethod="put" type="submit" class="add-form" value="<?= $this->getHtml('Add', '0', '0'); ?>">
|
||||||
|
<input id="bShelfSave" formmethod="post" type="submit" class="save-form vh button save" value="<?= $this->getHtml('Update', '0', '0'); ?>">
|
||||||
|
<input type="submit" class="cancel-form vh button close" value="<?= $this->getHtml('Cancel', '0', '0'); ?>">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<section class="portlet">
|
||||||
|
<div class="portlet-head"><?= $this->getHtml('Shelfs'); ?><i class="g-icon download btn end-xs">download</i></div>
|
||||||
|
<div class="slider">
|
||||||
|
<table id="shelfTable" class="default sticky"
|
||||||
|
data-tag="form"
|
||||||
|
data-ui-element="tr"
|
||||||
|
data-add-tpl=".oms-add-tpl-shelf"
|
||||||
|
data-update-form="shelfForm">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
||||||
|
<td class="wf-100"><?= $this->getHtml('Name', '0', '0'); ?>
|
||||||
|
<tbody>
|
||||||
|
<template class="oms-add-tpl-shelf">
|
||||||
|
<tr class="animated medium-duration greenCircleFade" data-id="" draggable="false">
|
||||||
|
<td>
|
||||||
|
<i class="g-icon btn update-form">settings</i>
|
||||||
|
<input id="shelfTable-remove-0" type="checkbox" class="vh">
|
||||||
|
<label for="shelfTable-remove-0" class="checked-visibility-alt"><i class="g-icon btn form-action">close</i></label>
|
||||||
|
<span class="checked-visibility">
|
||||||
|
<label for="shelfTable-remove-0" class="link default"><?= $this->getHtml('Cancel', '0', '0'); ?></label>
|
||||||
|
<label for="shelfTable-remove-0" class="remove-form link cancel"><?= $this->getHtml('Delete', '0', '0'); ?></label>
|
||||||
|
</span>
|
||||||
|
<td data-tpl-text="/id" data-tpl-value="/id"></td>
|
||||||
|
<td data-tpl-text="/name" data-tpl-value="/name"></td>
|
||||||
|
</tr>
|
||||||
|
</template>
|
||||||
|
<?php $c = 0;
|
||||||
|
foreach ($location->shelfs as $key => $value) :
|
||||||
|
++$c;
|
||||||
|
$url = UriFactory::build('{/base}/warehouse/stock/location/shelf/view?id=' . $value->id);
|
||||||
|
?>
|
||||||
|
<tr data-id="<?= $value->id; ?>">
|
||||||
|
<td>
|
||||||
|
<i class="g-icon btn update-form">settings</i>
|
||||||
|
<input id="shelfTable-remove-<?= $value->id; ?>" type="checkbox" class="vh">
|
||||||
|
<label for="shelfTable-remove-<?= $value->id; ?>" class="checked-visibility-alt"><i class="g-icon btn form-action">close</i></label>
|
||||||
|
<span class="checked-visibility">
|
||||||
|
<label for="shelfTable-remove-<?= $value->id; ?>" class="link default"><?= $this->getHtml('Cancel', '0', '0'); ?></label>
|
||||||
|
<label for="shelfTable-remove-<?= $value->id; ?>" class="remove-form link cancel"><?= $this->getHtml('Delete', '0', '0'); ?></label>
|
||||||
|
</span>
|
||||||
|
<td data-tpl-text="/id" data-tpl-value="/id"><?= $value->id; ?>
|
||||||
|
<td data-tpl-text="/name" data-tpl-value="/name"><a class="content" href="<?= $url; ?>"><?= $value->name; ?></a>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php if ($c === 0) : ?>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Jingga
|
|
||||||
*
|
|
||||||
* PHP Version 8.1
|
|
||||||
*
|
|
||||||
* @package Modules\Profile
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 2.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link https://jingga.app
|
|
||||||
*/
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
$location = $this->data['location'];
|
|
||||||
|
|
||||||
echo $this->data['nav']->render();
|
|
||||||
?>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12">
|
|
||||||
<section class="portlet">
|
|
||||||
<div class="portlet-head"><?= $this->printHtml($location->name); ?></div>
|
|
||||||
<div class="portlet-body"></div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\WarehouseManagement
|
* @package Modules\WarehouseManagement
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
@ -21,7 +21,11 @@ echo $this->data['nav']->render(); ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="portlet">
|
<div class="portlet">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Stocks'); ?><i class="g-icon download btn end-xs">download</i></div>
|
<div class="portlet-head">
|
||||||
|
<?= $this->getHtml('Stocks'); ?>
|
||||||
|
<i class="g-icon download btn end-xs">download</i>
|
||||||
|
<a class="button end-xs save" href="<?= UriFactory::build('{/base}/warehouse/stock/type/create'); ?>"><?= $this->getHtml('New', '0', '0'); ?></a>
|
||||||
|
</div>
|
||||||
<div class="slider">
|
<div class="slider">
|
||||||
<table id="stockList" class="default sticky">
|
<table id="stockList" class="default sticky">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
@ -31,7 +35,7 @@ echo $this->data['nav']->render(); ?>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php $count = 0; foreach ($types as $key => $value) :
|
<?php $count = 0; foreach ($types as $key => $value) :
|
||||||
++$count;
|
++$count;
|
||||||
$url = UriFactory::build('{/base}/warehouse/stock/type?id=' . $value->id);
|
$url = UriFactory::build('{/base}/warehouse/stock/type/view?id=' . $value->id);
|
||||||
?>
|
?>
|
||||||
<tr data-href="<?= $url; ?>">
|
<tr data-href="<?= $url; ?>">
|
||||||
<td><a href="<?= $url; ?>"><?= $value->id; ?></a>
|
<td><a href="<?= $url; ?>"><?= $value->id; ?></a>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Jingga
|
* Jingga
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.2
|
||||||
*
|
*
|
||||||
* @package Modules\Profile
|
* @package Modules\Profile
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
|
|
@ -12,82 +12,50 @@
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
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();
|
echo $this->data['nav']->render();
|
||||||
?>
|
?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12 col-md-6">
|
||||||
<section class="portlet">
|
<section class="portlet">
|
||||||
|
<form id="typeForm" method="<?= $isNew ? 'PUT' : 'POST'; ?>" action="<?= UriFactory::build('{/api}warehouse/stock/type?csrf={$CSRF}'); ?>">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Type'); ?></div>
|
<div class="portlet-head"><?= $this->getHtml('Type'); ?></div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="iTypeId"><?= $this->getHtml('ID', '0', '0'); ?></label>
|
||||||
|
<input type="text" id="iTypeId" name="id" value="<?= $type->id; ?>" disabled>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="name"><?= $this->getHtml('Name'); ?></label>
|
<label for="name"><?= $this->getHtml('Name'); ?></label>
|
||||||
<input id="name" name="name" value="<?= $this->printHtml($type->name); ?>" disabled>
|
<input id="name" type="text" name="name" value="<?= $this->printHtml($type->name); ?>"<?= $isNew ? ' required' : ' disabled'; ?>>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
<div class="portlet-foot">
|
||||||
</div>
|
<?php if ($isNew) : ?>
|
||||||
|
<input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>" name="create-location">
|
||||||
<div class="col-xs-12 col-md-6">
|
<?php else : ?>
|
||||||
<section class="portlet">
|
<input type="submit" value="<?= $this->getHtml('Save', '0', '0'); ?>" name="save-location">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Localizations'); ?><i class="g-icon download btn end-xs">download</i></div>
|
<input class="cancel end-xs" type="submit" value="<?= $this->getHtml('Delete', '0', '0'); ?>" name="delete-location">
|
||||||
<div class="slider">
|
<?php endif; ?>
|
||||||
<table id="localizationTable" class="default sticky fixed-5"
|
|
||||||
data-tag="form"
|
|
||||||
data-ui-element="tr"
|
|
||||||
data-add-tpl=".oms-add-tpl-localization"
|
|
||||||
data-update-form="localizationForm">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
|
||||||
<td><?= $this->getHtml('Name'); ?><i class="sort-asc g-icon">expand_less</i><i class="sort-desc g-icon">expand_more</i>
|
|
||||||
<td><?= $this->getHtml('Language'); ?><i class="sort-asc g-icon">expand_less</i><i class="sort-desc g-icon">expand_more</i>
|
|
||||||
<td class="wf-100"><?= $this->getHtml('Localization'); ?><i class="sort-asc g-icon">expand_less</i><i class="sort-desc g-icon">expand_more</i>
|
|
||||||
<tbody>
|
|
||||||
<template class="oms-add-tpl-attribute">
|
|
||||||
<tr data-id="" draggable="false">
|
|
||||||
<td>
|
|
||||||
<i class="g-icon btn update-form">settings</i>
|
|
||||||
<input id="attributeTable-remove-0" type="checkbox" class="vh">
|
|
||||||
<label for="attributeTable-remove-0" class="checked-visibility-alt"><i class="g-icon btn form-action">close</i></label>
|
|
||||||
<span class="checked-visibility">
|
|
||||||
<label for="attributeTable-remove-0" class="link default"><?= $this->getHtml('Cancel', '0', '0'); ?></label>
|
|
||||||
<label for="attributeTable-remove-0" class="remove-form link cancel"><?= $this->getHtml('Delete', '0', '0'); ?></label>
|
|
||||||
</span>
|
|
||||||
<td data-tpl-text="/id" data-tpl-value="/id"></td>
|
|
||||||
<td data-tpl-text="/type" data-tpl-value="/type" data-value=""></td>
|
|
||||||
<td data-tpl-text="/language" data-tpl-value="/language"></td>
|
|
||||||
<td data-tpl-text="/l11n" data-tpl-value="/l11n"></td>
|
|
||||||
</tr>
|
|
||||||
</template>
|
|
||||||
<?php
|
|
||||||
$c = 0;
|
|
||||||
$itemL11n = $this->data['l11nValues'];
|
|
||||||
foreach ($itemL11n as $value) : ++$c; ?>
|
|
||||||
<tr data-id="<?= $value->id; ?>">
|
|
||||||
<td>
|
|
||||||
<i class="g-icon btn update-form">settings</i>
|
|
||||||
<?php if (!$value->type->isRequired) : ?>
|
|
||||||
<input id="localizationTable-remove-<?= $value->id; ?>" type="checkbox" class="vh">
|
|
||||||
<label for="localizationTable-remove-<?= $value->id; ?>" class="checked-visibility-alt"><i class="g-icon btn form-action">close</i></label>
|
|
||||||
<span class="checked-visibility">
|
|
||||||
<label for="localizationTable-remove-<?= $value->id; ?>" class="link default"><?= $this->getHtml('Cancel', '0', '0'); ?></label>
|
|
||||||
<label for="localizationTable-remove-<?= $value->id; ?>" class="remove-form link cancel"><?= $this->getHtml('Delete', '0', '0'); ?></label>
|
|
||||||
</span>
|
|
||||||
<?php endif; ?>
|
|
||||||
<td data-tpl-text="/id" data-tpl-value="/id"><?= $value->id; ?>
|
|
||||||
<td data-tpl-text="/type" data-tpl-value="/type" data-value="<?= $value->type->id; ?>"><?= $this->printHtml($value->type->title); ?>
|
|
||||||
<td data-tpl-text="/language" data-tpl-value="/language"><?= $this->printHtml($value->language); ?>
|
|
||||||
<td data-tpl-text="/l11n" data-tpl-value="/l11n" data-value="<?= \nl2br($this->printHtml($value->content)); ?>"><?= \nl2br($this->printHtml(\substr($value->content, 0, 100))); ?>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<?php if ($c === 0) : ?>
|
|
||||||
<tr>
|
|
||||||
<td colspan="5" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php if (!$isNew) : ?>
|
||||||
|
<div class="row">
|
||||||
|
<?= $this->data['l11nView']->render(
|
||||||
|
$this->data['l11nValues'],
|
||||||
|
[],
|
||||||
|
'{/api}warehouse/stock/type/l11n?csrf={$CSRF}'
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user