bug and media fixes

This commit is contained in:
Dennis Eichhorn 2021-10-29 14:49:55 +02:00
parent 35a625bd74
commit 02cf464565
9 changed files with 40 additions and 33 deletions

View File

@ -14,15 +14,14 @@ declare(strict_types=1);
namespace Modules\WarehouseManagement\Admin;
use phpOMS\Config\SettingsInterface;
use phpOMS\DataStorage\Database\DatabasePool;
use phpOMS\Localization\ISO639x1Enum;
use phpOMS\Module\InstallerAbstract;
use phpOMS\Module\ModuleInfo;
use Modules\WarehouseManagement\Models\Stock;
use Modules\WarehouseManagement\Models\StockMapper;
use Modules\WarehouseManagement\Models\StockLocation;
use Modules\WarehouseManagement\Models\StockLocationMapper;
use Modules\WarehouseManagement\Models\StockMapper;
use phpOMS\Config\SettingsInterface;
use phpOMS\DataStorage\Database\DatabasePool;
use phpOMS\Module\InstallerAbstract;
use phpOMS\Module\ModuleInfo;
/**
* Installer class.

View File

@ -14,11 +14,10 @@ declare(strict_types=1);
namespace Modules\WarehouseManagement\Controller;
use Modules\Admin\Models\NullAccount;
use Modules\WarehouseManagement\Models\Stock;
use Modules\WarehouseManagement\Models\StockMapper;
use Modules\WarehouseManagement\Models\StockLocation;
use Modules\WarehouseManagement\Models\StockLocationMapper;
use Modules\WarehouseManagement\Models\StockMapper;
use Modules\WarehouseManagement\Models\StockShelf;
use Modules\WarehouseManagement\Models\StockShelfMapper;

View File

@ -14,8 +14,8 @@ declare(strict_types=1);
namespace Modules\WarehouseManagement\Controller;
use Modules\WarehouseManagement\Models\StockMapper;
use Modules\WarehouseManagement\Models\StockLocationMapper;
use Modules\WarehouseManagement\Models\StockMapper;
use phpOMS\Contract\RenderableInterface;
use phpOMS\Message\RequestAbstract;
use phpOMS\Message\ResponseAbstract;
@ -92,7 +92,6 @@ final class BackendController extends Controller
$view->setData('stock', StockMapper::get((int) $request->getData('id')));
return $view;
}
@ -156,7 +155,6 @@ final class BackendController extends Controller
$view->setData('location', StockLocationMapper::get((int) $request->getData('id')));
return $view;
}
}

View File

@ -33,12 +33,12 @@ final class StockLocationMapper extends DataMapperAbstract
* @since 1.0.0
*/
protected static array $columns = [
'warehousemgmt_stocklocation_id' => ['name' => 'warehousemgmt_stocklocation_id', 'type' => 'int', 'internal' => 'id'],
'warehousemgmt_stocklocation_name' => ['name' => 'warehousemgmt_stocklocation_name', 'type' => 'string', 'internal' => 'name'],
'warehousemgmt_stocklocation_id' => ['name' => 'warehousemgmt_stocklocation_id', 'type' => 'int', 'internal' => 'id'],
'warehousemgmt_stocklocation_name' => ['name' => 'warehousemgmt_stocklocation_name', 'type' => 'string', 'internal' => 'name'],
'warehousemgmt_stocklocation_stock' => ['name' => 'warehousemgmt_stocklocation_stock', 'type' => 'int', 'internal' => 'stock'],
'warehousemgmt_stocklocation_x' => ['name' => 'warehousemgmt_stocklocation_x', 'type' => 'int', 'internal' => 'x'],
'warehousemgmt_stocklocation_y' => ['name' => 'warehousemgmt_stocklocation_y', 'type' => 'int', 'internal' => 'y'],
'warehousemgmt_stocklocation_z' => ['name' => 'warehousemgmt_stocklocation_z', 'type' => 'int', 'internal' => 'z'],
'warehousemgmt_stocklocation_x' => ['name' => 'warehousemgmt_stocklocation_x', 'type' => 'int', 'internal' => 'x'],
'warehousemgmt_stocklocation_y' => ['name' => 'warehousemgmt_stocklocation_y', 'type' => 'int', 'internal' => 'y'],
'warehousemgmt_stocklocation_z' => ['name' => 'warehousemgmt_stocklocation_z', 'type' => 'int', 'internal' => 'z'],
];
/**

View File

@ -34,7 +34,7 @@ final class StockMapper extends DataMapperAbstract
*/
protected static array $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_name' => ['name' => 'warehousemgmt_stock_name', 'type' => 'string', 'internal' => 'name'],
'warehousemgmt_stock_type' => ['name' => 'warehousemgmt_stock_type', 'type' => 'int', 'internal' => 'type'],
];

