mirror of
https://github.com/Karaka-Management/oms-WarehouseManagement.git
synced 2026-01-11 15:18:41 +00:00
update
This commit is contained in:
parent
cb4c5b66dc
commit
e4864db46c
|
|
@ -11,23 +11,30 @@
|
|||
},
|
||||
"warehousemgmt_item_item": {
|
||||
"name": "warehousemgmt_item_item",
|
||||
"type": "VARCHAR(255)",
|
||||
"type": "INT",
|
||||
"null": false,
|
||||
"foreignTable": "itemmgmt_item",
|
||||
"foreignKey": "itemmgmt_item_id"
|
||||
},
|
||||
"warehousemgmt_item_hassn": {
|
||||
"name": "warehousemgmt_item_hassn",
|
||||
"type": "TINYINT(1)",
|
||||
"null": false
|
||||
},
|
||||
"warehousemgmt_item_track_type": {
|
||||
"name": "warehousemgmt_item_track_type",
|
||||
"type": "TINYINT",
|
||||
"warehousemgmt_item_haslot": {
|
||||
"name": "warehousemgmt_item_haslot",
|
||||
"type": "TINYINT(1)",
|
||||
"null": false
|
||||
},
|
||||
"warehousemgmt_item_hasstock": {
|
||||
"name": "warehousemgmt_item_hasstock",
|
||||
"type": "TINYINT(1)",
|
||||
"null": false
|
||||
},
|
||||
"warehousemgmt_item_negative": {
|
||||
"name": "warehousemgmt_item_negative",
|
||||
"type": "TINYINT",
|
||||
"null": false
|
||||
},
|
||||
"warehousemgmt_item_": {
|
||||
"name": "warehousemgmt_item_",
|
||||
"type": "TINYINT",
|
||||
"null": false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -46,10 +53,35 @@
|
|||
"type": "VARCHAR(255)",
|
||||
"null": false
|
||||
},
|
||||
"warehousemgmt_stock_type": {
|
||||
"description": "???",
|
||||
"name": "warehousemgmt_stock_type",
|
||||
"type": "TINYINT",
|
||||
"warehousemgmt_stock_unit": {
|
||||
"name": "warehousemgmt_stock_unit",
|
||||
"type": "INT",
|
||||
"null": false,
|
||||
"foreignTable": "itemmgmt_item",
|
||||
"foreignKey": "itemmgmt_item_id"
|
||||
},
|
||||
"warehousemgmt_stock_address": {
|
||||
"name": "warehousemgmt_stock_address",
|
||||
"type": "INT",
|
||||
"null": false,
|
||||
"foreignTable": "address",
|
||||
"foreignKey": "address_id"
|
||||
}
|
||||
}
|
||||
},
|
||||
"warehousemgmt_stock_type": {
|
||||
"name": "warehousemgmt_stock_type",
|
||||
"fields": {
|
||||
"warehousemgmt_stock_type_id": {
|
||||
"name": "warehousemgmt_stock_type_id",
|
||||
"type": "INT",
|
||||
"null": false,
|
||||
"primary": true,
|
||||
"autoincrement": true
|
||||
},
|
||||
"warehousemgmt_stock_type_name": {
|
||||
"name": "warehousemgmt_stock_type_name",
|
||||
"type": "VARCHAR(255)",
|
||||
"null": false
|
||||
}
|
||||
}
|
||||
|
|
@ -76,6 +108,14 @@
|
|||
"foreignTable": "warehousemgmt_stock",
|
||||
"foreignKey": "warehousemgmt_stock_id"
|
||||
},
|
||||
"warehousemgmt_stocklocation_type": {
|
||||
"name": "warehousemgmt_stocklocation_type",
|
||||
"type": "INT",
|
||||
"null": true,
|
||||
"default": "null",
|
||||
"foreignTable": "warehousemgmt_stock_type",
|
||||
"foreignKey": "warehousemgmt_stock_type_id"
|
||||
},
|
||||
"warehousemgmt_stocklocation_x": {
|
||||
"name": "warehousemgmt_stocklocation_x",
|
||||
"type": "INT",
|
||||
|
|
@ -116,6 +156,14 @@
|
|||
"foreignTable": "warehousemgmt_stocklocation",
|
||||
"foreignKey": "warehousemgmt_stocklocation_id"
|
||||
},
|
||||
"warehousemgmt_stockshelf_type": {
|
||||
"name": "warehousemgmt_stockshelf_type",
|
||||
"type": "INT",
|
||||
"null": true,
|
||||
"default": "null",
|
||||
"foreignTable": "warehousemgmt_stock_type",
|
||||
"foreignKey": "warehousemgmt_stock_type_id"
|
||||
},
|
||||
"warehousemgmt_stockshelf_x": {
|
||||
"name": "warehousemgmt_stockshelf_x",
|
||||
"type": "INT",
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\WarehouseManagement\Models;
|
||||
|
||||
use Modules\Admin\Models\Address;
|
||||
|
||||
/**
|
||||
* Warehouse class.
|
||||
*
|
||||
|
|
@ -40,7 +42,9 @@ class Stock
|
|||
*/
|
||||
public string $name = '';
|
||||
|
||||
public int $type = 0;
|
||||
public int $unit = 0;
|
||||
|
||||
public Address $address;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
|
|
|||
64
Models/StockEvaluation.php
Normal file
64
Models/StockEvaluation.php
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
/**
|
||||
* Jingga
|
||||
*
|
||||
* PHP Version 8.1
|
||||
*
|
||||
* @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;
|
||||
|
||||
use phpOMS\Stdlib\Base\Enum;
|
||||
|
||||
/**
|
||||
* Stock evaluation type enum.
|
||||
*
|
||||
* @package Modules\WarehouseManagement\Models
|
||||
* @license OMS License 2.0
|
||||
* @link https://jingga.app
|
||||
* @since 1.0.0
|
||||
*/
|
||||
abstract class StockEvaluation extends Enum
|
||||
{
|
||||
// ifrs, hgb, ...
|
||||
public int $type = 0;
|
||||
|
||||
// lifo, fifo, ...
|
||||
public int $method = StockEValuationMethod::SPECIFIC_IDENTIFICATION;
|
||||
|
||||
public int $altmethod = StockEvaluationMethod::WEIGHTED_AVERAGE;
|
||||
|
||||
// script to run for evaluation
|
||||
public int $script = 0;
|
||||
|
||||
public int $evaluationcategory = 0;
|
||||
|
||||
public int $itemsegment = 0;
|
||||
|
||||
public int $itemgroup = 0;
|
||||
|
||||
public int $itemtype = 0;
|
||||
|
||||
public int $itemsection = 0;
|
||||
|
||||
public int $item = 0;
|
||||
|
||||
// days, month
|
||||
public int $intervalType = 0;
|
||||
|
||||
// range, last sold, ...
|
||||
public int $limitLow = 0;
|
||||
|
||||
// range, last sold, ...
|
||||
public int $limitHigh = 0;
|
||||
|
||||
public int $value = 0;
|
||||
|
||||
public float $evaluation = 0.0;
|
||||
}
|
||||
42
Models/StockEvaluationMethod.php
Normal file
42
Models/StockEvaluationMethod.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
/**
|
||||
* Jingga
|
||||
*
|
||||
* PHP Version 8.1
|
||||
*
|
||||
* @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;
|
||||
|
||||
use phpOMS\Stdlib\Base\Enum;
|
||||
|
||||
/**
|
||||
* Stock evaluation type enum.
|
||||
*
|
||||
* @package Modules\WarehouseManagement\Models
|
||||
* @license OMS License 2.0
|
||||
* @link https://jingga.app
|
||||
* @since 1.0.0
|
||||
*/
|
||||
abstract class StockEvaluationMethod extends Enum
|
||||
{
|
||||
public const LIFO = 1;
|
||||
|
||||
public const FIFO = 2;
|
||||
|
||||
public const WEIGHTED_AVERAGE = 3;
|
||||
|
||||
public const SPECIFIC_IDENTIFICATION = 4;
|
||||
|
||||
public const STANDARD_COST = 5;
|
||||
|
||||
public const REPLACEMENT = 6;
|
||||
|
||||
public const MANUAL = 9;
|
||||
}
|
||||
30
Models/StockEvaluationType.php
Normal file
30
Models/StockEvaluationType.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
/**
|
||||
* Jingga
|
||||
*
|
||||
* PHP Version 8.1
|
||||
*
|
||||
* @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;
|
||||
|
||||
use phpOMS\Stdlib\Base\Enum;
|
||||
|
||||
/**
|
||||
* Stock evaluation type enum.
|
||||
*
|
||||
* @package Modules\WarehouseManagement\Models
|
||||
* @license OMS License 2.0
|
||||
* @link https://jingga.app
|
||||
* @since 1.0.0
|
||||
*/
|
||||
abstract class StockEvaluationType extends Enum
|
||||
{
|
||||
// IFRS, HGB, ...
|
||||
}
|
||||
|
|
@ -36,6 +36,8 @@ class StockLocation
|
|||
|
||||
public int | Stock $stock = 0;
|
||||
|
||||
public ?int $type = null;
|
||||
|
||||
public int $x = 0;
|
||||
|
||||
public int $y = 0;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\WarehouseManagement\Models;
|
||||
|
||||
use Modules\Admin\Models\AddressMapper;
|
||||
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
||||
|
||||
/**
|
||||
|
|
@ -38,7 +39,21 @@ final class StockMapper extends DataMapperFactory
|
|||
public const COLUMNS = [
|
||||
'warehousemgmt_stock_id' => ['name' => 'warehousemgmt_stock_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'warehousemgmt_stock_name' => ['name' => 'warehousemgmt_stock_name', 'type' => 'string', 'internal' => 'name'],
|
||||
'warehousemgmt_stock_type' => ['name' => 'warehousemgmt_stock_type', 'type' => 'int', 'internal' => 'type'],
|
||||
'warehousemgmt_stock_unit' => ['name' => 'warehousemgmt_stock_unit', 'type' => 'int', 'internal' => 'unit'],
|
||||
'warehousemgmt_stock_address' => ['name' => 'warehousemgmt_stock_address', 'type' => 'int', 'internal' => 'address'],
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 = [
|
||||
'address' => [
|
||||
'mapper' => AddressMapper::class,
|
||||
'external' => 'warehousemgmt_stock_address',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ class StockShelf
|
|||
|
||||
public int | StockLocation $location = 0;
|
||||
|
||||
public ?int $type = null;
|
||||
|
||||
public int $x = 0;
|
||||
|
||||
public int $y = 0;
|
||||
|
|
|
|||
44
Models/StockType.php
Normal file
44
Models/StockType.php
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
/**
|
||||
* Jingga
|
||||
*
|
||||
* PHP Version 8.1
|
||||
*
|
||||
* @package Modules\Warehousing\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;
|
||||
|
||||
use Modules\Admin\Models\Address;
|
||||
|
||||
/**
|
||||
* Warehouse class.
|
||||
*
|
||||
* @package Modules\Warehousing\Models
|
||||
* @license OMS License 2.0
|
||||
* @link https://jingga.app
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class StockType
|
||||
{
|
||||
/**
|
||||
* ID.
|
||||
*
|
||||
* @var int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public int $id = 0;
|
||||
|
||||
/**
|
||||
* NAme.
|
||||
*
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public string $name = '';
|
||||
}
|
||||
59
Models/StockTypeMapper.php
Normal file
59
Models/StockTypeMapper.php
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
/**
|
||||
* Jingga
|
||||
*
|
||||
* PHP Version 8.1
|
||||
*
|
||||
* @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;
|
||||
|
||||
use Modules\Admin\Models\AddressMapper;
|
||||
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
||||
|
||||
/**
|
||||
* WarehouseManagement mapper class.
|
||||
*
|
||||
* @package Modules\WarehouseManagement\Models
|
||||
* @license OMS License 2.0
|
||||
* @link https://jingga.app
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @template T of Stock
|
||||
* @extends DataMapperFactory<T>
|
||||
*/
|
||||
final class StockMapper extends DataMapperFactory
|
||||
{
|
||||
/**
|
||||
* Columns.
|
||||
*
|
||||
* @var array<string, array{name:string, type:string, internal:string, autocomplete?:bool, readonly?:bool, writeonly?:bool, annotations?:array}>
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const COLUMNS = [
|
||||
'warehousemgmt_stock_type_id' => ['name' => 'warehousemgmt_stock_type_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'warehousemgmt_stock_type_name' => ['name' => 'warehousemgmt_stock_type_name', 'type' => 'string', 'internal' => 'name'],
|
||||
];
|
||||
|
||||
/**
|
||||
* Primary table.
|
||||
*
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const TABLE = 'warehousemgmt_stock_type';
|
||||
|
||||
/**
|
||||
* Primary field name.
|
||||
*
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const PRIMARYFIELD = 'warehousemgmt_stock_type_id';
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user