diff --git a/Admin/Activate.php b/Admin/Activate.php new file mode 100644 index 0000000..d24a778 --- /dev/null +++ b/Admin/Activate.php @@ -0,0 +1,44 @@ + + * @author Dennis Eichhorn + * @copyright Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Billing\Admin; + + +use phpOMS\DataStorage\Database\DatabasePool; +use phpOMS\Module\ActivateAbstract; +use phpOMS\Module\InfoManager; + +/** + * 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 Activate extends ActivateAbstract +{ + + /** + * {@inheritdoc} + */ + public static function activate(DatabasePool $dbPool, InfoManager $info) + { + parent::activate($dbPool, $info); + } +} diff --git a/Admin/Deactivate.php b/Admin/Deactivate.php new file mode 100644 index 0000000..8487d92 --- /dev/null +++ b/Admin/Deactivate.php @@ -0,0 +1,44 @@ + + * @author Dennis Eichhorn + * @copyright Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Billing\Admin; + + +use phpOMS\DataStorage\Database\DatabasePool; +use phpOMS\Module\DeactivateAbstract; +use phpOMS\Module\InfoManager; + +/** + * 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 Deactivate extends DeactivateAbstract +{ + + /** + * {@inheritdoc} + */ + public static function deactivate(DatabasePool $dbPool, InfoManager $info) + { + parent::deactivate($dbPool, $info); + } +} diff --git a/Admin/Install/ItemReference.php b/Admin/Install/ItemReference.php new file mode 100644 index 0000000..5af7a98 --- /dev/null +++ b/Admin/Install/ItemReference.php @@ -0,0 +1,51 @@ + + * @author Dennis Eichhorn + * @copyright Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Billing\Admin\Install; + +use phpOMS\DataStorage\Database\DatabaseType; +use phpOMS\DataStorage\Database\DatabasePool; + +/** + * Media addition 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 ItemReference +{ + + /** + * {@inheritdoc} + */ + public static function install(string $path, DatabasePool $dbPool, InfoManager $info) + { + + switch ($dbPool->get('core')->getType()) { + case DatabaseType::MYSQL: + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'billing_invoice_element` + ADD KEY `billing_invoice_element_article` (`billing_invoice_element_article`), + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'billing_invoice_element_ibfk_2` FOREIGN KEY (`billing_invoice_element_article`) REFERENCES `' . $dbPool->get('core')->prefix . 'itemreference` (`itemreference_id`);' + )->execute(); + break; + } + } +} diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json new file mode 100644 index 0000000..0143ded --- /dev/null +++ b/Admin/Install/Navigation.install.json @@ -0,0 +1,126 @@ +[ + { + "id": 1005104001, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 2, + "subtype": 1, + "name": "Billing", + "uri": "/{/lang}/backend/sales/invoice/list?{?}", + "target": "self", + "icon": null, + "order": 5, + "from": "Billing", + "permission": null, + "parent": 1001601001, + "children": [ + { + "id": 1005104101, + "pid": "722ef87be24d036db431dd65c0418e5502a6eb89", + "type": 3, + "subtype": 1, + "name": "List", + "uri": "/{/lang}/backend/sales/invoice/list?{?}", + "target": "self", + "icon": null, + "order": 1, + "from": "Billing", + "permission": null, + "parent": 1005104001, + "children": [ + { + "id": 1005104201, + "pid": "420c091bd6d9f5cd16b1d62569189feb707d6652", + "type": 3, + "subtype": 1, + "name": "Invoice", + "uri": "/{/lang}/backend/sales/invoice/single?{?}", + "target": "self", + "icon": null, + "order": 1, + "from": "Billing", + "permission": null, + "parent": 1005104101, + "children": [] + } + ] + }, + { + "id": 1005104301, + "pid": "722ef87be24d036db431dd65c0418e5502a6eb89", + "type": 3, + "subtype": 1, + "name": "Create", + "uri": "/{/lang}/backend/sales/invoice/create?{?}", + "target": "self", + "icon": null, + "order": 5, + "from": "Billing", + "permission": null, + "parent": 1005104001, + "children": [] + } + ] + }, + { + "id": 1005105001, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 2, + "subtype": 1, + "name": "Invoice", + "uri": "/{/lang}/backend/purchase/invoice/list?{?}", + "target": "self", + "icon": null, + "order": 5, + "from": "Invoice", + "permission": null, + "parent": 1002101001, + "children": [ + { + "id": 1005105101, + "pid": "475124021da7877ef311983bb9eb769b1bd94f22", + "type": 3, + "subtype": 1, + "name": "List", + "uri": "/{/lang}/backend/purchase/invoice/list?{?}", + "target": "self", + "icon": null, + "order": 1, + "from": "Billing", + "permission": null, + "parent": 1005105001, + "children": [ + { + "id": 1005105201, + "pid": "475124021da7877ef311983bb9eb769b1bd94f22", + "type": 3, + "subtype": 1, + "name": "Invoice", + "uri": "/{/lang}/backend/purchase/invoice/single?{?}", + "target": "self", + "icon": null, + "order": 1, + "from": "Billing", + "permission": null, + "parent": 1005105101, + "children": [] + } + ] + }, + { + "id": 1005105301, + "pid": "475124021da7877ef311983bb9eb769b1bd94f22", + "type": 3, + "subtype": 1, + "name": "Create", + "uri": "/{/lang}/backend/purchase/invoice/create?{?}", + "target": "self", + "icon": null, + "order": 5, + "from": "Billing", + "permission": null, + "parent": 1005105001, + "children": [] + } + ] + } +] diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php new file mode 100644 index 0000000..f1da5c7 --- /dev/null +++ b/Admin/Install/Navigation.php @@ -0,0 +1,40 @@ + + * @author Dennis Eichhorn + * @copyright Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Billing\Admin\Install; +use phpOMS\DataStorage\Database\DatabasePool; + +/** + * 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(string $path, DatabasePool $dbPool) + { + $navData = json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true); + + $class = '\\Modules\\Navigation\\Admin\\Installer'; + /** @var $class \Modules\Navigation\Admin\Installer */ + $class::installExternal($dbPool, $navData); + } +} diff --git a/Admin/Installer.php b/Admin/Installer.php new file mode 100644 index 0000000..ba3e864 --- /dev/null +++ b/Admin/Installer.php @@ -0,0 +1,117 @@ + + * @author Dennis Eichhorn + * @copyright Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Billing\Admin; + +use phpOMS\DataStorage\Database\DatabaseType; +use phpOMS\DataStorage\Database\DatabasePool; +use phpOMS\Module\InfoManager; +use phpOMS\Module\InstallerAbstract; + +/** + * Billing install class. + * + * @category Modules + * @package Modules\Billing + * @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(string $path, DatabasePool $dbPool, InfoManager $info) + { + parent::install($path, $dbPool, $info); + + switch ($dbPool->get('core')->getType()) { + case DatabaseType::MYSQL: + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'billing_invoice` ( + `billing_invoice_id` int(11) NOT NULL AUTO_INCREMENT, + `billing_invoice_status` tinyint(2) DEFAULT NULL, + `billing_invoice_shipTo` varchar(50) DEFAULT NULL, + `billing_invoice_shipFAO` varchar(30) DEFAULT NULL, + `billing_invoice_shipAddr` varchar(50) DEFAULT NULL, + `billing_invoice_shipCity` varchar(20) DEFAULT NULL, + `billing_invoice_shipZip` varchar(20) DEFAULT NULL, + `billing_invoice_shipCountry` varchar(30) DEFAULT NULL, + `billing_invoice_billTo` varchar(50) DEFAULT NULL, + `billing_invoice_billFAO` varchar(30) DEFAULT NULL, + `billing_invoice_billAddr` varchar(50) DEFAULT NULL, + `billing_invoice_billCity` varchar(20) DEFAULT NULL, + `billing_invoice_billZip` varchar(20) DEFAULT NULL, + `billing_invoice_billCountry` varchar(30) DEFAULT NULL, + `billing_invoice_type` tinyint(2) DEFAULT NULL, + `billing_invoice_created` datetime DEFAULT NULL, + `billing_invoice_shippdate` datetime DEFAULT NULL, + `billing_invoice_printed` datetime DEFAULT NULL, + `billing_invoice_price` decimal(9,2) DEFAULT NULL, + `billing_invoice_currency` varchar(3) DEFAULT NULL, + `billing_invoice_freightage` decimal(9,2) DEFAULT NULL, + `billing_invoice_info` text DEFAULT NULL, + `billing_invoice_voucher` int(11) DEFAULT NULL, + `billing_invoice_promotion` int(11) DEFAULT NULL, + `billing_invoice_creator` int(11) NOT NULL, + `billing_invoice_client` int(11) NOT NULL, + `billing_invoice_referer` int(11) DEFAULT NULL, + `billing_invoice_reference` int(11) DEFAULT NULL, + PRIMARY KEY (`billing_invoice_id`), + KEY `billing_invoice_creator` (`billing_invoice_creator`), + KEY `billing_invoice_client` (`billing_invoice_client`), + KEY `billing_invoice_referer` (`billing_invoice_referer`), + KEY `billing_invoice_reference` (`billing_invoice_reference`) + )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'billing_invoice` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'billing_invoice_ibfk_1` FOREIGN KEY (`billing_invoice_creator`) REFERENCES `' . $dbPool->get('core')->prefix . 'account` (`account_id`), + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'billing_invoice_ibfk_2` FOREIGN KEY (`billing_invoice_client`) REFERENCES `' . $dbPool->get('core')->prefix . 'account` (`account_id`), + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'billing_invoice_ibfk_3` FOREIGN KEY (`billing_invoice_referer`) REFERENCES `' . $dbPool->get('core')->prefix . 'account` (`account_id`), + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'billing_invoice_ibfk_4` FOREIGN KEY (`billing_invoice_reference`) REFERENCES `' . $dbPool->get('core')->prefix . 'billing_invoice` (`billing_invoice_id`);' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'billing_invoice_element` ( + `billing_invoice_element_id` int(11) NOT NULL AUTO_INCREMENT, + `billing_invoice_element_position` smallint(5) NOT NULL, + `billing_invoice_element_article` int(11) NOT NULL, + `billing_invoice_element_name` varchar(30) NOT NULL, + `billing_invoice_element_desc` text NOT NULL, + `billing_invoice_element_quantity` int(11) NOT NULL, + `billing_invoice_element_price` decimal(11,2) NOT NULL, + `billing_invoice_element_tax` decimal(5,2) NOT NULL, + `billing_invoice_element_discountp` decimal(5,2) NOT NULL, + `billing_invoice_element_discount` decimal(11,2) NOT NULL, + `billing_invoice_element_invoice` int(11) NOT NULL, + PRIMARY KEY (`billing_invoice_element_id`), + KEY `billing_invoice_element_invoice` (`billing_invoice_element_invoice`) + )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'billing_invoice_element` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'billing_invoice_element_ibfk_1` FOREIGN KEY (`billing_invoice_element_invoice`) REFERENCES `' . $dbPool->get('core')->prefix . 'billing_invoice` (`billing_invoice_id`);' + )->execute(); + break; + } + } +} diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php new file mode 100644 index 0000000..bdba282 --- /dev/null +++ b/Admin/Routes/Web/Backend.php @@ -0,0 +1,30 @@ + [ + [ + 'dest' => '\Modules\Billing\Controller:viewBillingInvoiceCreate', + 'verb' => RouteVerb::GET, + ], + ], + '^.*/backend/sales/invoice/list.*$' => [ + [ + 'dest' => '\Modules\Billing\Controller:viewBillingInvoiceList', + 'verb' => RouteVerb::GET, + ], + ], + '^.*/backend/purchase/invoice/create.*$' => [ + [ + 'dest' => '\Modules\Billing\Controller:viewBillingPurchaseInvoiceCreate', + 'verb' => RouteVerb::GET, + ], + ], + '^.*/backend/purchase/invoice/list.*$' => [ + [ + 'dest' => '\Modules\Billing\Controller:viewBillingPurchaInvoiceList', + 'verb' => RouteVerb::GET, + ], + ], +]; diff --git a/Admin/Routes/console.php b/Admin/Routes/console.php new file mode 100644 index 0000000..1ecbfac --- /dev/null +++ b/Admin/Routes/console.php @@ -0,0 +1,3 @@ + + * @author Dennis Eichhorn + * @copyright Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Billing\Admin; + + +use phpOMS\DataStorage\Database\DatabasePool; +use phpOMS\DataStorage\Database\Schema\Builder; +use phpOMS\Module\UninstallAbstract; + +/** + * 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 Uninstall extends UninstallAbstract +{ + + /** + * {@inheritdoc} + */ + public static function uninstall(DatabasePool $dbPool, InfoManager $info) + { + parent::uninstall($dbPool, $info); + + $query = new Builder($dbPool->get()); + + $query->prefix($dbPool->get('core')->getPrefix())->drop( + 'billing_invoice_element', + 'billing_invoice' + ); + + $dbPool->get()->con->prepare($query->toSql())->execute(); + } +} diff --git a/Admin/Update.php b/Admin/Update.php new file mode 100644 index 0000000..bf50cd0 --- /dev/null +++ b/Admin/Update.php @@ -0,0 +1,46 @@ + + * @author Dennis Eichhorn + * @copyright Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Billing\Admin; + + +use phpOMS\DataStorage\Database\DatabasePool; +use phpOMS\Module\UpdateAbstract; +use phpOMS\System\File\Directory; + +/** + * 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 Update extends UpdateAbstract +{ + + /** + * {@inheritdoc} + */ + public static function update(DatabasePool $dbPool, array $info) + { + Directory::deletePath(__DIR__ . '/Update'); + mkdir('Update'); + parent::update($dbPool, $info); + } +} diff --git a/Controller.php b/Controller.php new file mode 100644 index 0000000..b26c403 --- /dev/null +++ b/Controller.php @@ -0,0 +1,140 @@ + + * @author Dennis Eichhorn + * @copyright Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Billing; + +use Modules\Navigation\Models\Navigation; +use Modules\Navigation\Views\NavigationView; +use phpOMS\Contract\RenderableInterface; +use phpOMS\Message\RequestAbstract; +use phpOMS\Message\ResponseAbstract; +use phpOMS\Module\ModuleAbstract; +use phpOMS\Module\WebInterface; +use phpOMS\Views\View; +use phpOMS\Views\ViewLayout; + +/** + * Billing class. + * + * @category Modules + * @package Modules\Billing + * @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 path. + * + * @var string + * @since 1.0.0 + */ + /* public */ const MODULE_PATH = __DIR__; + + /** + * Module version. + * + * @var string + * @since 1.0.0 + */ + /* public */ const MODULE_VERSION = '1.0.0'; + + /** + * Module name. + * + * @var string + * @since 1.0.0 + */ + /* public */ const MODULE_NAME = 'Billing'; + + /** + * Providing. + * + * @var string + * @since 1.0.0 + */ + protected static $providing = []; + + /** + * Dependencies. + * + * @var string + * @since 1.0.0 + */ + protected static $dependencies = [ + ]; + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewBillingInvoiceList(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Billing/Theme/Backend/invoice-list'); + $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005104001, $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 viewBillingInvoiceCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Billing/Theme/Backend/invoice-create'); + $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005104001, $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 viewBillingPurchaInvoiceList(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Billing/Theme/Backend/purchase-invoice-list'); + $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005105001, $request, $response)); + + return $view; + } + +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..f5e456e --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Billing + +Sample invoices as selection for offers promotions etc. + +credit note by selecting invoice(s) via checkbox \ No newline at end of file diff --git a/Theme/Backend/Lang/Navigation.en.lang.php b/Theme/Backend/Lang/Navigation.en.lang.php new file mode 100644 index 0000000..e170710 --- /dev/null +++ b/Theme/Backend/Lang/Navigation.en.lang.php @@ -0,0 +1,18 @@ + + * @author Dennis Eichhorn + * @copyright Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +return ['Navigation' => [ + 'Billing' => 'Billing', +]]; diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php new file mode 100644 index 0000000..103242f --- /dev/null +++ b/Theme/Backend/Lang/en.lang.php @@ -0,0 +1,67 @@ + + * @author Dennis Eichhorn + * @copyright Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +return ['Billing' => [ + 'Address' => 'Address', + 'Addresses' => 'Addresses', + 'AlreadyPaid' => 'Already Paid', + 'Bonus' => 'Bonus', + 'Cashback' => 'Cash Back', + 'City' => 'City', + 'Client' => 'Client', + 'ClientID' => 'Client ID', + 'Confirmation' => 'Confirmation', + 'Country' => 'Country', + 'Created' => 'Created', + 'CreditCard' => 'CreditCard', + 'CreditNote' => 'Credit Note', + 'Date' => 'Date', + 'Delivery' => 'Delivery', + 'DeliveryNote' => 'Delivery Note', + 'DirectDebit' => 'DirectDebit', + 'Discount' => 'Discount', + 'DiscountP' => 'Discount %', + 'Due' => 'Due', + 'Freightage' => 'Freightage', + 'Gross' => 'Gross', + 'Invoice' => 'Invoice', + 'Invoices' => 'Invoices', + 'Item' => 'Item', + 'Items' => 'Items', + 'Log' => 'Log', + 'Logs' => 'Logs', + 'Media' => 'Media', + 'MoneyTransfer' => 'Money Transfer', + 'Name' => 'Name', + 'Net' => 'Net', + 'Offer' => 'Offer', + 'Payment' => 'Payment', + 'Prepaid' => 'Prepaid', + 'Price' => 'Price', + 'Quantity' => 'Quantity', + 'Recipient' => 'Recipient', + 'Select' => 'Select', + 'Shipment' => 'Shipment', + 'Source' => 'Source', + 'Supplier' => 'Supplier', + 'SupplierID' => 'Supplier ID', + 'Tax' => 'Tax', + 'TermsOfDelivery' => 'Terms Of Delivery', + 'Total' => 'Total', + 'Type' => 'Type', + 'Upload' => 'Upload', + 'Variation' => 'Variation', + 'Zip' => 'Zip', +]]; diff --git a/Theme/Backend/invoice-archive.tpl.php b/Theme/Backend/invoice-archive.tpl.php new file mode 100644 index 0000000..9e3f926 --- /dev/null +++ b/Theme/Backend/invoice-archive.tpl.php @@ -0,0 +1,19 @@ + + * @author Dennis Eichhorn + * @copyright 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(); ?> diff --git a/Theme/Backend/invoice-create.tpl.php b/Theme/Backend/invoice-create.tpl.php new file mode 100644 index 0000000..5bb007a --- /dev/null +++ b/Theme/Backend/invoice-create.tpl.php @@ -0,0 +1,245 @@ + + * @author Dennis Eichhorn + * @copyright 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(); ?> + +
+
+ +
+
+ +
+
+

getText('Invoice') ?>

+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+

getText('Invoice') ?>

+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+

getText('Delivery') ?>

+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ + + + + + + + +
getText('Invoice') ?>
+ getText('Item'); ?> + getText('Variation'); ?> + getText('Name'); ?> + getText('Quantity'); ?> + getText('Discount'); ?> + getText('DiscountP'); ?> + getText('Bonus'); ?> + getText('Tax'); ?> + getText('Net'); ?> +
+ getText('Freightage'); ?>: 0.00 - + getText('Net'); ?>: 0.00 - + getText('Tax'); ?>: 0.00 - + getText('Total'); ?>: 0.00 +
+ + + + + + + + + +
+
+
+ +
+
+

getText('Payment') ?>

+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+

getText('Media'); ?>

+ +
+
+ + +
+
+
+
+
+
+
+
+
+ +
+ app, $this->request, $this->response); + $footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig'); + $footerView->setPages(20); + $footerView->setPage(1); + ?> +
+ + + + + + + + +
getText('Logs') ?>
IP + getText('ID', 0, 0); ?> + getText('Name'); ?> + getText('Log'); ?> + getText('Date'); ?> +
render(); ?> +
request->getOrigin(); ?> + request->getAccount(); ?> + request->getAccount(); ?> + Create Invoice + format('Y-m-d H:i:s') ?> +
+
+
+
+
+ diff --git a/Theme/Backend/invoice-list.tpl.php b/Theme/Backend/invoice-list.tpl.php new file mode 100644 index 0000000..16cd308 --- /dev/null +++ b/Theme/Backend/invoice-list.tpl.php @@ -0,0 +1,47 @@ + + * @author Dennis Eichhorn + * @copyright Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ + +$footerView = new \Web\Views\Lists\PaginationView($this->app, $this->request, $this->response); +$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig'); +$footerView->setPages(20); +$footerView->setPage(1); + +echo $this->getData('nav')->render(); ?> + +
+ + + + + + + + $value) : $count++; ?> + + +
getText('Invoices') ?>
getText('ID', 0, 0); ?> + getText('Type'); ?> + getText('ClientID'); ?> + getText('Client'); ?> + getText('Net'); ?> + getText('Gross'); ?> + getText('Created'); ?> + getText('Due'); ?> +
render(); ?> +
getText('Empty', 0, 0); ?> + +
+
diff --git a/Theme/Backend/invoice-single.tpl.php b/Theme/Backend/invoice-single.tpl.php new file mode 100644 index 0000000..9e3f926 --- /dev/null +++ b/Theme/Backend/invoice-single.tpl.php @@ -0,0 +1,19 @@ + + * @author Dennis Eichhorn + * @copyright 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(); ?> diff --git a/Theme/Backend/purchase-invoice-list.tpl.php b/Theme/Backend/purchase-invoice-list.tpl.php new file mode 100644 index 0000000..7872f39 --- /dev/null +++ b/Theme/Backend/purchase-invoice-list.tpl.php @@ -0,0 +1,47 @@ + + * @author Dennis Eichhorn + * @copyright Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ + +$footerView = new \Web\Views\Lists\PaginationView($this->app, $this->request, $this->response); +$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig'); +$footerView->setPages(20); +$footerView->setPage(1); + +echo $this->getData('nav')->render(); ?> + +
+ + + + + + + + $value) : $count++; ?> + + +
getText('Invoices') ?>
getText('ID', 0, 0); ?> + getText('Type'); ?> + getText('SupplierID'); ?> + getText('Supplier'); ?> + getText('Net'); ?> + getText('Gross'); ?> + getText('Created'); ?> + getText('Due'); ?> +
render(); ?> +
getText('Empty', 0, 0); ?> + +
+
diff --git a/info.json b/info.json new file mode 100644 index 0000000..85755a8 --- /dev/null +++ b/info.json @@ -0,0 +1,45 @@ +{ + "name": { + "id": 1005100000, + "internal": "Billing", + "external": "OMS Accounts Receivable" + }, + "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": "Billing", + "dependencies": { + "Admin" : "1.0.0" + }, + "providing": { + "Navigation": "*" + }, + "load": [ + { + "pid": [ + "722ef87be24d036db431dd65c0418e5502a6eb89", + "475124021da7877ef311983bb9eb769b1bd94f22" + ], + "type": 4, + "for": 0, + "from": "Billing", + "file": "Billing" + }, + { + "pid": [ + "754a08ddf8bcb1cf22f310f09206dd783d42f7dd" + ], + "type": 5, + "from": "Billing", + "for": "Navigation", + "file": "Navigation" + } + ] +}