mirror of
https://github.com/Karaka-Management/oms-Billing.git
synced 2026-02-04 18:48:41 +00:00
Init
This commit is contained in:
commit
232fb3c9e9
51
Admin/Install/ItemReference.php
Normal file
51
Admin/Install/ItemReference.php
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace Modules\Billing\Admin\Install;
|
||||
|
||||
use phpOMS\DataStorage\Database\DatabaseType;
|
||||
use phpOMS\DataStorage\Database\Pool;
|
||||
|
||||
/**
|
||||
* Media addition class.
|
||||
*
|
||||
* @category Modules
|
||||
* @package Modules\Admin
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @license OMS License 1.0
|
||||
* @link http://orange-management.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class ItemReference
|
||||
{
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function install(Pool $dbPool, array $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;
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Admin/Install/Navigation.php
Normal file
38
Admin/Install/Navigation.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace Modules\Billing\Admin\Install;
|
||||
|
||||
/**
|
||||
* Navigation class.
|
||||
*
|
||||
* @category Modules
|
||||
* @package Modules\Admin
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @license OMS License 1.0
|
||||
* @link http://orange-management.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Navigation
|
||||
{
|
||||
public static function install($dbPool)
|
||||
{
|
||||
$navData = json_decode(file_get_contents(__DIR__ . '/nav.install.json'), true);
|
||||
|
||||
$class = '\\Modules\\Navigation\\Admin\\Installer';
|
||||
$class::installExternal($dbPool, $navData);
|
||||
}
|
||||
}
|
||||
64
Admin/Install/nav.install.json
Normal file
64
Admin/Install/nav.install.json
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
[
|
||||
{
|
||||
"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": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
116
Admin/Installer.php
Normal file
116
Admin/Installer.php
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace Modules\Billing\Admin;
|
||||
|
||||
use phpOMS\DataStorage\Database\DatabaseType;
|
||||
use phpOMS\DataStorage\Database\Pool;
|
||||
use phpOMS\Module\InstallerAbstract;
|
||||
|
||||
/**
|
||||
* Billing install class.
|
||||
*
|
||||
* @category Modules
|
||||
* @package Modules\Billing
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @license OMS License 1.0
|
||||
* @link http://orange-management.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Installer extends InstallerAbstract
|
||||
{
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function install(Pool $dbPool, array $info)
|
||||
{
|
||||
parent::install($dbPool, $info);
|
||||
|
||||
switch ($dbPool->get('core')->getType()) {
|
||||
case DatabaseType::MYSQL:
|
||||
$dbPool->get('core')->con->prepare(
|
||||
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . '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;
|
||||
}
|
||||
}
|
||||
}
|
||||
152
Controller.php
Normal file
152
Controller.php
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace Modules\Billing;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* Billing class.
|
||||
*
|
||||
* @category Modules
|
||||
* @package Modules\Billing
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @license OMS License 1.0
|
||||
* @link http://orange-management.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Controller extends ModuleAbstract implements WebInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* Module name.
|
||||
*
|
||||
* @var \string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $module = 'Billing';
|
||||
|
||||
/**
|
||||
* Localization files.
|
||||
*
|
||||
* @var \string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $localization = [
|
||||
RequestDestination::BACKEND => ['backend'],
|
||||
];
|
||||
|
||||
/**
|
||||
* Providing.
|
||||
*
|
||||
* @var \string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $providing = [
|
||||
'Content',
|
||||
];
|
||||
|
||||
/**
|
||||
* Dependencies.
|
||||
*
|
||||
* @var \string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $dependencies = [];
|
||||
|
||||
/**
|
||||
* Routing elements.
|
||||
*
|
||||
* @var array
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $routes = [
|
||||
'^.*/backend/sales/invoice/create.*$' => [['dest' => '\Modules\Billing\Controller:viewBillingInvoiceCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
|
||||
'^.*/backend/sales/invoice/list.*$' => [['dest' => '\Modules\Billing\Controller:viewBillingInvoiceList', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
|
||||
|
||||
'^.*/backend/purchase/invoice/create.*$' => [['dest' => '\Modules\Billing\Controller:viewBillingPurchaseInvoiceCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
|
||||
'^.*/backend/purchase/invoice/list.*$' => [['dest' => '\Modules\Billing\Controller:viewBillingPurchaInvoiceList', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
|
||||
];
|
||||
|
||||
/**
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
* @param mixed $data Generic data
|
||||
*
|
||||
* @return RenderableInterface
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function viewBillingInvoiceList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
||||
{
|
||||
$view = new View($this->app, $request, $response);
|
||||
$view->setTemplate('/Modules/Billing/Theme/backend/invoice-list');
|
||||
$view->addData('nav', $this->createNavigation(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 <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function viewBillingInvoiceCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
||||
{
|
||||
$view = new View($this->app, $request, $response);
|
||||
$view->setTemplate('/Modules/Billing/Theme/backend/invoice-create');
|
||||
$view->addData('nav', $this->createNavigation(1005104001, $request, $response));
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $pageId Page/parent Id for navigation
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
*
|
||||
* @return RenderableInterface
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
private function createNavigation(\int $pageId, RequestAbstract $request, ResponseAbstract $response)
|
||||
{
|
||||
$nav = Navigation::getInstance($request, $this->app->dbPool);
|
||||
$navView = new NavigationView($this->app, $request, $response);
|
||||
$navView->setTemplate('/Modules/Navigation/Theme/backend/mid');
|
||||
$navView->setNav($nav->getNav());
|
||||
$navView->setLanguage($request->getL11n()->language);
|
||||
$navView->setParent($pageId);
|
||||
|
||||
return $navView;
|
||||
}
|
||||
}
|
||||
5
README.md
Normal file
5
README.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Billing
|
||||
|
||||
Sample invoices as selection for offers promotions etc.
|
||||
|
||||
credit note by selecting invoice(s) via checkbox
|
||||
19
Theme/backend/invoice-archive.tpl.php
Normal file
19
Theme/backend/invoice-archive.tpl.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
153
Theme/backend/invoice-create.tpl.php
Normal file
153
Theme/backend/invoice-create.tpl.php
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<div class="tabular-2">
|
||||
<section class="box">
|
||||
<ul class="tab-links">
|
||||
<li><label for="c-tab-1"><?= $this->l11n->lang['Billing']['Invoice'] ?></label></li>
|
||||
<li><label for="c-tab-2"><?= $this->l11n->lang['Billing']['Items'] ?></label></li>
|
||||
</ul>
|
||||
</section>
|
||||
<div class="tab-content">
|
||||
<input type="radio" id="c-tab-1" name="tabular-2" checked>
|
||||
<div class="tab">
|
||||
<section class="box w-50 floatLeft">
|
||||
<h1><?= $this->l11n->lang['Billing']['Invoice'] ?></h1>
|
||||
<div class="inner">
|
||||
<form>
|
||||
<table class="layout wf-100">
|
||||
<tr><td><label for="iSource"><?= $this->l11n->lang['Billing']['Source'] ?></label>
|
||||
<tr><td><span class="input"><button><i class="fa fa-book"></i></button><input type="text" id="iSource" name="source"></span>
|
||||
<tr><td><label for="iType"><?= $this->l11n->lang['Billing']['Type'] ?></label>
|
||||
<tr><td><select id="iType" name="type">
|
||||
<option><?= $this->l11n->lang['Billing']['Invoice'] ?>
|
||||
<option><?= $this->l11n->lang['Billing']['Offer'] ?>
|
||||
<option><?= $this->l11n->lang['Billing']['Confirmation'] ?>
|
||||
<option><?= $this->l11n->lang['Billing']['DeliveryNote'] ?>
|
||||
<option><?= $this->l11n->lang['Billing']['CreditNote'] ?>
|
||||
</select>
|
||||
<tr><td><label for="iClient"><?= $this->l11n->lang['Billing']['Client'] ?></label>
|
||||
<tr><td><span class="input"><button><i class="fa fa-book"></i></button><input type="text" id="iClient" name="client"></span>
|
||||
<tr><td><label for="iDelivery"><?= $this->l11n->lang['Billing']['Delivery'] ?></label>
|
||||
<tr><td><input type="datetime-local" id="iDelivery" name="delivery">
|
||||
<tr><td><label for="iDue"><?= $this->l11n->lang['Billing']['Due'] ?></label>
|
||||
<tr><td><input type="datetime-local" id="iDue" name="due">
|
||||
<tr><td><label for="iFreightage"><?= $this->l11n->lang['Billing']['Freightage'] ?></label>
|
||||
<tr><td><input type="number" id="iFreightage" name="freightage">
|
||||
<tr><td><label for="iShipment"><?= $this->l11n->lang['Billing']['Shipment'] ?></label>
|
||||
<tr><td><select id="iShipment" name="shipment">
|
||||
<option>
|
||||
</select>
|
||||
<tr><td colspan="3"><input type="submit" value="<?= $this->l11n->lang[0]['Create'] ?>">
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="box w-50 floatLeft">
|
||||
<h1><?= $this->l11n->lang['Billing']['Invoice'] ?></h1>
|
||||
<div class="inner">
|
||||
<form>
|
||||
<table class="layout wf-100">
|
||||
<tr><td><label for="iAddressS"><?= $this->l11n->lang['Billing']['Addresses'] ?></label>
|
||||
<tr><td><select id="iAddressS" name="addressS">
|
||||
<option>
|
||||
</select>
|
||||
<tr><td><label for="iIRecipient"><?= $this->l11n->lang['Billing']['Recipient'] ?></label>
|
||||
<tr><td><input type="text" id="iIRecipient" name="irecipient">
|
||||
<tr><td><label for="iAddress"><?= $this->l11n->lang['Billing']['Address'] ?></label>
|
||||
<tr><td><input type="text" id="iAddress" name="address">
|
||||
<tr><td><label for="iZip"><?= $this->l11n->lang['Billing']['Zip'] ?></label>
|
||||
<tr><td><input type="text" id="iZip" name="zip">
|
||||
<tr><td><label for="iCity"><?= $this->l11n->lang['Billing']['City'] ?></label>
|
||||
<tr><td><input type="text" id="iCity" name="city">
|
||||
<tr><td><label for="iCountry"><?= $this->l11n->lang['Billing']['Country'] ?></label>
|
||||
<tr><td><input type="text" id="iCountry" name="country">
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="box w-50 floatLeft">
|
||||
<h1><?= $this->l11n->lang['Billing']['Delivery'] ?></h1>
|
||||
<div class="inner">
|
||||
<form>
|
||||
<table class="layout wf-100">
|
||||
<tr><td><label for="iAddressS"><?= $this->l11n->lang['Billing']['Addresses'] ?></label>
|
||||
<tr><td><select id="iAddressS" name="addressS">
|
||||
<option>
|
||||
</select>
|
||||
<tr><td><label for="iDRecipient"><?= $this->l11n->lang['Billing']['Recipient'] ?></label>
|
||||
<tr><td><input type="text" id="iDRecipient" name="drecipient">
|
||||
<tr><td><label for="iAddress"><?= $this->l11n->lang['Billing']['Address'] ?></label>
|
||||
<tr><td><input type="text" id="iAddress" name="address">
|
||||
<tr><td><label for="iZip"><?= $this->l11n->lang['Billing']['Zip'] ?></label>
|
||||
<tr><td><input type="text" id="iZip" name="zip">
|
||||
<tr><td><label for="iCity"><?= $this->l11n->lang['Billing']['City'] ?></label>
|
||||
<tr><td><input type="text" id="iCity" name="city">
|
||||
<tr><td><label for="iCountry"><?= $this->l11n->lang['Billing']['Country'] ?></label>
|
||||
<tr><td><input type="text" id="iCountry" name="country">
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<input type="radio" id="c-tab-2" name="tabular-2">
|
||||
<div class="tab">
|
||||
<section class="box w-100">
|
||||
<table class="table">
|
||||
<caption><?= $this->l11n->lang['Billing']['Invoice'] ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>
|
||||
<td><?= $this->l11n->lang['Billing']['Item']; ?>
|
||||
<td><?= $this->l11n->lang['Billing']['Variation']; ?>
|
||||
<td class="wf-100"><?= $this->l11n->lang['Billing']['Name']; ?>
|
||||
<td><?= $this->l11n->lang['Billing']['Quantity']; ?>
|
||||
<td><?= $this->l11n->lang['Billing']['Discount']; ?>
|
||||
<td><?= $this->l11n->lang['Billing']['DiscountP']; ?>
|
||||
<td><?= $this->l11n->lang['Billing']['Bonus']; ?>
|
||||
<td><?= $this->l11n->lang['Billing']['Tax']; ?>
|
||||
<td><?= $this->l11n->lang['Billing']['Net']; ?>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="8"><!-- todo: make this look nicer. even as alpha release this looks bad. -->
|
||||
<?= $this->l11n->lang['Billing']['Freightage']; ?>: 0.00 -
|
||||
<?= $this->l11n->lang['Billing']['Net']; ?>: 0.00 -
|
||||
<?= $this->l11n->lang['Billing']['Tax']; ?>: 0.00 -
|
||||
<?= $this->l11n->lang['Billing']['Total']; ?>: 0.00
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><i class="fa fa-plus"></i> <i class="fa fa-chevron-up"></i> <i class="fa fa-chevron-down"></i>
|
||||
<td><span class="input"><button><i class="fa fa-book"></i></button><input type="text" required></span>
|
||||
<td><span class="input"><button><i class="fa fa-book"></i></button><input type="text" required></span>
|
||||
<td><input type="text" required><!-- todo: make this textarea -->
|
||||
<td><input type="number" min="0" value="0" required>
|
||||
<td><input type="number" min="0">
|
||||
<td><input type="number" min="0" max="100" step="any">
|
||||
<td><input type="number" min="0" step="any">
|
||||
<td>
|
||||
<td>
|
||||
</table>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
47
Theme/backend/invoice-list.tpl.php
Normal file
47
Theme/backend/invoice-list.tpl.php
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
|
||||
$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(); ?>
|
||||
|
||||
<section class="box w-100">
|
||||
<table class="table">
|
||||
<caption><?= $this->l11n->lang['Billing']['Invoices'] ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->l11n->lang[0]['ID']; ?>
|
||||
<td><?= $this->l11n->lang['Billing']['Type']; ?>
|
||||
<td><?= $this->l11n->lang['Billing']['ClientID']; ?>
|
||||
<td class="wf-100"><?= $this->l11n->lang['Billing']['Client']; ?>
|
||||
<td><?= $this->l11n->lang['Billing']['Net']; ?>
|
||||
<td><?= $this->l11n->lang['Billing']['Gross']; ?>
|
||||
<td><?= $this->l11n->lang['Billing']['Created']; ?>
|
||||
<td><?= $this->l11n->lang['Billing']['Due']; ?>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="8"><?= $footerView->render(); ?>
|
||||
<tbody>
|
||||
<?php $count = 0; foreach([] as $key => $value) : $count++; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php if($count === 0) : ?>
|
||||
<tr><td colspan="8" class="empty"><?= $this->l11n->lang[0]['Empty']; ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</section>
|
||||
19
Theme/backend/invoice-single.tpl.php
Normal file
19
Theme/backend/invoice-single.tpl.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
51
Theme/lang/backend.en.lang.php
Normal file
51
Theme/lang/backend.en.lang.php
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
$MODLANG['Billing'] = [
|
||||
'Address' => 'Address',
|
||||
'Addresses' => 'Addresses',
|
||||
'Bonus' => 'Bonus',
|
||||
'City' => 'City',
|
||||
'Client' => 'Client',
|
||||
'ClientID' => 'Client ID',
|
||||
'Confirmation' => 'Confirmation',
|
||||
'Country' => 'Country',
|
||||
'Created' => 'Created',
|
||||
'CreditNote' => 'Credit Note',
|
||||
'Delivery' => 'Delivery',
|
||||
'DeliveryNote' => 'Delivery Note',
|
||||
'Discount' => 'Discount',
|
||||
'DiscountP' => 'Discount %',
|
||||
'Due' => 'Due',
|
||||
'Freightage' => 'Freightage',
|
||||
'Gross' => 'Gross',
|
||||
'Invoice' => 'Invoice',
|
||||
'Invoices' => 'Invoices',
|
||||
'Item' => 'Item',
|
||||
'Items' => 'Items',
|
||||
'Name' => 'Name',
|
||||
'Net' => 'Net',
|
||||
'Offer' => 'Offer',
|
||||
'Price' => 'Price',
|
||||
'Quantity' => 'Quantity',
|
||||
'Recipient' => 'Recipient',
|
||||
'Shipment' => 'Shipment',
|
||||
'Source' => 'Source',
|
||||
'Tax' => 'Tax',
|
||||
'Total' => 'Total',
|
||||
'Type' => 'Type',
|
||||
'Variation' => 'Variation',
|
||||
'Zip' => 'Zip',
|
||||
];
|
||||
18
Theme/lang/nav.backend.en.lang.php
Normal file
18
Theme/lang/nav.backend.en.lang.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
$MODLANG['Navigation'] = [
|
||||
'Billing' => 'Billing',
|
||||
];
|
||||
53
info.json
Normal file
53
info.json
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"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": {},
|
||||
"providing": {
|
||||
"Navigation": "*"
|
||||
},
|
||||
"load": [
|
||||
{
|
||||
"pid": [
|
||||
"722ef87be24d036db431dd65c0418e5502a6eb89",
|
||||
"475124021da7877ef311983bb9eb769b1bd94f22"
|
||||
],
|
||||
"type": 4,
|
||||
"for": 0,
|
||||
"from": "Billing",
|
||||
"file": "Billing"
|
||||
},
|
||||
{
|
||||
"pid": [
|
||||
"754a08ddf8bcb1cf22f310f09206dd783d42f7dd"
|
||||
],
|
||||
"type": 5,
|
||||
"from": "Billing",
|
||||
"for": "Navigation",
|
||||
"file": "nav.backend"
|
||||
},
|
||||
{
|
||||
"pid": [
|
||||
"722ef87be24d036db431dd65c0418e5502a6eb89",
|
||||
"475124021da7877ef311983bb9eb769b1bd94f22"
|
||||
],
|
||||
"type": 5,
|
||||
"for": "Content",
|
||||
"file": "backend",
|
||||
"from": "Billing"
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user