commit 4691e6bb582dfb01942d542aa474cc3cbe78f752 Author: Dennis Eichhorn Date: Sun Nov 29 21:57:18 2015 +0100 Init diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php new file mode 100644 index 0000000..eba1cef --- /dev/null +++ b/Admin/Install/Navigation.php @@ -0,0 +1,38 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Admin\Install; + +/** + * Navigation class. + * + * @category Modules + * @package Modules\Admin + * @author OMS Development Team + * @author Dennis Eichhorn + * @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); + } +} diff --git a/Admin/Install/nav.install.json b/Admin/Install/nav.install.json new file mode 100644 index 0000000..f4fe70c --- /dev/null +++ b/Admin/Install/nav.install.json @@ -0,0 +1,217 @@ +[ + { + "id": 1002601001, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 2, + "subtype": 0, + "name": "Accounting", + "uri": null, + "target": "self", + "icon": "fa fa-book", + "order": 50, + "from": 1002600000, + "permission": null, + "parent": 0, + "children": [ + { + "id": 1002602001, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 2, + "subtype": 1, + "name": "Accounts", + "uri": "/{/lang}/backend/accounting/gl/list", + "target": "self", + "icon": null, + "order": 5, + "from": 1002600000, + "permission": null, + "parent": 1002601001, + "children": [ + { + "id": 1002602101, + "pid": "1259733702c323edae599221fcbf82f0a479372a", + "type": 3, + "subtype": 1, + "name": "List", + "uri": "/{/lang}/backend/accounting/gl/list", + "target": "self", + "icon": null, + "order": 1, + "from": 1002600000, + "permission": null, + "parent": 1002602001, + "children": [] + }, + { + "id": 1002602201, + "pid": "1259733702c323edae599221fcbf82f0a479372a", + "type": 3, + "subtype": 1, + "name": "Create", + "uri": "/{/lang}/backend/accounting/gl/create", + "target": "self", + "icon": null, + "order": 5, + "from": 1002600000, + "permission": null, + "parent": 1002602001, + "children": [] + } + ] + }, + { + "id": 1002603001, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 2, + "subtype": 1, + "name": "CostCenters", + "uri": "/{/lang}/backend/accounting/costcenter/list", + "target": "self", + "icon": null, + "order": 5, + "from": 1002600000, + "permission": null, + "parent": 1002601001, + "children": [ + { + "id": 1002603101, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 3, + "subtype": 1, + "name": "List", + "uri": "/{/lang}/backend/accounting/costcenter/list", + "target": "self", + "icon": null, + "order": 5, + "from": 1002600000, + "permission": null, + "parent": 1002603001, + "children": [] + }, + { + "id": 1002603201, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 3, + "subtype": 1, + "name": "Create", + "uri": "/{/lang}/backend/accounting/costcenter/create", + "target": "self", + "icon": null, + "order": 10, + "from": 1002600000, + "permission": null, + "parent": 1002603001, + "children": [] + } + ] + }, + { + "id": 1002604001, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 2, + "subtype": 1, + "name": "CostObjects", + "uri": "/{/lang}/backend/accounting/costobject/list", + "target": "self", + "icon": null, + "order": 5, + "from": 1002600000, + "permission": null, + "parent": 1002601001, + "children": [ + { + "id": 1002604101, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 3, + "subtype": 1, + "name": "List", + "uri": "/{/lang}/backend/accounting/costobject/list", + "target": "self", + "icon": null, + "order": 5, + "from": 1002600000, + "permission": null, + "parent": 1002604001, + "children": [] + }, + { + "id": 1002604201, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 3, + "subtype": 1, + "name": "Create", + "uri": "/{/lang}/backend/accounting/costobject/create", + "target": "self", + "icon": null, + "order": 10, + "from": 1002600000, + "permission": null, + "parent": 1002604001, + "children": [] + } + ] + }, + { + "id": 1002605001, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 2, + "subtype": 1, + "name": "BatchPostings", + "uri": "/{/lang}/backend/accounting/stack/list", + "target": "self", + "icon": null, + "order": 20, + "from": 1002600000, + "permission": null, + "parent": 1002601001, + "children": [ + { + "id": 1002605101, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 3, + "subtype": 1, + "name": "List", + "uri": "/{/lang}/backend/accounting/stack/list", + "target": "self", + "icon": null, + "order": 5, + "from": 1002600000, + "permission": null, + "parent": 1002605001, + "children": [] + }, + { + "id": 1002605201, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 3, + "subtype": 1, + "name": "Archive", + "uri": "/{/lang}/backend/accounting/stack/archive/list", + "target": "self", + "icon": null, + "order": 10, + "from": 1002600000, + "permission": null, + "parent": 1002605001, + "children": [] + }, + { + "id": 1002605301, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 3, + "subtype": 1, + "name": "Create", + "uri": "/{/lang}/backend/accounting/stack/create", + "target": "self", + "icon": null, + "order": 15, + "from": 1002600000, + "permission": null, + "parent": 1002605001, + "children": [] + } + ] + } + ] + } +] diff --git a/Admin/Installer.php b/Admin/Installer.php new file mode 100644 index 0000000..1ac62ca --- /dev/null +++ b/Admin/Installer.php @@ -0,0 +1,213 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Admin; + +use phpOMS\DataStorage\Database\DatabaseType; +use phpOMS\DataStorage\Database\Pool; +use phpOMS\Module\InstallerAbstract; + +/** + * Navigation class. + * + * @category Modules + * @package Modules\Admin + * @author OMS Development Team + * @author Dennis Eichhorn + * @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 . 'accounting_account` ( + `accounting_account_id` int(11) NOT NULL AUTO_INCREMENT, + `accounting_account_name` varchar(25) NOT NULL, + `accounting_account_description` varchar(255) NOT NULL, + `accounting_account_type` tinyint(1) NOT NULL, + `accounting_account_parent` int(11) NOT NULL, + PRIMARY KEY (`accounting_account_id`), + KEY `accounting_account_parent` (`accounting_account_parent`) + )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'accounting_account` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'accounting_account_ibfk_1` FOREIGN KEY (`accounting_account_parent`) REFERENCES `' . $dbPool->get('core')->prefix . 'accounting_account` (`accounting_account_id`);' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'accounting_batch` ( + `accounting_batch_id` int(11) NOT NULL AUTO_INCREMENT, + `accounting_batch_title` varchar(30) NOT NULL, + `accounting_batch_creator` int(11) NOT NULL, + `accounting_batch_created`datetime NOT NULL, + `accounting_batch_type` tinyint(1) NOT NULL, + PRIMARY KEY (`accounting_batch_id`), + KEY `accounting_batch_creator` (`accounting_batch_creator`) + )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'accounting_batch` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'accounting_batch_ibfk_1` FOREIGN KEY (`accounting_batch_creator`) REFERENCES `' . $dbPool->get('core')->prefix . 'account` (`account_id`);' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'accounting_posting` ( + `accounting_posting_id` int(11) NOT NULL AUTO_INCREMENT, + `accounting_posting_batch` int(11) NOT NULL, + `accounting_posting_receipt` int(11) DEFAULT NULL, + `accounting_posting_receipt_ext` int(11) DEFAULT NULL, + `accounting_posting_price` decimal(11,3) NOT NULL, + `accounting_posting_affiliation` datetime NOT NULL, + PRIMARY KEY (`accounting_posting_id`), + KEY `accounting_posting_batch` (`accounting_posting_batch`) + )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'accounting_posting` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'accounting_posting_ibfk_1` FOREIGN KEY (`accounting_posting_batch`) REFERENCES `' . $dbPool->get('core')->prefix . 'accounting_batch` (`accounting_batch_id`);' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'accounting_posting_ele` ( + `accounting_posting_ele_id` int(11) NOT NULL AUTO_INCREMENT, + `accounting_posting_ele_type` tinyint(1) NOT NULL, + `accounting_posting_ele_account` int(11) NOT NULL, + `accounting_posting_ele_value` decimal(11,3) NOT NULL, + `accounting_posting_ele_tax` tinyint(1) NOT NULL, + PRIMARY KEY (`accounting_posting_ele_id`), + KEY `accounting_posting_ele_account` (`accounting_posting_ele_account`) + )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'accounting_posting_ele` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'accounting_posting_ele_ibfk_1` FOREIGN KEY (`accounting_posting_ele_account`) REFERENCES `' . $dbPool->get('core')->prefix . 'accounting_account` (`accounting_account_id`);' + )->execute(); + + /* + * type = (offer, confirmation etc.) + * soptained = date of when we received the service/order (not the invoice) + * check = person who checked or is supposed to check the invoice + * checked = date of when the invoice got approved (no datetime = no approval) + * posting referes (direct) + * payment referes to this (indirect) + * status { + * blank + * received-ok + * received-notok + * checked-ok + * checked-notok + * posted-ok + * posted-notok + * payed-ok + * payed-notok + * } + */ + /* + * TODO: Purchasing can create. person who creates automatically get's permission for these to read. + * TODO: move to different module + */ + /* + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'accounting_invoices_process` ( + `AccountingInvoiceProcessID` int(11) NOT NULL AUTO_INCREMENT, + `media` int(11) DEFAULT NULL, + `type` tinyint(1) DEFAULT NULL, + `supplier` int(11) DEFAULT NULL, + `sname` varchar(32) DEFAULT NULL, + `optained` datetime NOT NULL, + `soptained` datetime NOT NULL, + `refnumber` varchar(24) NOT NULL, + `invoicedate` datetime NOT NULL, + `internalref` int(11) NOT NULL, + `due` datetime NOT NULL, + `duediscount` datetime NOT NULL, + `amount` decimal(11,3) NOT NULL, + `amountdiscount` decimal(11,3) NOT NULL, + `order` int(11) DEFAULT NULL, + `arrival` int(11) DEFAULT NULL, + `dnote` int(11) DEFAULT NULL, + PRIMARY KEY (`AccountingInvoiceProcessID`), + KEY `media` (`media`), + KEY `order` (`order`), + KEY `arrival` (`arrival`), + KEY `dnote` (`dnote`) + )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'accounting_invoices_process` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'accounting_invoices_process_ibfk_1` FOREIGN KEY (`media`) REFERENCES `' . $dbPool->get('core')->prefix . 'media` (`media_id`), + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'accounting_invoices_process_ibfk_2` FOREIGN KEY (`order`) REFERENCES `' . $dbPool->get('core')->prefix . 'purchase_invoices` (`PurchaseInvoiceID`), + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'accounting_invoices_process_ibfk_3` FOREIGN KEY (`arrival`) REFERENCES `' . $dbPool->get('core')->prefix . 'warehousing_arrival` (`WarehousingArrivalID`), + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'accounting_invoices_process_ibfk_4` FOREIGN KEY (`dnote`) REFERENCES `' . $dbPool->get('core')->prefix . 'purchase_dnote` (`PurchaseDnoteID`);' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'accounting_invoices_status` ( + `AccountingInvoiceStatusID` int(11) NOT NULL AUTO_INCREMENT, + `invoice` int(11) DEFAULT NULL, + `status` tinyint(1) DEFAULT NULL, + `person` int(11) DEFAULT NULL, + `changed` datetime DEFAULT NULL, + `info` varchar(256) NOT NULL, + PRIMARY KEY (`AccountingInvoiceStatusID`), + KEY `invoice` (`invoice`), + KEY `person` (`person`) + )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'accounting_invoices_status` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'accounting_invoices_status_ibfk_1` FOREIGN KEY (`invoice`) REFERENCES `' . $dbPool->get('core')->prefix . 'accounting_invoices_process` (`AccountingInvoiceProcessID`), + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'accounting_invoices_status_ibfk_2` FOREIGN KEY (`person`) REFERENCES `' . $dbPool->get('core')->prefix . 'account` (`account_id`);' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'accounting_invoices_process_permission` ( + `AccountingInvoiceProcessPermissionID` int(11) NOT NULL AUTO_INCREMENT, + `process` int(11) DEFAULT NULL, + `person` int(11) DEFAULT NULL, + `permission` int(11) DEFAULT NULL, + PRIMARY KEY (`AccountingInvoiceProcessPermissionID`), + KEY `person` (`person`), + KEY `process` (`process`) + )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'accounting_invoices_process_permission` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'accounting_invoices_process_permission_ibfk_1` FOREIGN KEY (`person`) REFERENCES `' . $dbPool->get('core')->prefix . 'account` (`account_id`), + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'accounting_invoices_process_permission_ibfk_2` FOREIGN KEY (`process`) REFERENCES `' . $dbPool->get('core')->prefix . 'accounting_invoices_process` (`AccountingInvoiceProcessID`);' + )->execute();*/ + break; + } + } +} diff --git a/Controller.php b/Controller.php new file mode 100644 index 0000000..5e71dc0 --- /dev/null +++ b/Controller.php @@ -0,0 +1,423 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting; + +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; + +/** + * Accounting class. + * + * @category Modules + * @package Framework + * @author OMS Development Team + * @author Dennis Eichhorn + * @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 = 'Accounting'; + + /** + * Localization files. + * + * @var \string + * @since 1.0.0 + */ + protected static $localization = [ + RequestDestination::BACKEND => ['backend'], + ]; + + /** + * Routing elements. + * + * @var array + * @since 1.0.0 + */ + protected static $routes = [ + '^.*/backend/accounting/personal/entries.*$' => [['dest' => '\Modules\Accounting\Controller:viewPersonalEntries', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/backend/accounting/impersonal/entries.*$' => [['dest' => '\Modules\Accounting\Controller:viewImpersonalEntries', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/backend/accounting/entries.*$' => [['dest' => '\Modules\Accounting\Controller:viewEntries', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + + '^.*/backend/accounting/impersonal/journal/list.*$' => [['dest' => '\Modules\Accounting\Controller:viewJournalList', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + + '^.*/backend/accounting/stack/list.*$' => [['dest' => '\Modules\Accounting\Controller:viewStackList', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/backend/accounting/stack/entries.*$' => [['dest' => '\Modules\Accounting\Controller:viewStackEntries', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/backend/accounting/stack/archive/list.*$' => [['dest' => '\Modules\Accounting\Controller:viewStackArchiveList', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/backend/accounting/stack/create.*$' => [['dest' => '\Modules\Accounting\Controller:viewStackCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + + '^.*/backend/accounting/gl/list.*$' => [['dest' => '\Modules\Accounting\Controller:viewGLList', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/backend/accounting/gl/create.*$' => [['dest' => '\Modules\Accounting\Controller:viewGLCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/backend/accounting/gl/profile.*$' => [['dest' => '\Modules\Accounting\Controller:viewGLProfile', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + + '^.*/backend/accounting/costobject/list.*$' => [['dest' => '\Modules\Accounting\Controller:viewCostObjectList', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/backend/accounting/costobject/create.*$' => [['dest' => '\Modules\Accounting\Controller:viewCostObjectCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/backend/accounting/costobject/profile.*$' => [['dest' => '\Modules\Accounting\Controller:viewCostObjectProfile', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + + '^.*/backend/accounting/costcenter/list.*$' => [['dest' => '\Modules\Accounting\Controller:viewCostCenterList', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/backend/accounting/costcenter/create.*$' => [['dest' => '\Modules\Accounting\Controller:viewCostCenterCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/backend/accounting/costcenter/profile.*$' => [['dest' => '\Modules\Accounting\Controller:viewCostCenterProfile', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + + '^.*/api/accounting/dun/print.*$' => [['dest' => '\Modules\Accounting\Controller:viewCostCenterProfile', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/api/accounting/statement/print.*$' => [['dest' => '\Modules\Accounting\Controller:viewCostCenterProfile', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/api/accounting/balances/print.*$' => [['dest' => '\Modules\Accounting\Controller:viewCostCenterProfile', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/api/accounting/accountform/print.*$' => [['dest' => '\Modules\Accounting\Controller:viewCostCenterProfile', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + ]; + + /** + * Providing. + * + * @var \string + * @since 1.0.0 + */ + protected static $providing = [ + 'Content', + ]; + + /** + * Dependencies. + * + * @var \string + * @since 1.0.0 + */ + protected static $dependencies = [ + 'Media', + ]; + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewEntries(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Accounting/Theme/backend/entries'); + $view->addData('nav', $this->createNavigation(1000104001, $request, $response)); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewJournalList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Accounting/Theme/backend/journal-list'); + $view->addData('nav', $this->createNavigation(1000104001, $request, $response)); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewStackList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Accounting/Theme/backend/stack-list'); + $view->addData('nav', $this->createNavigation(1002605001, $request, $response)); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewStackCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Accounting/Theme/backend/stack-create'); + $view->addData('nav', $this->createNavigation(1002605001, $request, $response)); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewStackEntries(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Accounting/Theme/backend/stack-entries'); + $view->addData('nav', $this->createNavigation(1002605001, $request, $response)); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewStackArchiveList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Accounting/Theme/backend/stack-archive-list'); + $view->addData('nav', $this->createNavigation(1002605001, $request, $response)); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewGLList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Accounting/Theme/backend/gl-list'); + $view->addData('nav', $this->createNavigation(1002602001, $request, $response)); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewGLCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Accounting/Theme/backend/gl-create'); + $view->addData('nav', $this->createNavigation(1002602001, $request, $response)); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewGLProfile(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Accounting/Theme/backend/gl-profile'); + $view->addData('nav', $this->createNavigation(1002602001, $request, $response)); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewCostObjectList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Accounting/Theme/backend/costobject-list'); + $view->addData('nav', $this->createNavigation(1002604001, $request, $response)); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewCostObjectCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Accounting/Theme/backend/costobject-create'); + $view->addData('nav', $this->createNavigation(1002604001, $request, $response)); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewCostObjectProfile(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Accounting/Theme/backend/costobject-profile'); + $view->addData('nav', $this->createNavigation(1002604001, $request, $response)); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewCostCenterList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Accounting/Theme/backend/costcenter-list'); + $view->addData('nav', $this->createNavigation(1002603001, $request, $response)); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewCostCenterCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Accounting/Theme/backend/costcenter-create'); + $view->addData('nav', $this->createNavigation(1002603001, $request, $response)); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewCostCenterProfile(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Accounting/Theme/backend/costcenter-profile'); + $view->addData('nav', $this->createNavigation(1002603001, $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 + */ + 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; + } +} diff --git a/Models/AccountAbstract.php b/Models/AccountAbstract.php new file mode 100644 index 0000000..4ee0bf1 --- /dev/null +++ b/Models/AccountAbstract.php @@ -0,0 +1,99 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + + +/** + * Account abstraction class. + * + * @category Module + * @package Accounting + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +abstract class AccountAbstract implements AccountInterface +{ + + /** + * Account ID. + * + * @var \int + * @since 1.0.0 + */ + protected $id = 0; + + /** + * Type. + * + * @var \Modules\Accounting\Models\AccountType + * @since 1.0.0 + */ + protected $type = null; + + /** + * Entry list. + * + * @var \Modules\Accounting\Models\EntryInterface[] + * @since 1.0.0 + */ + protected $entryList = 0; + + /** + * Constructor. + * + * @param \int $id Account ID + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function __construct($id) + { + $this->id = $id; + } + + /** + * Get entry. + * + * @param \int $id Entry ID + * + * @return void + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getEntryById($id) + { + } + + /** + * Get entry. + * + * @param \DateTime $start Interval start + * @param \DateTime $end Interval end + * @param \int $dateType + * + * @internal \Modules\Accounting\Models\TimeRangeType $dateTime Time range type + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getEntriesByDate($start, $end, $dateType = TimeRangeType::RECEIPT_DATE) + { + } +} diff --git a/Models/AccountBalance.php b/Models/AccountBalance.php new file mode 100644 index 0000000..a6d829d --- /dev/null +++ b/Models/AccountBalance.php @@ -0,0 +1,212 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + +/** + * Account balance class. + * + * @category Modules + * @package Modules\Accounting\Models + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +abstract class AccountBalance +{ + + /** + * Id. + * + * @var \int + * @since 1.0.0 + */ + private $id = null; + + /** + * Time range start. + * + * @var \DateTime + * @since 1.0.0 + */ + private $start = null; + + /** + * Time range end. + * + * @var \DateTime + * @since 1.0.0 + */ + private $end = null; + + /** + * Time range type. + * + * @var \Modules\Accounting\Models\TimeRangeType + * @since 1.0.0 + */ + private $rangetype = null; + + /** + * Account. + * + * @var \Modules\Accounting\Models\AccountInterface + * @since 1.0.0 + */ + private $account = null; + + /** + * Balance. + * + * @var \float + * @since 1.0.0 + */ + private $balance = null; + + /** + * Constructor. + * + * @param \int $id Account id + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function __construct(\int $id) + { + $this->id = $id; + } + + /** + * @return \DateTime + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getStart() + { + return $this->start; + } + + /** + * @param \DateTime $start + * + * @return void + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function setStart($start) + { + $this->start = $start; + } + + /** + * @return \DateTime + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getEnd() + { + return $this->end; + } + + /** + * @param \DateTime $end + * + * @return void + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function setEnd($end) + { + $this->end = $end; + } + + /** + * @return TimeRangeType + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getRangetype() + { + return $this->rangetype; + } + + /** + * @param TimeRangeType $rangetype + * + * @return void + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function setRangetype($rangetype) + { + $this->rangetype = $rangetype; + } + + /** + * @return AccountInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getAccount() + { + return $this->account; + } + + /** + * @param AccountInterface $account + * + * @return void + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function setAccount($account) + { + $this->account = $account; + } + + /** + * @return \float + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getBalance() + { + return $this->balance; + } + + /** + * @param \float $balance + * + * @return void + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function setBalance($balance) + { + $this->balance = $balance; + } +} diff --git a/Models/AccountInterface.php b/Models/AccountInterface.php new file mode 100644 index 0000000..62570a1 --- /dev/null +++ b/Models/AccountInterface.php @@ -0,0 +1,51 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + +/** + * Account interface. + * + * @category Module + * @package Accounting + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +interface AccountInterface +{ + + /** + * Get all groups. + * + * This function gets all groups in a range + * + * @return \float + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getBalance(); + + /** + * Close out account. + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function closeOut(); +} diff --git a/Models/AccountType.php b/Models/AccountType.php new file mode 100644 index 0000000..7372ae5 --- /dev/null +++ b/Models/AccountType.php @@ -0,0 +1,40 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + +use phpOMS\Datatypes\Enum; + +/** + * Account type enum. + * + * @category Modules + * @package Modules\Accounting + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +abstract class AccountType extends Enum +{ + const IMPERSONAL = 0; + + const PERSONAL = 1; + + const CREDITOR = 2; + + const DEBITOR = 3; +} diff --git a/Models/Balance.php b/Models/Balance.php new file mode 100644 index 0000000..7697a4b --- /dev/null +++ b/Models/Balance.php @@ -0,0 +1,156 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + +use phpOMS\Utils\IO\ExchangeInterface; + +/** + * Balance class. + * + * @category Modules + * @package Modules\Accounting\Models + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +abstract class Balance implements ExchangeInterface +{ + + /** + * ID. + * + * @var \int + * @since 1.0.0 + */ + private $id = 0; + + /** + * Date of the balance. + * + * @var \Datetime + * @since 1.0.0 + */ + private $date = null; + + /** + * Balance data. + * + * @var array + * @since 1.0.0 + */ + private $balance = [ + 'credit' => [ + 'capital' => [], + 'circulating' => [], + ], + 'debit' => [ + 'equity' => [], + 'debt' => [], + ], + ]; + + /** + * Constructor. + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function __construct() + { + } + + /** + * @return \int + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getId() + { + return $this->id; + } + + /** + * @param \int $id + * + * @return void + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function setId($id) + { + $this->id = $id; + } + + /** + * {@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) + { + } +} diff --git a/Models/BatchPosting.php b/Models/BatchPosting.php new file mode 100644 index 0000000..b2127c0 --- /dev/null +++ b/Models/BatchPosting.php @@ -0,0 +1,303 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + +use phpOMS\Utils\IO\ExchangeInterface; + +/** + * BatchPosting class. + * + * @category Module + * @package Accounting + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +class BatchPosting implements ExchangeInterface, \Countable +{ + + /** + * ID. + * + * @var \int + * @since 1.0.0 + */ + private $id = 0; + + /** + * Creator. + * + * @var \int + * @since 1.0.0 + */ + private $creator = null; + + /** + * Created. + * + * @var \Datetime + * @since 1.0.0 + */ + private $created = null; + + /** + * Description. + * + * @var \string + * @since 1.0.0 + */ + private $description = null; + + /** + * Postings. + * + * @var \Modules\Accounting\Models\PostingAbstract[] + * @since 1.0.0 + */ + private $postings = []; + + /** + * Constructor. + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function __construct() + { + } + + /** + * Get id. + * + * @return \int + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getId() + { + return $this->id; + } + + /** + * Set id. + * + * @param \int $id Batch ID + * + * @return void + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function setId($id) + { + $this->id = $id; + } + + /** + * Get description. + * + * @return \string + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getDescription() + { + return $this->description; + } + + /** + * Set description. + * + * @param \string $desc Description + * + * @return void + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function setDescription($desc) + { + } + + /** + * Get created. + * + * @return \Datetime + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getCreated() + { + return $this->created; + } + + /** + * Set creator. + * + * @param \Datetime $created Created + * + * @return void + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function setCreated($created) + { + $this->created = $created; + } + + /** + * Get creator. + * + * @return \int + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getCreator() + { + return $this->creator; + } + + /** + * Set creator. + * + * @param \int $creator Creator ID + * + * @return void + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function setCreator($creator) + { + $this->creator = $creator; + } + + /** + * Get posting. + * + * @param \int $id Posting ID + * + * @return \Modules\Accounting\Models\PostingAbstract + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getPosting($id) + { + return $this->postings[$id]; + } + + /** + * Remove posting. + * + * @param \int $id Posting ID + * + * @return void + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function removePosting($id) + { + unset($this->postings[$id]); + } + + /** + * Add posting. + * + * @param \Modules\Accounting\Models\PostingAbstract $posting Posting + * + * @return void + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function addPosting($posting) + { + $this->postings[] = $posting; + } + + /** + * {@inheritdoc} + */ + public function count() + { + return count($this->postings); + } + + /** + * {@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) + { + } +} diff --git a/Models/CostCenter.php b/Models/CostCenter.php new file mode 100644 index 0000000..e69de29 diff --git a/Models/CostObject.php b/Models/CostObject.php new file mode 100644 index 0000000..e69de29 diff --git a/Models/CreditPosting.php b/Models/CreditPosting.php new file mode 100644 index 0000000..e69de29 diff --git a/Models/Creditor.php b/Models/Creditor.php new file mode 100644 index 0000000..0844f53 --- /dev/null +++ b/Models/Creditor.php @@ -0,0 +1,99 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + +use phpOMS\Utils\IO\ExchangeInterface; + +/** + * Creditor class. + * + * @category Module + * @package Accounting + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +abstract class Creditor implements ExchangeInterface +{ + + /** + * Constructor. + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function __construct() + { + } + + /** + * {@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) + { + } +} diff --git a/Models/CreditorAccount.php b/Models/CreditorAccount.php new file mode 100644 index 0000000..ca4a982 --- /dev/null +++ b/Models/CreditorAccount.php @@ -0,0 +1,51 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + +use Modules\Accounting\Models\PersonalAccount; + +/** + * Creditor account class. + * + * @category Modules + * @package Modules\Accounting\Models + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +abstract class CreditorAccount extends PersonalAccount +{ + + /** + * Constructor. + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function __construct() + { + } + + public function getPDO() + { + } + + public function getDefault() + { + } +} diff --git a/Models/DebitPosting.php b/Models/DebitPosting.php new file mode 100644 index 0000000..e69de29 diff --git a/Models/Debitor.php b/Models/Debitor.php new file mode 100644 index 0000000..fdb61a0 --- /dev/null +++ b/Models/Debitor.php @@ -0,0 +1,99 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + +use phpOMS\Utils\IO\ExchangeInterface; + +/** + * Debitor class. + * + * @category Module + * @package Accounting + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +abstract class Debitor implements ExchangeInterface +{ + + /** + * Constructor. + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function __construct() + { + } + + /** + * {@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) + { + } +} diff --git a/Models/DebitorAccount.php b/Models/DebitorAccount.php new file mode 100644 index 0000000..b1fc8aa --- /dev/null +++ b/Models/DebitorAccount.php @@ -0,0 +1,55 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + +use Modules\Accounting\Models\PersonalAccount; + +/** + * DebitorAccount class. + * + * @category Modules + * @package Modules\Accounting\Models + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +abstract class DebitorAccount extends PersonalAccount +{ + + /** + * Constructor. + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function __construct() + { + } + + public function getDSO() + { + } + + public function getDefault() + { + } + + public function getNetReceivable() + { + } +} diff --git a/Models/EntryInterface.php b/Models/EntryInterface.php new file mode 100644 index 0000000..d7b90b0 --- /dev/null +++ b/Models/EntryInterface.php @@ -0,0 +1,31 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + +/** + * Entry interface. + * + * @category Modules + * @package Accounting + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +interface EntryInterface +{ +} diff --git a/Models/ImpersonalAccount.php b/Models/ImpersonalAccount.php new file mode 100644 index 0000000..d9bb07d --- /dev/null +++ b/Models/ImpersonalAccount.php @@ -0,0 +1,99 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + +use phpOMS\Utils\IO\ExchangeInterface; + +/** + * ImpersonalAccount class. + * + * @category Module + * @package Accounting + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +abstract class ImpersonalAccount implements ExchangeInterface +{ + + /** + * Constructor. + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function __construct() + { + } + + /** + * {@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) + { + } +} diff --git a/Models/IncomeStatement.php b/Models/IncomeStatement.php new file mode 100644 index 0000000..b480b15 --- /dev/null +++ b/Models/IncomeStatement.php @@ -0,0 +1,98 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + +use phpOMS\Utils\IO\ExchangeInterface; + +/** + * IncomeStatement class. + * + * @category Module + * @package Accounting + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +abstract class IncomeStatement implements ExchangeInterface +{ + private $id = 0; + + private $date = null; + + private $incomeStatement = []; + + public function __construct() + { + } + + /** + * {@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) + { + } +} diff --git a/Models/InvoicePosting.php b/Models/InvoicePosting.php new file mode 100644 index 0000000..5476a58 --- /dev/null +++ b/Models/InvoicePosting.php @@ -0,0 +1,99 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + + + +/** + * Invoice posting class. + * + * @category Module + * @package Accounting + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +abstract class InvoicePosting extends PostingAbstract +{ + + /** + * Constructor. + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function __construct() + { + } + + /** + * {@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) + { + } +} diff --git a/Models/InvoicePostingSimple.php b/Models/InvoicePostingSimple.php new file mode 100644 index 0000000..29c4444 --- /dev/null +++ b/Models/InvoicePostingSimple.php @@ -0,0 +1,99 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + + + +/** + * Invoice posting simple class. + * + * @category Module + * @package Accounting + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +abstract class InvoicePostingSimple extends PostingAbstract +{ + + /** + * Constructor. + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function __construct() + { + } + + /** + * {@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) + { + } +} diff --git a/Models/PersonalAccountAbstract.php b/Models/PersonalAccountAbstract.php new file mode 100644 index 0000000..a9ff829 --- /dev/null +++ b/Models/PersonalAccountAbstract.php @@ -0,0 +1,110 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + +use phpOMS\Utils\IO\ExchangeInterface; + +/** + * ImpersonalAccount class. + * + * @category Modules + * @package Modules\Accounting\Models + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +abstract class PersonalAccountAbstract extends AccountAbstract implements ExchangeInterface +{ + protected $id = 0; + + public function __construct() + { + } + + public function getBalance() + { + } + + public function getAccountsReceivable() + { + } + + public function getAccountsPayable() + { + } + + public function getAccountsHistory($start, $end) + { + } + + /** + * {@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) + { + } +} diff --git a/Models/Posting.php b/Models/Posting.php new file mode 100644 index 0000000..21da90e --- /dev/null +++ b/Models/Posting.php @@ -0,0 +1,99 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + + + +/** + * Posting class. + * + * @category Module + * @package Accounting + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +abstract class Posting extends PostingAbstract +{ + + /** + * Constructor. + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function __construct() + { + } + + /** + * {@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) + { + } +} diff --git a/Models/PostingAbstract.php b/Models/PostingAbstract.php new file mode 100644 index 0000000..08bcb2a --- /dev/null +++ b/Models/PostingAbstract.php @@ -0,0 +1,43 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + + + +/** + * Posting abstract class. + * + * @category Module + * @package Accounting + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +abstract class PostingAbstract implements PostingInterface +{ + + /** + * Constructor. + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function __construct() + { + } +} diff --git a/Models/PostingInterface.php b/Models/PostingInterface.php new file mode 100644 index 0000000..52a75b8 --- /dev/null +++ b/Models/PostingInterface.php @@ -0,0 +1,33 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + +use phpOMS\Utils\IO\ExchangeInterface; + +/** + * Posting interface. + * + * @category Modules + * @package Accounting + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +interface PostingInterface extends ExchangeInterface +{ +} diff --git a/Models/TimeRangeType.php b/Models/TimeRangeType.php new file mode 100644 index 0000000..91652f3 --- /dev/null +++ b/Models/TimeRangeType.php @@ -0,0 +1,37 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Accounting\Models; + +use phpOMS\Datatypes\Enum; + +/** + * Time range type enum. + * + * @category Modules + * @package Modules\Accounting\Models + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +abstract class TimeRangeType extends Enum +{ + const ENTRY_DATE = 0; /* Date of when the entry happened */ + const DUE_DATE = 1; /* Date of when the entry is due (only for invoices) */ + const RECEIPT_DATE = 2; /* Date of the receipt */ + const ASSOCIATED_DATE = 3; /* Date of the association (e.g. when did the articles arrive) */ +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..1ed818f --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Accounting # diff --git a/Theme/backend/costcenter-create.tpl.php b/Theme/backend/costcenter-create.tpl.php new file mode 100644 index 0000000..7a3517b --- /dev/null +++ b/Theme/backend/costcenter-create.tpl.php @@ -0,0 +1,33 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +echo $this->getData('nav')->render(); ?> + +
+

l11n->lang['Accounting']['CostCenter']; ?>

+
+
+ +
+
+
+
+
+
+
+
+
+
+
diff --git a/Theme/backend/costcenter-list.tpl.php b/Theme/backend/costcenter-list.tpl.php new file mode 100644 index 0000000..3d0628c --- /dev/null +++ b/Theme/backend/costcenter-list.tpl.php @@ -0,0 +1,52 @@ + + * @author Dennis Eichhorn + * @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(); ?> + +
+ + + + + + + $value) : $c++; + $url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/group/settings?id=' . $value->getId()); ?> + +
l11n->lang['Accounting']['CostCenters']; ?>
l11n->lang[0]['ID']; ?> + l11n->lang['Accounting']['Name']; ?> +
render(); ?> +
getId(); ?> + getName(); ?> + + + + + +
l11n->lang[0]['Empty']; ?> + +
+
diff --git a/Theme/backend/costcenter-profile.tpl.php b/Theme/backend/costcenter-profile.tpl.php new file mode 100644 index 0000000..ac22ab8 --- /dev/null +++ b/Theme/backend/costcenter-profile.tpl.php @@ -0,0 +1,16 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +echo $this->getData('nav')->render(); ?> diff --git a/Theme/backend/costobject-create.tpl.php b/Theme/backend/costobject-create.tpl.php new file mode 100644 index 0000000..9481eee --- /dev/null +++ b/Theme/backend/costobject-create.tpl.php @@ -0,0 +1,33 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +echo $this->getData('nav')->render(); ?> + +
+

l11n->lang['Accounting']['CostObject']; ?>

+
+
+ +
+
+
+
+
+
+
+
+
+
+
diff --git a/Theme/backend/costobject-list.tpl.php b/Theme/backend/costobject-list.tpl.php new file mode 100644 index 0000000..65c428c --- /dev/null +++ b/Theme/backend/costobject-list.tpl.php @@ -0,0 +1,52 @@ + + * @author Dennis Eichhorn + * @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(); ?> + +
+ + + + + + + $value) : $c++; + $url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/group/settings?id=' . $value->getId()); ?> + +
l11n->lang['Accounting']['CostObjects']; ?>
l11n->lang[0]['ID']; ?> + l11n->lang['Accounting']['Name']; ?> +
render(); ?> +
getId(); ?> + getName(); ?> + + + + + +
l11n->lang[0]['Empty']; ?> + +
+
diff --git a/Theme/backend/costobject-profile.tpl.php b/Theme/backend/costobject-profile.tpl.php new file mode 100644 index 0000000..ac22ab8 --- /dev/null +++ b/Theme/backend/costobject-profile.tpl.php @@ -0,0 +1,16 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +echo $this->getData('nav')->render(); ?> diff --git a/Theme/backend/entries.tpl.php b/Theme/backend/entries.tpl.php new file mode 100644 index 0000000..ac22ab8 --- /dev/null +++ b/Theme/backend/entries.tpl.php @@ -0,0 +1,16 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +echo $this->getData('nav')->render(); ?> diff --git a/Theme/backend/gl-create.tpl.php b/Theme/backend/gl-create.tpl.php new file mode 100644 index 0000000..432a660 --- /dev/null +++ b/Theme/backend/gl-create.tpl.php @@ -0,0 +1,33 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +echo $this->getData('nav')->render(); ?> + +
+

l11n->lang['Accounting']['GL']; ?>

+
+
+ +
+
+
+
+
+
+
+
+
+
+
diff --git a/Theme/backend/gl-list.tpl.php b/Theme/backend/gl-list.tpl.php new file mode 100644 index 0000000..b9348e1 --- /dev/null +++ b/Theme/backend/gl-list.tpl.php @@ -0,0 +1,52 @@ + + * @author Dennis Eichhorn + * @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(); ?> + +
+ + + + + + + $value) : $c++; + $url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/group/settings?id=' . $value->getId()); ?> + +
l11n->lang['Accounting']['GL']; ?>
l11n->lang[0]['ID']; ?> + l11n->lang['Accounting']['Name']; ?> +
render(); ?> +
getId(); ?> + getName(); ?> + + + + + +
l11n->lang[0]['Empty']; ?> + +
+
diff --git a/Theme/backend/gl-profile.tpl.php b/Theme/backend/gl-profile.tpl.php new file mode 100644 index 0000000..ac22ab8 --- /dev/null +++ b/Theme/backend/gl-profile.tpl.php @@ -0,0 +1,16 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +echo $this->getData('nav')->render(); ?> diff --git a/Theme/backend/journal-list.tpl.php b/Theme/backend/journal-list.tpl.php new file mode 100644 index 0000000..93a892a --- /dev/null +++ b/Theme/backend/journal-list.tpl.php @@ -0,0 +1,52 @@ + + * @author Dennis Eichhorn + * @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(); ?> + +
+ + + + + + + $value) : $c++; + $url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/group/settings?id=' . $value->getId()); ?> + +
l11n->lang['Accounting']['Journal']; ?>
l11n->lang[0]['ID']; ?> + l11n->lang['Accounting']['Name']; ?> +
render(); ?> +
getId(); ?> + getName(); ?> + + + + + +
l11n->lang[0]['Empty']; ?> + +
+
diff --git a/Theme/backend/stack-archive-list.tpl.php b/Theme/backend/stack-archive-list.tpl.php new file mode 100644 index 0000000..c5a28a0 --- /dev/null +++ b/Theme/backend/stack-archive-list.tpl.php @@ -0,0 +1,54 @@ + + * @author Dennis Eichhorn + * @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(); ?> + +
+ + + + + + + $value) : $c++; + $url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/group/settings?id=' . $value->getId()); ?> + +
l11n->lang['Accounting']['BatchPostings']; ?>
l11n->lang[0]['ID']; ?> + l11n->lang['Accounting']['Name']; ?> + l11n->lang['Accounting']['Creator']; ?> + l11n->lang['Accounting']['Created']; ?> +
render(); ?> +
getId(); ?> + getName(); ?> + + + + + +
l11n->lang[0]['Empty']; ?> + +
+
diff --git a/Theme/backend/stack-create.tpl.php b/Theme/backend/stack-create.tpl.php new file mode 100644 index 0000000..8227fd7 --- /dev/null +++ b/Theme/backend/stack-create.tpl.php @@ -0,0 +1,38 @@ + + * @author Dennis Eichhorn + * @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(); ?> + +
+

l11n->lang['Accounting']['Stack']; ?>

+
+
+ +
+
+
+
+
+
+
+
+
diff --git a/Theme/backend/stack-entries.tpl.php b/Theme/backend/stack-entries.tpl.php new file mode 100644 index 0000000..ac22ab8 --- /dev/null +++ b/Theme/backend/stack-entries.tpl.php @@ -0,0 +1,16 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +echo $this->getData('nav')->render(); ?> diff --git a/Theme/backend/stack-list.tpl.php b/Theme/backend/stack-list.tpl.php new file mode 100644 index 0000000..c5a28a0 --- /dev/null +++ b/Theme/backend/stack-list.tpl.php @@ -0,0 +1,54 @@ + + * @author Dennis Eichhorn + * @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(); ?> + +
+ + + + + + + $value) : $c++; + $url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/group/settings?id=' . $value->getId()); ?> + +
l11n->lang['Accounting']['BatchPostings']; ?>
l11n->lang[0]['ID']; ?> + l11n->lang['Accounting']['Name']; ?> + l11n->lang['Accounting']['Creator']; ?> + l11n->lang['Accounting']['Created']; ?> +
render(); ?> +
getId(); ?> + getName(); ?> + + + + + +
l11n->lang[0]['Empty']; ?> + +
+
diff --git a/Theme/lang/api.en.lang.php b/Theme/lang/api.en.lang.php new file mode 100644 index 0000000..eea62f6 --- /dev/null +++ b/Theme/lang/api.en.lang.php @@ -0,0 +1,17 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +$MODLANG[1] = [ +]; diff --git a/Theme/lang/backend.en.lang.php b/Theme/lang/backend.en.lang.php new file mode 100644 index 0000000..bf7a70b --- /dev/null +++ b/Theme/lang/backend.en.lang.php @@ -0,0 +1,32 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +$MODLANG['Accounting'] = [ + 'BatchPostings' => 'Batch Postings', + 'CostCenter' => 'Cost Center', + 'CostCenters' => 'Cost Centers', + 'CostObject' => 'Cost Object', + 'CostObjects' => 'Cost Objects', + 'Created' => 'Created', + 'Creator' => 'Creator', + 'Incoming' => 'Incoming', + 'GL' => 'GL', + 'Name' => 'Name', + 'Outgoing' => 'Outgoing', + 'Parent' => 'Parent', + 'Stack' => 'Stack', + 'TAccount' => 'T-Account', + 'Type' => 'Type', +]; diff --git a/Theme/lang/nav.backend.en.lang.php b/Theme/lang/nav.backend.en.lang.php new file mode 100644 index 0000000..8d0e9ce --- /dev/null +++ b/Theme/lang/nav.backend.en.lang.php @@ -0,0 +1,26 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +$MODLANG['Navigation'] = [ + 'Accounting' => 'Accounting', + 'AccountPostings' => 'Account Postings', + 'Balance' => 'Balance', + 'BatchPostings' => 'Batch Postings', + 'CostCenters' => 'Cost Centers', + 'CostObjects' => 'Cost Objects', + 'Creditors' => 'Creditors', + 'Debitors' => 'Debitors', + 'Postings' => 'Postings', +]; diff --git a/img/module_teaser_small.png b/img/module_teaser_small.png new file mode 100644 index 0000000..f56e6ff Binary files /dev/null and b/img/module_teaser_small.png differ diff --git a/info.json b/info.json new file mode 100644 index 0000000..3a73b35 --- /dev/null +++ b/info.json @@ -0,0 +1,51 @@ +{ + "name": { + "id": 1002600000, + "internal": "Accounting", + "external": "OMS Accounting" + }, + "version": "1.0.0", + "requirements": { + "phpOMS": "1.0.0", + "phpOMS-db": "1.0.0" + }, + "creator": { + "name": "Orange Management", + "website": "www.spl1nes.com" + }, + "description": "Accounting module.", + "directory": "Accounting", + "dependencies": {}, + "providing": { + "Navigation": "*" + }, + "load": [ + { + "pid": [ + "47e9d72449035cd040e0f93693fd0a925bf6e340" + ], + "type": 4, + "for": "Content", + "from": "Accounting", + "file": "Accounting" + }, + { + "pid": [ + "754a08ddf8bcb1cf22f310f09206dd783d42f7dd" + ], + "type": 5, + "from": "Accounting", + "for": "Navigation", + "file": "nav.backend" + }, + { + "pid": [ + "47e9d72449035cd040e0f93693fd0a925bf6e340" + ], + "type": 5, + "for": "Content", + "file": "backend", + "from": "Accounting" + } + ] +}