View File

@ -27,20 +27,31 @@ use phpOMS\Stdlib\Base\Enum;
abstract class StockMovementType extends Enum
{
public const MERGE = 1;
public const SPLIT = 2;
public const INCREASE = 4;
public const DECREASE = 8;
public const TRANSFER = 16;
public const SPLIT = 2;
public const INCREASE = 4;
public const DECREASE = 8;
public const TRANSFER = 16;
// @todo: subtypes, maybe creates as database subtypes during install.
public const DESTROY = 1; // 8
public const RETURN = 1; // 8
public const INVENTORY_PLUS = 1; // 4
public const INVENTORY_MINUS = 1; // 8
public const PURCHASE = 1; // 4
public const SALE = 1; // 4
public const MANUFACTURE_CREATE = 1; // 4
public const MANUFACTURE_USE = 1; // 8
public const MANUAL = 1; // 1-16
}

View File

@ -33,12 +33,12 @@ final class StockShelfMapper extends DataMapperAbstract
* @since 1.0.0
*/
protected static array $columns = [
'warehousemgmt_stockshelf_id' => ['name' => 'warehousemgmt_stockshelf_id', 'type' => 'int', 'internal' => 'id'],
'warehousemgmt_stockshelf_name' => ['name' => 'warehousemgmt_stockshelf_name', 'type' => 'string', 'internal' => 'name'],
'warehousemgmt_stockshelf_id' => ['name' => 'warehousemgmt_stockshelf_id', 'type' => 'int', 'internal' => 'id'],
'warehousemgmt_stockshelf_name' => ['name' => 'warehousemgmt_stockshelf_name', 'type' => 'string', 'internal' => 'name'],
'warehousemgmt_stockshelf_location' => ['name' => 'warehousemgmt_stockshelf_location', 'type' => 'int', 'internal' => 'location'],
'warehousemgmt_stockshelf_x' => ['name' => 'warehousemgmt_stockshelf_x', 'type' => 'int', 'internal' => 'x'],
'warehousemgmt_stockshelf_y' => ['name' => 'warehousemgmt_stockshelf_y', 'type' => 'int', 'internal' => 'y'],
'warehousemgmt_stockshelf_z' => ['name' => 'warehousemgmt_stockshelf_z', 'type' => 'int', 'internal' => 'z'],
'warehousemgmt_stockshelf_x' => ['name' => 'warehousemgmt_stockshelf_x', 'type' => 'int', 'internal' => 'x'],
'warehousemgmt_stockshelf_y' => ['name' => 'warehousemgmt_stockshelf_y', 'type' => 'int', 'internal' => 'y'],
'warehousemgmt_stockshelf_z' => ['name' => 'warehousemgmt_stockshelf_z', 'type' => 'int', 'internal' => 'z'],
];
/**

View File

@ -13,11 +13,11 @@
declare(strict_types=1);
return ['Navigation' => [
'Arrival' => 'Arrival',
'Articles' => 'Articles',
'Locations' => 'Locations',
'Shipping' => 'Shipping',
'Stock' => 'Stock',
'Arrival' => 'Arrival',
'Articles' => 'Articles',
'Locations' => 'Locations',
'Shipping' => 'Shipping',
'Stock' => 'Stock',
'Stocks' => 'Stocks',
'Warehousing' => 'Warehousing',
'Warehousing' => 'Warehousing',
]];

View File

@ -392,4 +392,4 @@ function phpServe() : void
});
}
phpServe();
\phpServe();