mirror of
https://github.com/Karaka-Management/oms-WarehouseManagement.git
synced 2026-01-11 15:18:41 +00:00
Init
This commit is contained in:
commit
a0fa6300ad
38
Admin/Install/Navigation.php
Normal file
38
Admin/Install/Navigation.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace Modules\WarehouseManagement\Admin\Install;
|
||||
|
||||
/**
|
||||
* Navigation class.
|
||||
*
|
||||
* @category Modules
|
||||
* @package Modules\Admin
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @license OMS License 1.0
|
||||
* @link http://orange-management.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Navigation
|
||||
{
|
||||
public static function install($dbPool)
|
||||
{
|
||||
$navData = json_decode(file_get_contents(__DIR__ . '/nav.install.json'), true);
|
||||
|
||||
$class = '\\Modules\\Navigation\\Admin\\Installer';
|
||||
$class::installExternal($dbPool, $navData);
|
||||
}
|
||||
}
|
||||
66
Admin/Install/nav.install.json
Normal file
66
Admin/Install/nav.install.json
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
[
|
||||
{
|
||||
"id": 1001301001,
|
||||
"pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd",
|
||||
"type": 2,
|
||||
"subtype": 0,
|
||||
"name": "Warehousing",
|
||||
"uri": null,
|
||||
"target": "self",
|
||||
"icon": "fa fa-cube",
|
||||
"order": 40,
|
||||
"from": 1001300000,
|
||||
"permission": null,
|
||||
"parent": 0,
|
||||
"children": [
|
||||
{
|
||||
"id": 1001302001,
|
||||
"pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd",
|
||||
"type": 2,
|
||||
"subtype": 1,
|
||||
"name": "Stock",
|
||||
"uri": "/{/lang}/backend/warehousing/stock/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 5,
|
||||
"from": 1001300000,
|
||||
"permission": null,
|
||||
"parent": 1001301001,
|
||||
"children": [
|
||||
{
|
||||
"id": 1001302101,
|
||||
"pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd",
|
||||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "List",
|
||||
"uri": "/{/lang}/backend/warehousing/stock/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 5,
|
||||
"from": 1001300000,
|
||||
"permission": null,
|
||||
"parent": 1001302001,
|
||||
"children": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1001302201,
|
||||
"pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd",
|
||||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "Create",
|
||||
"uri": "/{/lang}/backend/warehousing/stock/create",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 10,
|
||||
"from": 1001300000,
|
||||
"permission": null,
|
||||
"parent": 1001302001,
|
||||
"children": [
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
238
Admin/Installer.php
Normal file
238
Admin/Installer.php
Normal file
|
|
@ -0,0 +1,238 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace Modules\WarehouseManagement\Admin;
|
||||
|
||||
use phpOMS\DataStorage\Database\DatabaseType;
|
||||
use phpOMS\DataStorage\Database\Pool;
|
||||
use phpOMS\Module\InstallerAbstract;
|
||||
|
||||
/**
|
||||
* Navigation class.
|
||||
*
|
||||
* @category Modules
|
||||
* @package Framework
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @license OMS License 1.0
|
||||
* @link http://orange-management.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Installer extends InstallerAbstract
|
||||
{
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function install(Pool $dbPool, array $info)
|
||||
{
|
||||
parent::install($dbPool, $info);
|
||||
|
||||
switch ($dbPool->get('core')->getType()) {
|
||||
case DatabaseType::MYSQL:
|
||||
$dbPool->get('core')->con->prepare(
|
||||
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'warehousing_stock` (
|
||||
`WarehousingStockID` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(50) DEFAULT NULL,
|
||||
PRIMARY KEY (`WarehousingStockID`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
||||
)->execute();
|
||||
|
||||
$dbPool->get('core')->con->prepare(
|
||||
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'warehousing_stock_location` (
|
||||
`WarehousingStockLocationID` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(50) DEFAULT NULL,
|
||||
`stock` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`WarehousingStockLocationID`),
|
||||
KEY `stock` (`stock`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
||||
)->execute();
|
||||
|
||||
$dbPool->get('core')->con->prepare(
|
||||
'ALTER TABLE `' . $dbPool->get('core')->prefix . 'warehousing_stock_location`
|
||||
ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'warehousing_stock_location_ibfk_1` FOREIGN KEY (`stock`) REFERENCES `' . $dbPool->get('core')->prefix . 'warehousing_stock` (`WarehousingStockID`);'
|
||||
)->execute();
|
||||
|
||||
// TODO: complete
|
||||
$dbPool->get('core')->con->prepare(
|
||||
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'warehousing_article` (
|
||||
`WarehousingArticleID` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`weight` int(11) DEFAULT NULL,
|
||||
`dimension` varchar(17) DEFAULT NULL,
|
||||
`volume` int(11) DEFAULT NULL,
|
||||
`lot` tinyint(1) DEFAULT NULL,
|
||||
`status` tinyint(2) DEFAULT NULL,
|
||||
PRIMARY KEY (`WarehousingArticleID`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
||||
)->execute();
|
||||
|
||||
$dbPool->get('core')->con->prepare(
|
||||
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'warehousing_article_disposal` (
|
||||
`WarehousingArticleID` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`glas` int(11) DEFAULT NULL,
|
||||
`paper` int(11) DEFAULT NULL,
|
||||
`sheet` int(11) DEFAULT NULL,
|
||||
`aluminium` int(11) DEFAULT NULL,
|
||||
`synthetic` int(11) DEFAULT NULL,
|
||||
`cardboard` int(11) DEFAULT NULL,
|
||||
`composites` int(11) DEFAULT NULL,
|
||||
`organic` int(11) DEFAULT NULL,
|
||||
`pe` int(11) DEFAULT NULL,
|
||||
`misc` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`WarehousingArticleID`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
||||
)->execute();
|
||||
|
||||
// WE kann von client oder supplier kommen, deswegen type
|
||||
$dbPool->get('core')->con->prepare(
|
||||
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'warehousing_arrival` (
|
||||
`WarehousingArrivalID` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`arrivaldate` datetime DEFAULT NULL,
|
||||
`from` int(11) DEFAULT NULL,
|
||||
`type` tinyint(1) DEFAULT NULL,
|
||||
`media` int(11) DEFAULT NULL,
|
||||
`pcondition` tinyint(1) DEFAULT NULL,
|
||||
`acondition` tinyint(1) DEFAULT NULL,
|
||||
`amount` tinyint(1) DEFAULT NULL,
|
||||
`checked` int(11) DEFAULT NULL,
|
||||
`dnote` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`WarehousingArrivalID`),
|
||||
KEY `checked` (`checked`),
|
||||
KEY `dnote` (`dnote`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
||||
)->execute();
|
||||
|
||||
$dbPool->get('core')->con->prepare(
|
||||
'ALTER TABLE `' . $dbPool->get('core')->prefix . 'warehousing_arrival`
|
||||
ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'warehousing_arrival_ibfk_1` FOREIGN KEY (`checked`) REFERENCES `' . $dbPool->get('core')->prefix . 'account` (`account_id`);'
|
||||
)->execute();
|
||||
|
||||
/* info: amount will get increased and reduced based on invoices -> will result in a high amount of entries where the amount is 0 -> long lookup times for available lot lookup?! */
|
||||
$dbPool->get('core')->con->prepare(
|
||||
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'warehousing_article_stock` (
|
||||
`WarehousingArticleStockID` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`article` int(11) DEFAULT NULL,
|
||||
`lot` varchar(256) DEFAULT NULL,
|
||||
`sn` varchar(256) DEFAULT NULL,
|
||||
`durability` datetime DEFAULT NULL,
|
||||
`arrival` int(11) DEFAULT NULL,
|
||||
`amount` mediumint(9) DEFAULT NULL,
|
||||
`location` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`WarehousingArticleStockID`),
|
||||
KEY `article` (`article`),
|
||||
KEY `arrival` (`arrival`),
|
||||
KEY `location` (`location`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
||||
)->execute();
|
||||
|
||||
$dbPool->get('core')->con->prepare(
|
||||
'ALTER TABLE `' . $dbPool->get('core')->prefix . 'warehousing_article_stock`
|
||||
ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'warehousing_article_stock_ibfk_1` FOREIGN KEY (`article`) REFERENCES `' . $dbPool->get('core')->prefix . 'warehousing_article` (`WarehousingArticleID`),
|
||||
ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'warehousing_article_stock_ibfk_2` FOREIGN KEY (`arrival`) REFERENCES `' . $dbPool->get('core')->prefix . 'warehousing_arrival` (`WarehousingArrivalID`),
|
||||
ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'warehousing_article_stock_ibfk_3` FOREIGN KEY (`location`) REFERENCES `' . $dbPool->get('core')->prefix . 'warehousing_stock_location` (`WarehousingStockLocationID`);'
|
||||
)->execute();
|
||||
|
||||
$dbPool->get('core')->con->prepare(
|
||||
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'warehousing_arrival_transfer` (
|
||||
`WarehousingArrivalTransferID` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`location` int(11) DEFAULT NULL,
|
||||
`amount` int(11) DEFAULT NULL,
|
||||
`arrival` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`WarehousingArrivalTransferID`),
|
||||
KEY `location` (`location`),
|
||||
KEY `arrival` (`arrival`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
||||
)->execute();
|
||||
|
||||
$dbPool->get('core')->con->prepare(
|
||||
'ALTER TABLE `' . $dbPool->get('core')->prefix . 'warehousing_arrival_transfer`
|
||||
ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'warehousing_arrival_transfer_ibfk_1` FOREIGN KEY (`location`) REFERENCES `' . $dbPool->get('core')->prefix . 'warehousing_article_stock` (`WarehousingArticleStockID`),
|
||||
ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'warehousing_arrival_transfer_ibfk_2` FOREIGN KEY (`arrival`) REFERENCES `' . $dbPool->get('core')->prefix . 'warehousing_arrival` (`WarehousingArrivalID`);'
|
||||
)->execute();
|
||||
|
||||
$dbPool->get('core')->con->prepare(
|
||||
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'warehousing_article_transfer` (
|
||||
`WarehousingArticleTransferID` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(50) DEFAULT NULL,
|
||||
`creator` int(11) DEFAULT NULL,
|
||||
`created` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`WarehousingArticleTransferID`),
|
||||
KEY `creator` (`creator`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
||||
)->execute();
|
||||
|
||||
$dbPool->get('core')->con->prepare(
|
||||
'ALTER TABLE `' . $dbPool->get('core')->prefix . 'warehousing_article_transfer`
|
||||
ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'warehousing_article_transfer_ibfk_1` FOREIGN KEY (`creator`) REFERENCES `' . $dbPool->get('core')->prefix . 'account` (`account_id`);'
|
||||
)->execute();
|
||||
|
||||
$dbPool->get('core')->con->prepare(
|
||||
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'warehousing_article_transfer_single` (
|
||||
`WarehousingArticleStockID` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`old` int(11) DEFAULT NULL,
|
||||
`new` int(11) DEFAULT NULL,
|
||||
`amount` int(11) DEFAULT NULL,
|
||||
`transfer` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`WarehousingArticleStockID`),
|
||||
KEY `old` (`old`),
|
||||
KEY `new` (`new`),
|
||||
KEY `transfer` (`transfer`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
||||
)->execute();
|
||||
|
||||
$dbPool->get('core')->con->prepare(
|
||||
'ALTER TABLE `' . $dbPool->get('core')->prefix . 'warehousing_article_transfer_single`
|
||||
ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'warehousing_article_transfer_single_ibfk_1` FOREIGN KEY (`old`) REFERENCES `' . $dbPool->get('core')->prefix . 'warehousing_article_stock` (`WarehousingArticleStockID`),
|
||||
ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'warehousing_article_transfer_single_ibfk_2` FOREIGN KEY (`new`) REFERENCES `' . $dbPool->get('core')->prefix . 'warehousing_article_stock` (`WarehousingArticleStockID`),
|
||||
ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'warehousing_article_transfer_single_ibfk_3` FOREIGN KEY (`transfer`) REFERENCES `' . $dbPool->get('core')->prefix . 'warehousing_article_transfer` (`WarehousingArticleTransferID`);'
|
||||
)->execute();
|
||||
|
||||
// TODO: maybe consider chaning shipCountry varchar to size 55 (based on ISO 3166-1) (same goes for sales department tables)
|
||||
// TODO: create shipFrom table = business address of your company (maybe multiple)
|
||||
// TODO: implement ups fields make sure to use multiple tables (multiple packages)
|
||||
$dbPool->get('core')->con->prepare(
|
||||
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'warehousing_shipping` (
|
||||
`WarehousingShippingID` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`shippingdate` datetime DEFAULT NULL,
|
||||
`shipTo` varchar(50) DEFAULT NULL,
|
||||
`shipFAO` varchar(30) DEFAULT NULL,
|
||||
`shipAddr` varchar(50) DEFAULT NULL,
|
||||
`shipCity` varchar(20) DEFAULT NULL,
|
||||
`shipState` varchar(30) DEFAULT NULL,
|
||||
`shipZip` varchar(20) DEFAULT NULL,
|
||||
`shipCountry` varchar(30) DEFAULT NULL,
|
||||
`shipPhone` varchar(30) DEFAULT NULL,
|
||||
`shipFrom` int(11) DEFAULT NULL,
|
||||
`carrier` varchar(30) DEFAULT NULL,
|
||||
`tracking` varchar(7089) DEFAULT NULL,
|
||||
`client` int(11) DEFAULT NULL,
|
||||
`invoice` int(11) DEFAULT NULL,
|
||||
`shipped` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`WarehousingShippingID`),
|
||||
KEY `shipFrom` (`shipFrom`),
|
||||
KEY `shipped` (`shipped`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
||||
)->execute();
|
||||
|
||||
$dbPool->get('core')->con->prepare(
|
||||
'ALTER TABLE `' . $dbPool->get('core')->prefix . 'warehousing_shipping`
|
||||
ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'warehousing_shipping_ibfk_1` FOREIGN KEY (`shipFrom`) REFERENCES `' . $dbPool->get('core')->prefix . 'business_address` (`business_address_id`),
|
||||
ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'warehousing_shipping_ibfk_2` FOREIGN KEY (`shipped`) REFERENCES `' . $dbPool->get('core')->prefix . 'account` (`account_id`);'
|
||||
)->execute();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
129
Controller.php
Normal file
129
Controller.php
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace Modules\WarehouseManagement;
|
||||
|
||||
use Modules\Navigation\Models\Navigation;
|
||||
use Modules\Navigation\Views\NavigationView;
|
||||
use phpOMS\Contract\RenderableInterface;
|
||||
use phpOMS\Message\RequestAbstract;
|
||||
use phpOMS\Message\RequestDestination;
|
||||
use phpOMS\Message\ResponseAbstract;
|
||||
use phpOMS\Module\ModuleAbstract;
|
||||
use phpOMS\Module\WebInterface;
|
||||
use phpOMS\Views\View;
|
||||
use phpOMS\Views\ViewLayout;
|
||||
|
||||
/**
|
||||
* WarehouseManagement class.
|
||||
*
|
||||
* @category Modules
|
||||
* @package Modules\WarehouseManagement
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @license OMS License 1.0
|
||||
* @link http://orange-management.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Controller extends ModuleAbstract implements WebInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* Module name.
|
||||
*
|
||||
* @var \string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $module = 'WarehouseManagement';
|
||||
|
||||
/**
|
||||
* Localization files.
|
||||
*
|
||||
* @var \string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $localization = [
|
||||
RequestDestination::BACKEND => ['backend'],
|
||||
];
|
||||
|
||||
/**
|
||||
* Providing.
|
||||
*
|
||||
* @var \string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $providing = [
|
||||
'Content',
|
||||
];
|
||||
|
||||
/**
|
||||
* Dependencies.
|
||||
*
|
||||
* @var \string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $dependencies = [];
|
||||
|
||||
/**
|
||||
* Routing elements.
|
||||
*
|
||||
* @var array
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $routes = [
|
||||
'^.*/backend/warehousing/stock/list.*$' => [['dest' => '\Modules\WarehouseManagement\Controller:viewWarehouseManagementStockList', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
|
||||
];
|
||||
|
||||
/**
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
* @param mixed $data Generic data
|
||||
*
|
||||
* @return RenderableInterface
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function viewWarehouseManagementStockList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
||||
{
|
||||
$view = new View($this->app, $request, $response);
|
||||
$view->setTemplate('/Modules/WarehouseManagement/Theme/backend/stock-list');
|
||||
$view->addData('nav', $this->createNavigation(1003001001, $request, $response));
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $pageId Page/parent Id for navigation
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
*
|
||||
* @return RenderableInterface
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
private function createNavigation(\int $pageId, RequestAbstract $request, ResponseAbstract $response)
|
||||
{
|
||||
$nav = Navigation::getInstance($request, $this->app->dbPool);
|
||||
$navView = new NavigationView($this->app, $request, $response);
|
||||
$navView->setTemplate('/Modules/Navigation/Theme/backend/mid');
|
||||
$navView->setNav($nav->getNav());
|
||||
$navView->setLanguage($request->getL11n()->language);
|
||||
$navView->setParent($pageId);
|
||||
|
||||
return $navView;
|
||||
}
|
||||
}
|
||||
BIN
Img/module_teaser_small.png
Normal file
BIN
Img/module_teaser_small.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
404
Models/Arrival.php
Normal file
404
Models/Arrival.php
Normal file
|
|
@ -0,0 +1,404 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace Modules\Warehousing\Models;
|
||||
|
||||
use phpOMS\Pattern\Multition;
|
||||
|
||||
/**
|
||||
* Warehouse class.
|
||||
*
|
||||
* @category Warehousing
|
||||
* @package Framework
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @license OMS License 1.0
|
||||
* @link http://orange-management.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Arrival implements Multition
|
||||
{
|
||||
|
||||
/**
|
||||
* ID.
|
||||
*
|
||||
* @var \int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $id = '';
|
||||
|
||||
/**
|
||||
* Order.
|
||||
*
|
||||
* @var \int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $order = '';
|
||||
|
||||
/**
|
||||
* From.
|
||||
*
|
||||
* @var \phpOMS\Datatypes\Address
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $from = null;
|
||||
|
||||
/**
|
||||
* Warehouse.
|
||||
*
|
||||
* @var \Modules\Warehousing\Models\Warehouse
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $warehouse = null;
|
||||
|
||||
/**
|
||||
* Date of arrival.
|
||||
*
|
||||
* @var \Datetime
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $date = null;
|
||||
|
||||
/**
|
||||
* Person who accepted the delivery.
|
||||
*
|
||||
* @var \int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $acceptor = null;
|
||||
|
||||
/**
|
||||
* Warehouse.
|
||||
*
|
||||
* @var \Modules\Warehousing\Models\ArrivalStatus
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $status = null;
|
||||
|
||||
/* TODO: count, packaging, product count etc.... for every single position + where do you put it */
|
||||
|
||||
/**
|
||||
* Arrival.
|
||||
*
|
||||
* @var \Modules\Warehousing\Models\Arrival[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static $instances = [];
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param \int $id Arrival ID
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
private function __construct($id)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function init($id)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function __clone()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializing object.
|
||||
*
|
||||
* @param \int $id Arrival ID
|
||||
*
|
||||
* @return \Modules\Warehousing\Models\Arrival
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getInstance($id)
|
||||
{
|
||||
if (!isset(self::$instances[$id])) {
|
||||
self::$instances[$id] = new self($id);
|
||||
}
|
||||
|
||||
return self::$instances[$id];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ID.
|
||||
*
|
||||
* @return \int
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get date of when the consignment arrived.
|
||||
*
|
||||
* @return \Datetime Date of arrival
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getDate()
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set date of when the consignment arrived.
|
||||
*
|
||||
* @param \Datetime $date Date of arrival
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setDate($date)
|
||||
{
|
||||
$this->date = $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get order.
|
||||
*
|
||||
* @return \int
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getOrder()
|
||||
{
|
||||
return $this->order;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set order.
|
||||
*
|
||||
* @param \int $order Order Id
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setOrder($order)
|
||||
{
|
||||
$this->order = $order;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get From.
|
||||
*
|
||||
* @return \phpOMS\Datatypes\Address
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getFrom()
|
||||
{
|
||||
return $this->from;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set From.
|
||||
*
|
||||
* @param \phpOMS\Datatypes\Address $from Consignor
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setFrom($from)
|
||||
{
|
||||
$this->from = $from;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get status.
|
||||
*
|
||||
* @return \Modules\Warehousing\Models\ArrivalStatus
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set status.
|
||||
*
|
||||
* @param \Modules\Warehousing\Models\ArrivalStatus
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$this->status = $status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get warehouse.
|
||||
*
|
||||
* @return \Modules\Warehousing\Models\Warehouse
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getWarehouse()
|
||||
{
|
||||
return $this->warehouse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get acceptor.
|
||||
*
|
||||
* @return \int
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getAcceptor()
|
||||
{
|
||||
return $this->acceptor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set acceptor.
|
||||
*
|
||||
* @param \int $acceptor Person who accepted the consignment
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setAcceptor($acceptor)
|
||||
{
|
||||
$this->acceptor = $acceptor;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function update()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function serialize()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function unserialize($data)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function exportJson($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function importJson($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function exportCsv($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function importCsv($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function exportExcel($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function importExcel($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function exportPdf($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function importPdf($path)
|
||||
{
|
||||
}
|
||||
}
|
||||
42
Models/ArrivalStatus.php
Normal file
42
Models/ArrivalStatus.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace Modules\Warehousing\Models;
|
||||
|
||||
use phpOMS\Datatypes\Enum;
|
||||
|
||||
/**
|
||||
* Arrival status enum.
|
||||
*
|
||||
* @category Warehousing
|
||||
* @package Modules
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @license OMS License 1.0
|
||||
* @link http://orange-management.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
abstract class ArrivalStatus extends Enum
|
||||
{
|
||||
const NONE = 0;
|
||||
|
||||
const PENDING = 1;
|
||||
|
||||
const CHECKING = 2;
|
||||
|
||||
const SORTING = 3;
|
||||
|
||||
const FINISHED = 4;
|
||||
}
|
||||
487
Models/Article.php
Normal file
487
Models/Article.php
Normal file
|
|
@ -0,0 +1,487 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/ /* TODO: maybe make this a framework object? and let warehousing, sales, purchase extend this */
|
||||
namespace Modules\Warehousing\Models;
|
||||
|
||||
use phpOMS\Pattern\Multition;
|
||||
|
||||
/**
|
||||
* Article class.
|
||||
*
|
||||
* @category Warehousing
|
||||
* @package Framework
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @license OMS License 1.0
|
||||
* @link http://orange-management.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Article implements Multition
|
||||
{
|
||||
|
||||
/**
|
||||
* Article ID.
|
||||
*
|
||||
* @var \int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $id = null;
|
||||
|
||||
/**
|
||||
* Name.
|
||||
*
|
||||
* @var \string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $name = '';
|
||||
|
||||
/**
|
||||
* Description.
|
||||
*
|
||||
* @var \string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $description = '';
|
||||
|
||||
/**
|
||||
* Matchcode.
|
||||
*
|
||||
* @var \string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $matchcode = '';
|
||||
|
||||
/**
|
||||
* Sector.
|
||||
*
|
||||
* @var \string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $sector = null;
|
||||
|
||||
/**
|
||||
* Group.
|
||||
*
|
||||
* @var \string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $group = null;
|
||||
|
||||
/**
|
||||
* Suppliers.
|
||||
*
|
||||
* supplier price leadtime
|
||||
*
|
||||
* @var \string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $suppliers = null;
|
||||
|
||||
/**
|
||||
* Localization strings.
|
||||
*
|
||||
* [en] Name - Description
|
||||
*
|
||||
* @var array
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $invoice_i18n = [];
|
||||
|
||||
/**
|
||||
* Prizes.
|
||||
*
|
||||
* [id] name country state prize discount% discountA bonus-in-kind groupA groupB amount event
|
||||
*
|
||||
* @var array
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $prizes = [];
|
||||
|
||||
/**
|
||||
* Active supplier.
|
||||
*
|
||||
* @var \string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $pprice = null;
|
||||
|
||||
/**
|
||||
* Created.
|
||||
*
|
||||
* @var \Datetime
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $created = null;
|
||||
|
||||
/**
|
||||
* Creator.
|
||||
*
|
||||
* @var \phpOMS\Models\User
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $creator = null;
|
||||
|
||||
/**
|
||||
* Article.
|
||||
*
|
||||
* @var \Modules\Warehousing\Models\Article[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static $instances = [];
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param \int $id Article ID
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function __construct($id)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function init($id)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function __clone()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializing object.
|
||||
*
|
||||
* @param \int $id Article ID
|
||||
*
|
||||
* @return \Modules\Warehousing\Models\Article
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getInstance($id)
|
||||
{
|
||||
if (!isset(self::$instances[$id])) {
|
||||
self::$instances[$id] = new self($id);
|
||||
}
|
||||
|
||||
return self::$instances[$id];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ID.
|
||||
*
|
||||
* @return \int
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name.
|
||||
*
|
||||
* @return \string
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set name.
|
||||
*
|
||||
* @param \string $name Name of the article
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get matchcode.
|
||||
*
|
||||
* @return \string
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getMatchcode()
|
||||
{
|
||||
return $this->matchcode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set matchcode.
|
||||
*
|
||||
* @param \string $matchcode Matchcode of the article
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setMatchcode($matchcode)
|
||||
{
|
||||
$this->matchcode = $matchcode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get description.
|
||||
*
|
||||
* @return \string
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set description.
|
||||
*
|
||||
* @param \string $desc Description of the article
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setDescription($desc)
|
||||
{
|
||||
$this->description = $desc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created.
|
||||
*
|
||||
* @return \Datetime
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set created.
|
||||
*
|
||||
* @param \Datetime $created Date of when the article got created
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->created = $created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get creator.
|
||||
*
|
||||
* @return \phpOMS\Models\User
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getCreator()
|
||||
{
|
||||
return $this->creator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set creator.
|
||||
*
|
||||
* @param \phpOMS\Models\User $creator Creator ID
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setCreator($creator)
|
||||
{
|
||||
$this->creator = $creator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add price to pricelist.
|
||||
*
|
||||
* @param array $price Price
|
||||
* @param \bool $db Update DB and cache?
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function addPrice($price, $db = true)
|
||||
{
|
||||
$id = 0; /* insert and get id */
|
||||
$this->prices[$id] = $price;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove price from pricelist.
|
||||
*
|
||||
* @param \int $id Price ID
|
||||
* @param \bool $db Update DB and cache?
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function removePrice($id, $db = true)
|
||||
{
|
||||
if (isset($this->prices[$id])) {
|
||||
unset($this->prices[$id]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add price to pricelist.
|
||||
*
|
||||
* @param \int $id Price ID
|
||||
* @param array $price Price
|
||||
* @param \bool $db Update DB and cache?
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function editPrice($id, $price, $db = true)
|
||||
{
|
||||
if (isset($this->prices[$id])) {
|
||||
$this->prices[$id] = $price;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function update()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function serialize()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function unserialize($data)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function exportJson($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function importJson($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function exportCsv($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function importCsv($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function exportExcel($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function importExcel($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function exportPdf($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function importPdf($path)
|
||||
{
|
||||
}
|
||||
}
|
||||
87
Models/CountingList.php
Normal file
87
Models/CountingList.php
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace Modules\Warehousing\Models;
|
||||
|
||||
/**
|
||||
* Counting list class.
|
||||
*
|
||||
* @category Warehousing
|
||||
* @package Framework
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @license OMS License 1.0
|
||||
* @link http://orange-management.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class CountingList
|
||||
{
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function exportJson($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function importJson($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function exportCsv($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function importCsv($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function exportExcel($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function importExcel($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function exportPdf($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function importPdf($path)
|
||||
{
|
||||
}
|
||||
}
|
||||
42
Models/PackagingStatus.php
Normal file
42
Models/PackagingStatus.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace Modules\Warehousing\Models;
|
||||
|
||||
use phpOMS\Datatypes\Enum;
|
||||
|
||||
/**
|
||||
* Packaging status enum.
|
||||
*
|
||||
* @category Warehousing
|
||||
* @package Modules
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @license OMS License 1.0
|
||||
* @link http://orange-management.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
abstract class PackagingStatus extends Enum
|
||||
{
|
||||
const PENDING = 0;
|
||||
|
||||
const PACKING = 1;
|
||||
|
||||
const PACKED = 2;
|
||||
|
||||
const SUSPENDED = 3;
|
||||
|
||||
const CANCELED = 4;
|
||||
}
|
||||
400
Models/Shipping.php
Normal file
400
Models/Shipping.php
Normal file
|
|
@ -0,0 +1,400 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace Modules\Warehousing\Models;
|
||||
|
||||
use phpOMS\Pattern\Multition;
|
||||
|
||||
/**
|
||||
* Warehouse class.
|
||||
*
|
||||
* @category Warehousing
|
||||
* @package Framework
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @license OMS License 1.0
|
||||
* @link http://orange-management.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Shipping implements Multition
|
||||
{
|
||||
|
||||
/**
|
||||
* ID.
|
||||
*
|
||||
* @var \int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $id = 0;
|
||||
|
||||
/**
|
||||
* Order.
|
||||
*
|
||||
* @var \int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $order = '';
|
||||
|
||||
/**
|
||||
* From.
|
||||
*
|
||||
* @var \phpOMS\Datatypes\Address
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $to = null;
|
||||
|
||||
/**
|
||||
* Warehouse.
|
||||
*
|
||||
* @var \int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $warehouse = '';
|
||||
|
||||
/**
|
||||
* Date of arrival.
|
||||
*
|
||||
* @var \Datetime
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $delivered = null;
|
||||
|
||||
/**
|
||||
* Person who sent the delivery.
|
||||
*
|
||||
* @var \int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $sender = null;
|
||||
|
||||
/**
|
||||
* Warehouse.
|
||||
*
|
||||
* @var \Modules\Warehousing\Models\ArrivalStatus
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $status = null;
|
||||
|
||||
/**
|
||||
* Shipping.
|
||||
*
|
||||
* @var \Modules\Warehousing\Models\Article[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static $instances = [];
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param \int $id Article ID
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function __construct($id)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializing object.
|
||||
*
|
||||
* @param \int $id Article ID
|
||||
*
|
||||
* @return \Modules\Warehousing\Models\Article
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public static function getInstance($id)
|
||||
{
|
||||
if (!isset(self::$instances[$id])) {
|
||||
self::$instances[$id] = new self($id);
|
||||
}
|
||||
|
||||
return self::$instances[$id];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function init($id)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function __clone()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ID.
|
||||
*
|
||||
* @return \int
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get order.
|
||||
*
|
||||
* @return \int
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getOrder()
|
||||
{
|
||||
return $this->order;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set order.
|
||||
*
|
||||
* @param \int $order Order ID
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setOrder($order)
|
||||
{
|
||||
$this->order = $order;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get delivered.
|
||||
*
|
||||
* @return \Datetime
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getDelivered()
|
||||
{
|
||||
return $this->delivered;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set delivered.
|
||||
*
|
||||
* @param \Datetime $delivered Date of delivery
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setDelivered($delivered)
|
||||
{
|
||||
$this->delivered = $delivered;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get To.
|
||||
*
|
||||
* @return \phpOMS\Datatypes\Address
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getTo()
|
||||
{
|
||||
return $this->to;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set To.
|
||||
*
|
||||
* @param \phpOMS\Datatypes\Address $to Receiver
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setTo($to)
|
||||
{
|
||||
$this->to = $to;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get status.
|
||||
*
|
||||
* @return \Modules\Warehousing\Models\ArrivalStatus
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set status.
|
||||
*
|
||||
* @param \Modules\Warehousing\Models\ArrivalStatus
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$this->status = $status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get warehouse.
|
||||
*
|
||||
* @return \Modules\Warehousing\Models\Warehouse
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getWarehouse()
|
||||
{
|
||||
return $this->warehouse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get acceptor.
|
||||
*
|
||||
* @return \int
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getSender()
|
||||
{
|
||||
return $this->sender;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set sender.
|
||||
*
|
||||
* @param \int $sender Person who accepted the consignment
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setSender($sender)
|
||||
{
|
||||
$this->sender = $sender;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function update()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function serialize()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function unserialize($data)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function exportJson($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function importJson($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function exportCsv($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function importCsv($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function exportExcel($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function importExcel($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function exportPdf($path)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function importPdf($path)
|
||||
{
|
||||
}
|
||||
}
|
||||
243
Models/Warehouse.php
Normal file
243
Models/Warehouse.php
Normal file
|
|
@ -0,0 +1,243 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace Modules\Warehousing\Models;
|
||||
|
||||
use phpOMS\Pattern\Multition;
|
||||
|
||||
/**
|
||||
* Warehouse class.
|
||||
*
|
||||
* @category Warehousing
|
||||
* @package Framework
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @license OMS License 1.0
|
||||
* @link http://orange-management.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Warehouse implements Multition
|
||||
{
|
||||
|
||||
/**
|
||||
* Name.
|
||||
*
|
||||
* @var \string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $name = '';
|
||||
|
||||
/**
|
||||
* Description.
|
||||
*
|
||||
* @var \string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $description = '';
|
||||
|
||||
/**
|
||||
* Location of the warehouse.
|
||||
*
|
||||
* @var \phpOMS\Datatypes\Location
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $location = null;
|
||||
|
||||
/**
|
||||
* Warehouse.
|
||||
*
|
||||
* @var \Modules\Warehousing\Models\Warehouse[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static $instances = [];
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param \int $id Warehouse ID
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function __construct($id)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializing object.
|
||||
*
|
||||
* @param \int $id Warehouse ID
|
||||
*
|
||||
* @return \Modules\Warehousing\Models\Warehouse
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public static function getInstance($id)
|
||||
{
|
||||
if (!isset(self::$instances[$id])) {
|
||||
self::$instances[$id] = new self($id);
|
||||
}
|
||||
|
||||
return self::$instances[$id];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function init($id)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function __clone()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ID.
|
||||
*
|
||||
* @return \int
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name.
|
||||
*
|
||||
* @return \string
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set name.
|
||||
*
|
||||
* @param \string $name Name of the article
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name.
|
||||
*
|
||||
* @return \string
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set name.
|
||||
*
|
||||
* @param \string $description Description of the warehouse
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setDescription($description)
|
||||
{
|
||||
$this->description = $description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get location.
|
||||
*
|
||||
* @return \phpOMS\Datatypes\Location
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getLocation()
|
||||
{
|
||||
return $this->location;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set location.
|
||||
*
|
||||
* @param \phpOMS\Datatypes\Location $location Location of the warehouse
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setLocation($location)
|
||||
{
|
||||
$this->location = $location;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function update()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function serialize()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function unserialize($data)
|
||||
{
|
||||
}
|
||||
}
|
||||
16
Theme/backend/arrival-list.tpl.php
Normal file
16
Theme/backend/arrival-list.tpl.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
20
Theme/backend/article-profile.tpl.php
Normal file
20
Theme/backend/article-profile.tpl.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
16
Theme/backend/shipping-list.tpl.php
Normal file
16
Theme/backend/shipping-list.tpl.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
53
Theme/backend/stock-list.tpl.php
Normal file
53
Theme/backend/stock-list.tpl.php
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
|
||||
$footerView = new \Web\Views\Lists\PaginationView($this->app, $this->request, $this->response);
|
||||
$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig');
|
||||
|
||||
$footerView->setPages(1 / 25);
|
||||
$footerView->setPage(1);
|
||||
$footerView->setResults(1);
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<section class="box w-100">
|
||||
<table class="table">
|
||||
<caption><?= $this->l11n->lang['WarehouseManagement']['Stock']; ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->l11n->lang[0]['ID']; ?>
|
||||
<td class="wf-100"><?= $this->l11n->lang['WarehouseManagement']['Article']; ?>
|
||||
<td><?= $this->l11n->lang['WarehouseManagement']['Quantity']; ?>
|
||||
<tfoot>
|
||||
<tr><td colspan="8"><?= $footerView->render(); ?>
|
||||
<tbody>
|
||||
<?php $c = 0; foreach ([] as $key => $value) : $c++;
|
||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/business/department/profile?id=' . $value->getId()); ?>
|
||||
<tr>
|
||||
<td><a href="<?= $url; ?>"><?= $value->getId(); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $value->getName(); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $value->getParent(); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $value->getUnit(); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if($c === 0) : ?>
|
||||
<tr>
|
||||
<td colspan="8" class="empty"><?= $this->l11n->lang[0]['Empty']; ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</section>
|
||||
17
Theme/lang/api.en.lang.php
Normal file
17
Theme/lang/api.en.lang.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
$MODLANG[1] = [
|
||||
];
|
||||
45
Theme/lang/backend.en.lang.php
Normal file
45
Theme/lang/backend.en.lang.php
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
$MODLANG['WarehouseManagement'] = [
|
||||
'All' => 'All',
|
||||
'Amount' => 'Amount',
|
||||
'Arrivals' => 'Arrivals',
|
||||
'Articles' => 'Articles',
|
||||
'Article' => 'Article',
|
||||
'City' => 'City',
|
||||
'Consignee' => 'Consignee',
|
||||
'Consignor' => 'Consignor',
|
||||
'Country' => 'Country',
|
||||
'Date' => 'Date',
|
||||
'Description' => 'Description',
|
||||
'Interval' => 'Interval',
|
||||
'Location' => 'Location',
|
||||
'Matchcode' => 'Matchcode',
|
||||
'Month' => 'Month',
|
||||
'Name' => 'Name',
|
||||
'Order' => 'Order',
|
||||
'Quantity' => 'Quantity',
|
||||
'Reference' => 'Reference',
|
||||
'Shipping' => 'Shipping',
|
||||
'Statistics' => 'Statistics',
|
||||
'Stock' => 'Stock',
|
||||
'Street' => 'Street',
|
||||
'Today' => 'Today',
|
||||
'Type' => 'Type',
|
||||
'Week' => 'Week',
|
||||
'Year' => 'Year',
|
||||
'Zip' => 'Zip',
|
||||
];
|
||||
22
Theme/lang/nav.backend.en.lang.php
Normal file
22
Theme/lang/nav.backend.en.lang.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
$MODLANG['Navigation'] = [
|
||||
'Arrival' => 'Arrival',
|
||||
'Articles' => 'Articles',
|
||||
'Shipping' => 'Shipping',
|
||||
'Stock' => 'Stock',
|
||||
'Warehousing' => 'Warehousing',
|
||||
];
|
||||
51
info.json
Normal file
51
info.json
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"name": {
|
||||
"id": 1001300000,
|
||||
"internal": "WarehouseManagement",
|
||||
"external": "OMS Warehousing"
|
||||
},
|
||||
"version": "1.0.0",
|
||||
"requirements": {
|
||||
"phpOMS": "1.0.0",
|
||||
"phpOMS-db": "1.0.0"
|
||||
},
|
||||
"creator": {
|
||||
"name": "Orange Management",
|
||||
"website": "www.spl1nes.com"
|
||||
},
|
||||
"description": "Warehousing module.",
|
||||
"directory": "WarehouseManagement",
|
||||
"dependencies": {},
|
||||
"providing": {
|
||||
"Navigation": "*"
|
||||
},
|
||||
"load": [
|
||||
{
|
||||
"pid": [
|
||||
"2bea808a85e14f973f3076105a97cd46b4551819"
|
||||
],
|
||||
"type": 4,
|
||||
"for": 0,
|
||||
"from": "WarehouseManagement",
|
||||
"file": "WarehouseManagement"
|
||||
},
|
||||
{
|
||||
"pid": [
|
||||
"754a08ddf8bcb1cf22f310f09206dd783d42f7dd"
|
||||
],
|
||||
"type": 5,
|
||||
"from": "WarehouseManagement",
|
||||
"for": "Navigation",
|
||||
"file": "nav.backend"
|
||||
},
|
||||
{
|
||||
"pid": [
|
||||
"2bea808a85e14f973f3076105a97cd46b4551819"
|
||||
],
|
||||
"type": 5,
|
||||
"for": "Content",
|
||||
"file": "backend",
|
||||
"from": "WarehouseManagement"
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user