registration fixes

This commit is contained in:
Dennis Eichhorn 2023-03-24 16:20:21 +01:00
parent 44b4db558b
commit 083a86a28d
126 changed files with 538 additions and 352 deletions

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Admin\Install
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -23,7 +23,7 @@ use phpOMS\Application\ApplicationAbstract;
* Media class.
*
* @package Modules\Billing\Admin\Install
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -1,52 +1,64 @@
<?php
/**
* Karaka
*
* PHP Version 8.1
*
* @package Modules\Media
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
/** @var \phpOMS\Views\View $this */
require_once $this->getData('defaultTemplates')
->findFile('.pdf.php')
->getAbsolutePath();
$pdf = new DefaultPdf('P', 'mm', 'A4', true, 'UTF-8', false);
$creator = $this->getData('bill_creator') ?? 'Jingga';
$author = 'Jingga';
$title = $this->getData('bill_title') ?? 'Invoice';
$creator = $this->getData('bill_creator') ?? 'Jingga';
$author = 'Jingga';
$title = $this->getData('bill_title') ?? 'Invoice';
$subtitle = $this->getData('bill_subtitle') ?? 'Sub title';
$keywords = $this->getData('keywords') ?? [];
$logoName = $this->getData('bill_logo_name') ?? 'Jingga';
$slogan = $this->getData('bill_slogan') ?? 'Business solutions made simple.';
$legalCompanyName = $this->getData('legal_company_name') ?? 'Jingga e.K.';
$companyAddress = $this->getData('bill_company_address') ?? 'Gartenstr. 26';
$companyCity = $this->getData('bill_company_city') ?? '61206 Woellstadt';
$companyCEO = $this->getData('bill_company_ceo') ?? 'Dennis Eichhorn';
$companyWebsite = $this->getData('bill_company_website') ?? 'www.jingga.app';
$companyEmail = $this->getData('bill_company_email') ?? 'info@jingga.app';
$companyPhone = $this->getData('bill_company_phone') ?? '+49 0152 ????';
$companyAddress = $this->getData('bill_company_address') ?? 'Gartenstr. 26';
$companyCity = $this->getData('bill_company_city') ?? '61206 Woellstadt';
$companyCEO = $this->getData('bill_company_ceo') ?? 'Dennis Eichhorn';
$companyWebsite = $this->getData('bill_company_website') ?? 'www.jingga.app';
$companyEmail = $this->getData('bill_company_email') ?? 'info@jingga.app';
$companyPhone = $this->getData('bill_company_phone') ?? '+49 0152 ????';
$taxOffice = $this->getData('bill_company_tax_office') ?? 'HRB';
$taxId = $this->getData('bill_company_tax_id') ?? 'DE ?????????';
$vatId = $this->getData('bill_company_vat_id') ?? 'DE ??????';
$taxId = $this->getData('bill_company_tax_id') ?? 'DE ?????????';
$vatId = $this->getData('bill_company_vat_id') ?? 'DE ??????';
$bankName = $this->getData('bill_company_bank_name') ?? 'Volksbank Mittelhessen';
$bic = $this->getData('bill_company_bic') ?? '';
$iban = $this->getData('bill_company_iban') ?? '';
$bic = $this->getData('bill_company_bic') ?? '';
$iban = $this->getData('bill_company_iban') ?? '';
$billTypeName = $this->getData('bill_type_name') ?? 'INVOICE';
$billInvoiceNumber = $this->getData('bill_invoice_no') ?? '';
$billInvoiceDate = $this->getData('bill_invoice_date') ?? '';
$billServiceDate = $this->getData('bill_service_date') ?? '';
$billCustomerNo = $this->getData('bill_customer_no') ?? '';
$billPO = $this->getData('bill_po') ?? '';
$billDueDate = $this->getData('bill_due_date') ?? '';
$billInvoiceDate = $this->getData('bill_invoice_date') ?? '';
$billServiceDate = $this->getData('bill_service_date') ?? '';
$billCustomerNo = $this->getData('bill_customer_no') ?? '';
$billPO = $this->getData('bill_po') ?? '';
$billDueDate = $this->getData('bill_due_date') ?? '';
$invoiceLines = $this->getData('bill_lines') ?? [];
$paymentTerms = $this->getData('bill_payment_terms') ?? '';
$terms = $this->getData('bill_terms') ?? 'https://jingga.app/terms';
$taxes = $this->getData('bill_taxes') ?? ['19%' => '0.00'];
$currency = $this->getData('bill_currency') ?? 'EUR';
$terms = $this->getData('bill_terms') ?? 'https://jingga.app/terms';
$taxes = $this->getData('bill_taxes') ?? ['19%' => '0.00'];
$currency = $this->getData('bill_currency') ?? 'EUR';
// set document information
$pdf->SetCreator($creator);
@ -61,7 +73,7 @@ $pdf->SetImageScale(PDF_IMAGE_SCALE_RATIO);
$topPos = $pdf->getY();
// Address
$pdf->SetY(55); // @todo: depending on amount of lines
$pdf->SetY(55); // @todo: depending on amount of lines, there is a solution (html, or use backtracking of tcpdf)
$pdf->SetFont('helvetica', '', 8);
$lineHeight = $pdf->getY();
@ -126,8 +138,8 @@ $data = [
];
// Header
$w = array($pdf->getPageWidth() - 20 - 20 - 20 - 2*15, 20, 20, 20);
$num_headers = count($header);
$w = array($pdf->getPageWidth() - 20 - 20 - 20 - 2*15, 20, 20, 20);
$num_headers = \count($header);
$pdf->setCellPadding(1, 1, 1, 1);

View File

@ -5,7 +5,7 @@
"type": 2,
"subtype": 1,
"name": "Billing",
"uri": "{/lang}/{/app}/sales/bill/list",
"uri": "{/base}/sales/bill/list",
"target": "self",
"icon": null,
"order": 10,
@ -19,7 +19,7 @@
"type": 3,
"subtype": 1,
"name": "Open",
"uri": "{/lang}/{/app}/sales/bill/list",
"uri": "{/base}/sales/bill/list",
"target": "self",
"icon": null,
"order": 1,
@ -34,7 +34,7 @@
"type": 3,
"subtype": 1,
"name": "Archive",
"uri": "{/lang}/{/app}/sales/bill/archive",
"uri": "{/base}/sales/bill/archive",
"target": "self",
"icon": null,
"order": 5,
@ -49,7 +49,7 @@
"type": 3,
"subtype": 1,
"name": "Create",
"uri": "{/lang}/{/app}/sales/bill/create?{?}",
"uri": "{/base}/sales/bill/create?{?}",
"target": "self",
"icon": null,
"order": 10,
@ -66,7 +66,7 @@
"type": 2,
"subtype": 1,
"name": "Billing",
"uri": "{/lang}/{/app}/purchase/bill/list",
"uri": "{/base}/purchase/bill/list",
"target": "self",
"icon": null,
"order": 10,
@ -80,7 +80,7 @@
"type": 3,
"subtype": 1,
"name": "Open",
"uri": "{/lang}/{/app}/purchase/bill/list",
"uri": "{/base}/purchase/bill/list",
"target": "self",
"icon": null,
"order": 1,
@ -95,7 +95,7 @@
"type": 3,
"subtype": 1,
"name": "Archive",
"uri": "{/lang}/{/app}/purchase/bill/archive",
"uri": "{/base}/purchase/bill/archive",
"target": "self",
"icon": null,
"order": 5,
@ -110,7 +110,7 @@
"type": 3,
"subtype": 1,
"name": "Create",
"uri": "{/lang}/{/app}/purchase/bill/create?{?}",
"uri": "{/base}/purchase/bill/create?{?}",
"target": "self",
"icon": null,
"order": 10,
@ -125,7 +125,7 @@
"type": 3,
"subtype": 1,
"name": "Upload",
"uri": "{/lang}/{/app}/purchase/bill/upload?{?}",
"uri": "{/base}/purchase/bill/upload?{?}",
"target": "self",
"icon": null,
"order": 15,
@ -142,7 +142,7 @@
"type": 2,
"subtype": 1,
"name": "Billing",
"uri": "{/lang}/{/app}/warehouse/bill/list",
"uri": "{/base}/warehouse/bill/list",
"target": "self",
"icon": null,
"order": 5,
@ -156,7 +156,7 @@
"type": 3,
"subtype": 1,
"name": "List",
"uri": "{/lang}/{/app}/warehouse/bill/list",
"uri": "{/base}/warehouse/bill/list",
"target": "self",
"icon": null,
"order": 1,
@ -171,7 +171,7 @@
"type": 3,
"subtype": 1,
"name": "Archive",
"uri": "{/lang}/{/app}/warehouse/bill/archive",
"uri": "{/base}/warehouse/bill/archive",
"target": "self",
"icon": null,
"order": 1,
@ -186,7 +186,7 @@
"type": 3,
"subtype": 1,
"name": "Create",
"uri": "{/lang}/{/app}/warehouse/bill/create?{?}",
"uri": "{/base}/warehouse/bill/create?{?}",
"target": "self",
"icon": null,
"order": 5,
@ -203,7 +203,7 @@
"type": 3,
"subtype": 1,
"name": "Bill",
"uri": "{/lang}/{/app}/sales/analysis/bill",
"uri": "{/base}/sales/analysis/bill",
"target": "self",
"icon": null,
"order": 15,
@ -218,7 +218,7 @@
"type": 3,
"subtype": 1,
"name": "Bill",
"uri": "{/lang}/{/app}/purchase/analysis/bill",
"uri": "{/base}/purchase/analysis/bill",
"target": "self",
"icon": null,
"order": 15,
@ -233,7 +233,7 @@
"type": 2,
"subtype": 1,
"name": "Purchase",
"uri": "{/lang}/{/app}/private/purchase/billing/dashboard?{?}",
"uri": "{/base}/private/purchase/billing/dashboard?{?}",
"target": "self",
"icon": null,
"order": 5,
@ -247,7 +247,7 @@
"type": 3,
"subtype": 1,
"name": "List",
"uri": "{/lang}/{/app}/private/purchase/billing/dashboard?{?}",
"uri": "{/base}/private/purchase/billing/dashboard?{?}",
"target": "self",
"icon": null,
"order": 1,
@ -263,7 +263,7 @@
"type": 3,
"subtype": 1,
"name": "Upload",
"uri": "{/lang}/{/app}/private/purchase/billing/upload?{?}",
"uri": "{/base}/private/purchase/billing/upload?{?}",
"target": "self",
"icon": null,
"order": 5,

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Admin\Install
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -20,7 +20,7 @@ use phpOMS\Application\ApplicationAbstract;
* Navigation class.
*
* @package Modules\Billing\Admin\Install
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Admin\Install
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -22,7 +22,7 @@ use phpOMS\DataStorage\Database\Schema\Builder;
* WarehouseManagement class.
*
* @package Modules\Billing\Admin\Install
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Admin\Install
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -20,7 +20,7 @@ use phpOMS\Application\ApplicationAbstract;
* Workflow class.
*
* @package Modules\Billing\Admin\Install
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -30,7 +30,7 @@ use phpOMS\Uri\HttpUri;
* Installer class.
*
* @package Modules\Billing\Admin
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
@ -226,6 +226,16 @@ final class Installer extends InstallerAbstract
return $billAttrValue;
}
/**
* Create tax combinations (item & client/supplier)
*
* @param ApplicationAbstract $app Application
* @param array $taxes Tax data
*
* @return array<string, array>
*
* @since 1.0.0
*/
private static function createTaxCombination(ApplicationAbstract $app, array $taxes) : array
{
$result = [];
@ -233,12 +243,26 @@ final class Installer extends InstallerAbstract
/** @var \Modules\Billing\Controller\ApiController $module */
$module = $app->moduleManager->getModuleInstance('Billing');
$itemAttributeSales = ItemAttributeTypeMapper::get()->with('defaults')->where('name', 'sales_tax_code')->execute();
$clientAttributeSales = ClientAttributeTypeMapper::get()->with('defaults')->where('name', 'sales_tax_code')->execute();
$supplierAttributeSales = SupplierAttributeTypeMapper::get()->with('defaults')->where('name', 'purchase_tax_code')->execute();
/** @var \Modules\ItemManagement\Models\ItemAttributeType $itemAttributeSales */
$itemAttributeSales = ItemAttributeTypeMapper::get()
->with('defaults')
->where('name', 'sales_tax_code')
->execute();
/** @var \Modules\ClientManagement\Models\ClientAttributeType $clientAttributeSales */
$clientAttributeSales = ClientAttributeTypeMapper::get()
->with('defaults')
->where('name', 'sales_tax_code')
->execute();
/** @var \Modules\SupplierManagement\Models\SupplierAttributeType $supplierAttributeSales */
$supplierAttributeSales = SupplierAttributeTypeMapper::get()
->with('defaults')
->where('name', 'purchase_tax_code')
->execute();
foreach ($taxes as $tax) {
$itemValue = $itemAttributeSales->getDefaultByValue($tax['item_code']);
$itemValue = $itemAttributeSales->getDefaultByValue($tax['item_code']);
$accountValue = $tax['type'] === 1
? $clientAttributeSales->getDefaultByValue($tax['account_code'])
: $supplierAttributeSales->getDefaultByValue($tax['account_code']);

View File

@ -6,7 +6,7 @@
*
* @package Modules
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -20,7 +20,7 @@ use phpOMS\Module\StatusAbstract;
* Status class.
*
* @package Modules\Billing\Admin
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -20,7 +20,7 @@ use phpOMS\Module\UninstallerAbstract;
* Uninstaller class.
*
* @package Modules\Billing\Admin
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -20,7 +20,7 @@ use phpOMS\Module\UpdaterAbstract;
* Updater class.
*
* @package Modules\Billing\Admin
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -1,5 +1,4 @@
<?php
/**
* Karaka
*
@ -7,11 +6,10 @@
*
* @package Modules\Billing
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
namespace Modules\Billing\Controller;
@ -38,7 +36,7 @@ use phpOMS\Model\Message\FormValidation;
* Billing class.
*
* @package Modules\Billing
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
@ -87,7 +85,7 @@ final class ApiAttributeController extends Controller
$attribute->bill = (int) $request->getData('bill');
$attribute->type = new NullBillAttributeType((int) $request->getData('type'));
if ($request->getData('value') !== null) {
if ($request->hasData('value')) {
$attribute->value = new NullBillAttributeValue((int) $request->getData('value'));
} else {
$newRequest = clone $request;
@ -162,11 +160,11 @@ final class ApiAttributeController extends Controller
private function createBillAttributeTypeL11nFromRequest(RequestAbstract $request) : BaseStringL11n
{
$attrL11n = new BaseStringL11n();
$attrL11n->ref = (int) ($request->getData('type') ?? 0);
$attrL11n->setLanguage((string) (
$request->getData('language') ?? $request->getLanguage()
));
$attrL11n->content = (string) ($request->getData('title') ?? '');
$attrL11n->ref = $request->getDataInt('type') ?? 0;
$attrL11n->setLanguage(
$request->getDataString('language') ?? $request->getLanguage()
);
$attrL11n->content = $request->getDataString('title') ?? '';
return $attrL11n;
}
@ -231,13 +229,13 @@ final class ApiAttributeController extends Controller
*/
private function createBillAttributeTypeFromRequest(RequestAbstract $request) : BillAttributeType
{
$attrType = new BillAttributeType($request->getData('name') ?? '');
$attrType->datatype = (int) ($request->getData('datatype') ?? 0);
$attrType->custom = (bool) ($request->getData('custom') ?? false);
$attrType = new BillAttributeType($request->getDataString('name') ?? '');
$attrType->datatype = $request->getDataInt('datatype') ?? 0;
$attrType->custom = $request->getDataBool('custom') ?? false;
$attrType->isRequired = (bool) ($request->getData('is_required') ?? false);
$attrType->validationPattern = (string) ($request->getData('validation_pattern') ?? '');
$attrType->setL11n((string) ($request->getData('title') ?? ''), $request->getData('language') ?? ISO639x1Enum::_EN);
$attrType->setFields((int) ($request->getData('fields') ?? 0));
$attrType->validationPattern = $request->getDataString('validation_pattern') ?? '';
$attrType->setL11n($request->getDataString('title') ?? '', $request->getDataString('language') ?? ISO639x1Enum::_EN);
$attrType->setFields($request->getDataInt('fields') ?? 0);
return $attrType;
}
@ -313,15 +311,15 @@ final class ApiAttributeController extends Controller
{
/** @var BillAttributeType $type */
$type = BillAttributeTypeMapper::get()
->where('id', (int) ($request->getData('type') ?? 0))
->where('id', $request->getDataInt('type') ?? 0)
->execute();
$attrValue = new BillAttributeValue();
$attrValue->isDefault = (bool) ($request->getData('default') ?? false);
$attrValue->isDefault = $request->getDataBool('default') ?? false;
$attrValue->setValue($request->getData('value'), $type->datatype);
if ($request->getData('title') !== null) {
$attrValue->setL11n($request->getData('title'), $request->getData('language') ?? ISO639x1Enum::_EN);
if ($request->hasData('title')) {
$attrValue->setL11n($request->getDataString('title') ?? '', $request->getDataString('language') ?? ISO639x1Enum::_EN);
}
return $attrValue;
@ -387,11 +385,11 @@ final class ApiAttributeController extends Controller
private function createBillAttributeValueL11nFromRequest(RequestAbstract $request) : BaseStringL11n
{
$attrL11n = new BaseStringL11n();
$attrL11n->ref = (int) ($request->getData('value') ?? 0);
$attrL11n->setLanguage((string) (
$request->getData('language') ?? $request->getLanguage()
));
$attrL11n->content = (string) ($request->getData('title') ?? '');
$attrL11n->ref = $request->getDataInt('value') ?? 0;
$attrL11n->setLanguage(
$request->getDataString('language') ?? $request->getLanguage()
);
$attrL11n->content = $request->getDataString('title') ?? '';
return $attrL11n;
}

View File

@ -7,7 +7,7 @@
*
* @package Modules\Billing
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -48,7 +48,7 @@ use phpOMS\Views\View;
* Billing class.
*
* @package Modules\Billing
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
@ -169,17 +169,17 @@ final class ApiBillController extends Controller
{
/** @var \Modules\ClientManagement\Models\Client|\Modules\SupplierManagement\Models\Supplier $account */
$account = null;
if ($request->getData('client') !== null) {
if ($request->hasData('client')) {
/** @var \Modules\ClientManagement\Models\Client $account */
$account = ClientMapper::get()
->with('account')
->with('mainAddress')
->where('id', (int) $request->getData('client'))
->execute();
} elseif (((int) ($request->getData('supplier') ?? -1)) === 0) {
} elseif (($request->getDataInt('supplier') ?? -1) === 0) {
/** @var \Modules\SupplierManagement\Models\Supplier $account */
$account = new NullSupplier();
} elseif ($request->getData('supplier') !== null) {
} elseif ($request->hasData('supplier')) {
/** @var \Modules\SupplierManagement\Models\Supplier $account */
$account = SupplierMapper::get()
->with('account')
@ -190,7 +190,7 @@ final class ApiBillController extends Controller
/** @var \Modules\Billing\Models\BillType $billType */
$billType = BillTypeMapper::get()
->where('id', (int) ($request->getData('type') ?? 1))
->where('id', $request->getDataInt('type') ?? 1)
->execute();
/* @var \Modules\Account\Models\Account $account */
@ -214,7 +214,7 @@ final class ApiBillController extends Controller
$bill->client = !$request->hasData('client') ? null : $account;
$bill->supplier = !$request->hasData('supplier') ? null : $account;
$bill->performanceDate = new \DateTime($request->getData('performancedate') ?? 'now');
$bill->setStatus((int) ($request->getData('status') ?? BillStatus::ACTIVE));
$bill->setStatus($request->getDataInt('status') ?? BillStatus::ACTIVE);
return $bill;
}
@ -233,8 +233,8 @@ final class ApiBillController extends Controller
$val = [];
if (($val['client/supplier'] = (empty($request->getData('client'))
&& (empty($request->getData('supplier'))
&& ((int) ($request->getData('supplier') ?? -1) !== 0)
)))
&& ($request->getDataInt('supplier') ?? -1) !== 0)
))
|| ($val['type'] = (empty($request->getData('type'))))
) {
return $val;
@ -299,7 +299,7 @@ final class ApiBillController extends Controller
$this->createModelRelation(
$request->header->account,
$media->getId(),
$request->getData('type', 'int'),
$request->getDataInt('type'),
MediaMapper::class,
'types',
'',
@ -440,7 +440,7 @@ final class ApiBillController extends Controller
{
$element = new BillElement();
$element->bill = (int) $request->getData('bill');
$element->item = (int) ($request->getData('item') ?? 0);
$element->item = $request->getDataInt('item') ?? 0;
if ($element->item === null) {
return $element;
@ -457,9 +457,9 @@ final class ApiBillController extends Controller
$element->itemNumber = $item->number;
$element->itemName = $item->getL11n('name1')->description;
$element->quantity = (int) ($request->getData('quantity') ?? 0);
$element->quantity = $request->getDataInt('quantity') ?? 0;
$element->singleSalesPriceNet = new Money($request->getData('singlesalespricenet', 'int') ?? $item->salesPrice->getInt());
$element->singleSalesPriceNet = new Money($request->getDataInt('singlesalespricenet') ?? $item->salesPrice->getInt());
$element->totalSalesPriceNet = clone $element->singleSalesPriceNet;
$element->totalSalesPriceNet->mult($element->quantity);
@ -528,6 +528,8 @@ final class ApiBillController extends Controller
$templateId = $request->getData('bill_template', 'int');
if ($templateId === null) {
$billTypeId = $request->getData('bill_type', 'int');
/** @var \Modules\Billing\Models\BillType $billType */
$billType = BillTypeMapper::get()
->where('id', $billTypeId)
->execute();
@ -535,6 +537,7 @@ final class ApiBillController extends Controller
$templateId = $billType->defaultTemplate->getId();
}
/** @var \Modules\Media\Models\Collection $template */
$template = CollectionMapper::get()
->with('sources')
->where('id', $templateId)
@ -547,6 +550,7 @@ final class ApiBillController extends Controller
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/' . \substr($template->getSourceByName('bill.pdf.php')->getPath(), 0, -8), 'pdf.php');
/** @var \Model\Setting[] $settings */
$settings = $this->app->appSettings->get(null,
[
AdminSettingsEnum::DEFAULT_TEMPLATES,
@ -556,9 +560,8 @@ final class ApiBillController extends Controller
module: 'Admin'
);
$postKey = '::' . $this->app->unitId . ':Admin';
if ($settings === false) {
/** @var \Model\Setting[] $settings */
$settings = $this->app->appSettings->get(null,
[
AdminSettingsEnum::DEFAULT_TEMPLATES,
@ -567,18 +570,18 @@ final class ApiBillController extends Controller
unit: null,
module: 'Admin'
);
$postKey = ':::Admin';
}
/** @var \Modules\Media\Models\Collection $defaultTemplates */
$defaultTemplates = CollectionMapper::get()
->with('sources')
->where('id', (int) $settings[AdminSettingsEnum::DEFAULT_TEMPLATES . $postKey]->content)
->where('id', (int) $settings[AdminSettingsEnum::DEFAULT_TEMPLATES]->content)
->execute();
/** @var \Modules\Media\Models\Collection $defaultAssets */
$defaultAssets = CollectionMapper::get()
->with('sources')
->where('id', (int) $settings[AdminSettingsEnum::DEFAULT_ASSETS . $postKey]->content)
->where('id', (int) $settings[AdminSettingsEnum::DEFAULT_ASSETS]->content)
->execute();
$view->setData('defaultTemplates', $defaultTemplates);
@ -653,12 +656,14 @@ final class ApiBillController extends Controller
/** @var \Modules\Billing\Models\Bill $bill */
$bill = BillMapper::get()
->with('elements')
->where('id', $request->getData('bill') ?? 0)
->where('id', $request->getDataInt('bill') ?? 0)
->execute();
$templateId = $request->getData('bill_template', 'int');
$templateId = $request->getDataInt('bill_template');
if ($templateId === null) {
$billTypeId = $bill->type->getId();
/** @var \Modules\Billing\Models\BillType $billType */
$billType = BillTypeMapper::get()
->where('id', $billTypeId)
->execute();
@ -666,6 +671,7 @@ final class ApiBillController extends Controller
$templateId = $billType->defaultTemplate->getId();
}
/** @var \Modules\Media\Models\Collection $template */
$template = CollectionMapper::get()
->with('sources')
->where('id', $templateId)
@ -676,6 +682,7 @@ final class ApiBillController extends Controller
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/' . \substr($template->getSourceByName('bill.pdf.php')->getPath(), 0, -8), 'pdf.php');
/** @var \Model\Setting[] $settings */
$settings = $this->app->appSettings->get(null,
[
AdminSettingsEnum::DEFAULT_TEMPLATES,
@ -685,9 +692,8 @@ final class ApiBillController extends Controller
module: 'Admin'
);
$postKey = '::' . $this->app->unitId . ':Admin';
if ($settings === false) {
/** @var \Model\Setting[] $settings */
$settings = $this->app->appSettings->get(null,
[
AdminSettingsEnum::DEFAULT_TEMPLATES,
@ -696,18 +702,18 @@ final class ApiBillController extends Controller
unit: null,
module: 'Admin'
);
$postKey = ':::Admin';
}
/** @var \Modules\Media\Models\Collection $defaultTemplates */
$defaultTemplates = CollectionMapper::get()
->with('sources')
->where('id', (int) $settings[AdminSettingsEnum::DEFAULT_TEMPLATES . $postKey]->content)
->where('id', (int) $settings[AdminSettingsEnum::DEFAULT_TEMPLATES]->content)
->execute();
/** @var \Modules\Media\Models\Collection $defaultAssets */
$defaultAssets = CollectionMapper::get()
->with('sources')
->where('id', (int) $settings[AdminSettingsEnum::DEFAULT_ASSETS . $postKey]->content)
->where('id', (int) $settings[AdminSettingsEnum::DEFAULT_ASSETS]->content)
->execute();
$view->setData('defaultTemplates', $defaultTemplates);

View File

@ -7,7 +7,7 @@
*
* @package Modules\Billing
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -33,7 +33,7 @@ use phpOMS\Model\Message\FormValidation;
* Billing class.
*
* @package Modules\Billing
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
@ -78,12 +78,12 @@ final class ApiBillTypeController extends Controller
*/
private function createBillTypeFromRequest(RequestAbstract $request) : BillType
{
$billType = new BillType($request->getData('name') ?? '');
$billType->setL11n((string) ($request->getData('title') ?? ''), $request->getData('language') ?? ISO639x1Enum::_EN);
$billType->numberFormat = (string) ($request->getData('number_format') ?? '{id}');
$billType->transferStock = (bool) ($request->getData('transfer_stock') ?? false);
$billType->isTemplate = (bool) ($request->getData('is_template') ?? false);
$billType->transferType = (int) ($request->getData('transfer_type') ?? BillTransferType::SALES);
$billType = new BillType($request->getDataString('name') ?? '');
$billType->setL11n($request->getDataString('title') ?? '', $request->getDataString('language') ?? ISO639x1Enum::_EN);
$billType->numberFormat = (string) ($request->getData('number_format') ?? '{id}');
$billType->transferStock = (bool) ($request->getData('transfer_stock') ?? false);
$billType->isTemplate = (bool) ($request->getData('is_template') ?? false);
$billType->transferType = $request->getDataInt('transfer_type') ?? BillTransferType::SALES;
$billType->defaultTemplate = $request->hasData('template')
? new NullCollection((int) $request->getData('template'))
: null;
@ -155,11 +155,11 @@ final class ApiBillTypeController extends Controller
private function createBillTypeL11nFromRequest(RequestAbstract $request) : BaseStringL11n
{
$billTypeL11n = new BaseStringL11n();
$billTypeL11n->ref = (int) ($request->getData('type') ?? 0);
$billTypeL11n->setLanguage((string) (
$request->getData('language') ?? $request->getLanguage()
));
$billTypeL11n->content = (string) ($request->getData('title') ?? '');
$billTypeL11n->ref = $request->getDataInt('type') ?? 0;
$billTypeL11n->setLanguage(
$request->getDataString('language') ?? $request->getLanguage()
);
$billTypeL11n->content = $request->getDataString('title') ?? '';
return $billTypeL11n;
}

View File

@ -7,7 +7,7 @@
*
* @package Modules\Billing
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -23,7 +23,7 @@ use phpOMS\Message\ResponseAbstract;
* Billing class.
*
* @package Modules\Billing
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -7,7 +7,7 @@
*
* @package Modules\Billing
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -40,7 +40,7 @@ use phpOMS\System\MimeType;
* Billing class.
*
* @package Modules\Billing
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
@ -62,8 +62,10 @@ final class ApiPriceController extends Controller
public function apiPricingFind(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
{
// Get item
/** @var null|\Modules\ItemManagement\Models\Item $item */
$item = null;
if ($request->hasData('price_item')) {
/** @var null|\Modules\ItemManagement\Models\Item $item */
$item = ItemMapper::get()
->with('attributes')
->with('attributes/type')
@ -73,6 +75,7 @@ final class ApiPriceController extends Controller
}
// Get account
/** @var null|\Modules\ClientManagement\Models\Client|\Modules\SupplierManagement\Models\Supplier $account */
$account = null;
/** @var null|\Modules\ClientManagement\Models\Client $client */
@ -82,20 +85,24 @@ final class ApiPriceController extends Controller
$supplier = null;
if ($request->hasData('price_client')) {
/** @var null|\Modules\ClientManagement\Models\Client $client */
$client = ClientMapper::get()
->with('attributes/type')
->with('attributes/value')
->where('id', (int) $request->getData('price_client'))
->execute();
/** @var null|\Modules\ClientManagement\Models\Client|\Modules\SupplierManagement\Models\Supplier $account */
$account = $client;
} else {
/** @var null|\Modules\SupplierManagement\Models\Supplier $supplier */
$supplier = SupplierMapper::get()
->with('attributes/type')
->with('attributes/value')
->where('id', (int) $request->getData('price_supplier'))
->execute();
/** @var null|\Modules\ClientManagement\Models\Client|\Modules\SupplierManagement\Models\Supplier $account */
$account = $supplier;
}
@ -140,6 +147,7 @@ final class ApiPriceController extends Controller
}
*/
/** @var \Modules\Billing\Models\Price\Price[] $prices */
$prices = $queryMapper->execute();
// Find base price (@todo: probably not a good solution)
@ -158,7 +166,7 @@ final class ApiPriceController extends Controller
&& $price->clienttype->getId() === 0
&& $price->promocode === ''
) {
if ($price->price < $bestBasePrice?->price ?? \PHP_INT_MAX) {
if ($price->price < ($bestBasePrice?->price ?? \PHP_INT_MAX)) {
$bestBasePrice = $price;
}
}
@ -167,7 +175,7 @@ final class ApiPriceController extends Controller
// @todo: implement prices which cannot be improved even if there are better prices available (i.e. some customer groups may not get better prices, Dentagen Beispiel)
// alternatively set prices as 'improvable' => which whitelists a price as can be improved or 'alwaysimproces' which always overwrites other prices
// Find best price
$bestPrice = null;
$bestPrice = null;
$bestPriceValue = \PHP_INT_MAX;
foreach ($prices as $price) {
@ -251,35 +259,35 @@ final class ApiPriceController extends Controller
*/
private function createPriceFromRequest(RequestAbstract $request) : Price
{
$price = new Price();
$price->name = $request->getData('name') ?? '';
$price->promocode = $request->getData('promocode') ?? '';
$price = new Price();
$price->name = $request->getDataString('name') ?? '';
$price->promocode = $request->getDataString('promocode') ?? '';
$price->item = new NullItem((int) $request->getData('item'));
$price->itemgroup = new NullItemAttributeValue((int) $request->getData('itemgroup'));
$price->item = new NullItem((int) $request->getData('item'));
$price->itemgroup = new NullItemAttributeValue((int) $request->getData('itemgroup'));
$price->itemsegment = new NullItemAttributeValue((int) $request->getData('itemsegment'));
$price->itemsection = new NullItemAttributeValue((int) $request->getData('itemsection'));
$price->itemtype = new NullItemAttributeValue((int) $request->getData('itemtype'));
$price->itemtype = new NullItemAttributeValue((int) $request->getData('itemtype'));
$price->client = new NullClient((int) $request->getData('client'));
$price->clientgroup = new NullClientAttributeValue((int) $request->getData('clientgroup'));
$price->client = new NullClient((int) $request->getData('client'));
$price->clientgroup = new NullClientAttributeValue((int) $request->getData('clientgroup'));
$price->clientsegment = new NullClientAttributeValue((int) $request->getData('clientsegment'));
$price->clientsection = new NullClientAttributeValue((int) $request->getData('clientsection'));
$price->clienttype = new NullClientAttributeValue((int) $request->getData('clienttype'));
$price->clienttype = new NullClientAttributeValue((int) $request->getData('clienttype'));
$price->supplier = new NullSupplier((int) $request->getData('supplier'));
$price->unit = (int) $request->getData('unit');
$price->type = (int) ($request->getData('type') ?? PriceType::SALES);
$price->quantity = (int) $request->getData('quantity');
$price->price = (int) $request->getData('price');
$price->priceNew = (int) $request->getData('price_name');
$price->discount = (int) $request->getData('discount');
$price->supplier = new NullSupplier((int) $request->getData('supplier'));
$price->unit = (int) $request->getData('unit');
$price->type = $request->getDataInt('type') ?? PriceType::SALES;
$price->quantity = (int) $request->getData('quantity');
$price->price = (int) $request->getData('price');
$price->priceNew = (int) $request->getData('price_name');
$price->discount = (int) $request->getData('discount');
$price->discountPercentage = (int) $request->getData('discountPercentage');
$price->bonus = (int) $request->getData('bonus');
$price->multiply = (bool) ($request->getData('multiply') ?? false);
$price->currency = $request->getData('currency') ?? ISO4217CharEnum::_EUR;
$price->start = $request->hasData('start') ? new \DateTime($request->getData('start')) : null;
$price->end = $request->hasData('end') ? new \DateTime($request->getData('end')) : null;
$price->bonus = (int) $request->getData('bonus');
$price->multiply = $request->getDataBool('multiply') ?? false;
$price->currency = $request->getData('currency') ?? ISO4217CharEnum::_EUR;
$price->start = $request->hasData('start') ? new \DateTime($request->getData('start')) : null;
$price->end = $request->hasData('end') ? new \DateTime($request->getData('end')) : null;
return $price;
}

View File

@ -7,7 +7,7 @@
*
* @package Modules\Billing
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -33,7 +33,7 @@ use phpOMS\Uri\HttpUri;
* Billing class.
*
* @package Modules\Billing
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
@ -54,10 +54,10 @@ final class ApiPurchaseController extends Controller
*/
public function apiSupplierBillUpload(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
{
$originalType = (int) ($request->getData('type') ?? $this->app->appSettings->get(
$originalType = $request->getDataInt('type') ?? (int) $this->app->appSettings->get(
names: SettingsEnum::ORIGINAL_MEDIA_TYPE,
module: self::NAME
)->content);
)->content;
/** @var \Modules\Billing\Models\BillType $purchaseTransferType */
$purchaseTransferType = BillTypeMapper::get()
@ -103,8 +103,6 @@ final class ApiPurchaseController extends Controller
throw new \Exception();
}
// @todo: Parse text and analyze text structure
// Create internal document
$billResponse = new HttpResponse();
$billRequest = new HttpRequest(new HttpUri(''));

View File

@ -7,7 +7,7 @@
*
* @package Modules\Billing
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -36,7 +36,7 @@ use phpOMS\Model\Message\FormValidation;
* Billing class.
*
* @package Modules\Billing
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
@ -68,9 +68,9 @@ final class ApiTaxController extends Controller
*/
private function createTaxCombinationFromRequest(RequestAbstract $request) : TaxCombination
{
$tax = new TaxCombination();
$tax->taxType = (int) $request->getData('tax_type') ?? 1;
$tax->taxCode = (string) $request->getData('tax_code');
$tax = new TaxCombination();
$tax->taxType = $request->getDataInt('tax_type') ?? 1;
$tax->taxCode = (string) $request->getData('tax_code');
$tax->itemCode = new NullItemAttributeValue((int) $request->getData('item_code'));
if ($tax->taxType === 1) {
@ -107,6 +107,7 @@ final class ApiTaxController extends Controller
public function getClientTaxCode(Client $client, Address $taxOfficeAddress) : ClientAttributeValue
{
/** @var \Modules\ClientManagement\Models\ClientAttributeType $codes */
$codes = ClientAttributeTypeMapper::get()
->with('defaults')
->where('name', 'sales_tax_code')
@ -136,4 +137,4 @@ final class ApiTaxController extends Controller
return $taxCode;
}
}
}

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -38,7 +38,7 @@ use phpOMS\Views\View;
* Billing class.
*
* @package Modules\Billing
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
* @codeCoverageIgnore
@ -74,14 +74,14 @@ final class BackendController extends Controller
if ($request->getData('ptype') === 'p') {
$view->setData('bills',
$mapperQuery
->where('id', (int) ($request->getData('id') ?? 0), '<')
->where('id', $request->getDataInt('id') ?? 0, '<')
->where('client', null, '!=')
->where('type/l11n/language', $response->getLanguage())
->execute()
);
} elseif ($request->getData('ptype') === 'n') {
$view->setData('bills',
$mapperQuery->where('id', (int) ($request->getData('id') ?? 0), '>')
$mapperQuery->where('id', $request->getDataInt('id') ?? 0, '>')
->where('client', null, '!=')
->where('type/l11n/language', $response->getLanguage())
->execute()
@ -116,6 +116,7 @@ final class BackendController extends Controller
$view->setTemplate('/Modules/Billing/Theme/Backend/bill-create');
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005104001, $request, $response));
/** @var \Modules\Billing\Models\Bill $bill */
$bill = SalesBillMapper::get()
->with('elements')
->with('media')
@ -251,14 +252,14 @@ final class BackendController extends Controller
if ($request->getData('ptype') === 'p') {
$view->setData('bills',
$mapperQuery
->where('id', (int) ($request->getData('id') ?? 0), '<')
->where('id', $request->getDataInt('id') ?? 0, '<')
->where('supplier', null, '!=')
->where('type/l11n/language', $response->getLanguage())
->execute()
);
} elseif ($request->getData('ptype') === 'n') {
$view->setData('bills',
$mapperQuery->where('id', (int) ($request->getData('id') ?? 0), '>')
$mapperQuery->where('id', $request->getDataInt('id') ?? 0, '>')
->where('supplier', null, '!=')
->where('type/l11n/language', $response->getLanguage())
->execute()
@ -342,11 +343,11 @@ final class BackendController extends Controller
if ($request->getData('ptype') === 'p') {
$view->setData('bills',
StockBillMapper::getAll()->where('id', (int) ($request->getData('id') ?? 0), '<')->limit(25)->execute()
StockBillMapper::getAll()->where('id', $request->getDataInt('id') ?? 0, '<')->limit(25)->execute()
);
} elseif ($request->getData('ptype') === 'n') {
$view->setData('bills',
StockBillMapper::getAll()->where('id', (int) ($request->getData('id') ?? 0), '>')->limit(25)->execute()
StockBillMapper::getAll()->where('id', $request->getDataInt('id') ?? 0, '>')->limit(25)->execute()
);
} else {
$view->setData('bills',
@ -762,13 +763,13 @@ final class BackendController extends Controller
if ($request->getData('ptype') === 'p') {
$view->setData('bills',
$mapperQuery
->where('id', (int) ($request->getData('id') ?? 0), '<')
->where('id', $request->getDataInt('id') ?? 0, '<')
->where('type/l11n/language', $response->getLanguage())
->execute()
);
} elseif ($request->getData('ptype') === 'n') {
$view->setData('bills',
$mapperQuery->where('id', (int) ($request->getData('id') ?? 0), '>')
$mapperQuery->where('id', $request->getDataInt('id') ?? 0, '>')
->where('type/l11n/language', $response->getLanguage())
->execute()
);

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -33,7 +33,7 @@ use phpOMS\Views\View;
* Billing controller class.
*
* @package Modules\Billing
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
@ -53,10 +53,10 @@ final class CliController extends Controller
*/
public function cliParseSupplierBill(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
{
$originalType = (int) ($request->getData('type') ?? $this->app->appSettings->get(
$originalType = $request->getDataInt('type') ?? (int) $this->app->appSettings->get(
names: SettingsEnum::ORIGINAL_MEDIA_TYPE,
module: self::NAME
)->content);
)->content;
/** @var \Modules\Billing\Models\Bill $bill */
$bill = BillMapper::get()
@ -72,12 +72,18 @@ final class CliController extends Controller
$content = \strtolower($bill->getFileByType($originalType)->content->content ?? '');
$lines = \explode("\n", $content);
$language = $this->detectLanguage($content);
$language = $this->detectLanguage($content);
$bill->language = $language;
$identifiers = \json_decode(\file_get_contents(__DIR__ . '/../Models/billIdentifier.json'), true);
$identifierContent = \file_get_contents(__DIR__ . '/../Models/billIdentifier.json');
if ($identifierContent === false) {
$identifierContent = '{}';
}
$identifiers = \json_decode($identifierContent, true);
/* Supplier */
/** @var \Modules\SupplierManagement\Models\Supplier[] $suppliers */
$suppliers = SupplierMapper::getAll()
->with('account')
->with('mainAddress')
@ -89,17 +95,20 @@ final class CliController extends Controller
$bill->supplier = new NullSupplier($supplierId);
$supplier = $suppliers[$supplierId] ?? new NullSupplier();
$bill->billTo = $supplier->account->name1;
$bill->billTo = $supplier->account->name1;
$bill->billAddress = $supplier->mainAddress->address;
$bill->billCity = $supplier->mainAddress->city;
$bill->billZip = $supplier->mainAddress->postal;
$bill->billCity = $supplier->mainAddress->city;
$bill->billZip = $supplier->mainAddress->postal;
$bill->billCountry = $supplier->mainAddress->getCountry();
/* Type */
$type = $this->findSupplierInvoiceType($content, $identifiers['type'], $language);
/** @var \Modules\Billing\Models\BillType $billTye */
$billType = BillTypeMapper::get()
->where('name', $type)
->execute();
$bill->type = new NullBillType($billType->getId());
/* Number */
@ -125,6 +134,15 @@ final class CliController extends Controller
return $view;
}
/**
* Detect language from content
*
* @param string $content String to analyze
*
* @return string
*
* @since 1.0.0
*/
private function detectLanguage(string $content) : string
{
$detector = new Language();
@ -137,6 +155,17 @@ final class CliController extends Controller
return \substr(\array_keys($language)[0], 0, 2);
}
/**
* Detect the supplier bill type
*
* @param string $content String to analyze
* @param array $types Possible bill types
* @param string $language Bill language
*
* @return string
*
* @since 1.0.0
*/
private function findSupplierInvoiceType(string $content, array $types, string $language) : string
{
$bestPos = \strlen($content);
@ -156,6 +185,16 @@ final class CliController extends Controller
return empty($bestMatch) ? 'purchase_invoice' : $bestMatch;
}
/**
* Detect the supplier bill number
*
* @param string[] $lines Bill lines
* @param array $matches Number match patterns
*
* @return string
*
* @since 1.0.0
*/
private function findBillNumber(array $lines, array $matches) : string
{
$bestPos = \count($lines);
@ -167,7 +206,7 @@ final class CliController extends Controller
foreach ($lines as $row => $line) {
if (\preg_match($match, $line, $found) === 1) {
if ($row < $bestPos) {
$bestPos = $row;
$bestPos = $row;
$bestMatch = \trim($found['bill_no']);
}
@ -179,6 +218,16 @@ final class CliController extends Controller
return $bestMatch;
}
/**
* Detect the supplier bill due date
*
* @param string[] $lines Bill lines
* @param array $matches Due match patterns
*
* @return string
*
* @since 1.0.0
*/
private function findBillDue(array $lines, array $matches) : string
{
$bestPos = \count($lines);
@ -190,8 +239,8 @@ final class CliController extends Controller
foreach ($lines as $row => $line) {
if (\preg_match($match, $line, $found) === 1) {
if ($row < $bestPos) {
// @question: don't many invoices have the due date at the bottom? bestPos doesn't make sense?!
$bestPos = $row;
// @todo: don't many invoices have the due date at the bottom? bestPos doesn't make sense?!
$bestPos = $row;
$bestMatch = \trim($found['bill_due']);
}
@ -203,6 +252,16 @@ final class CliController extends Controller
return $bestMatch;
}
/**
* Detect the supplier bill date
*
* @param string[] $lines Bill lines
* @param array $matches Date match patterns
*
* @return string
*
* @since 1.0.0
*/
private function findBillDate(array $lines, array $matches) : string
{
$bestPos = \count($lines);
@ -226,6 +285,16 @@ final class CliController extends Controller
return $bestMatch;
}
/**
* Detect the supplier bill gross amount
*
* @param string[] $lines Bill lines
* @param array $matches Gross match patterns
*
* @return string
*
* @since 1.0.0
*/
private function findBillGross(array $lines, array $matches) : int
{
$bestMatch = 0;
@ -257,19 +326,52 @@ final class CliController extends Controller
return $bestMatch;
}
/**
* Find possible supplier id
*
* Priorities:
* 1. bill_match_pattern
* 2. name1 + iban
* 3. name1 + city || address
* 4. name1
*
* @param string $content Content to analyze
* @param Supplier[] $suppliers Suppliers
*
* @return int
*
* @todo: This can be optimized by a lot!!!
*
* @since 1.0.0
*/
private function matchSupplier(string $content, array $suppliers) : int
{
$bestMatch = 0;
// bill_match_pattern
foreach ($suppliers as $supplier) {
if ((!empty($supplier->getAttributeByTypeName('iban')->value->valueStr)
&& \stripos($content, $supplier->getAttributeByTypeName('iban')->value->valueStr) !== false)
|| (!empty($supplier->getAttributeByTypeName('bill_match_pattern')->value->valueStr)
// @todo: consider to support regex?
if ((!empty($supplier->getAttributeByTypeName('bill_match_pattern')->value->valueStr)
&& \stripos($content, $supplier->getAttributeByTypeName('bill_match_pattern')->value->valueStr) !== false)
) {
return $supplier->getId();
}
}
// name1 + iban
foreach ($suppliers as $supplier) {
if (\stripos($content, $supplier->account->name1) !== false) {
$ibans = $supplier->getPaymentsByType(PaymentType::SWIFT);
foreach ($ibans as $iban) {
if (\stripos($content, $iban->content2) !== false) {
return $supplier->getId();
}
}
}
}
// name1 + city || address
foreach ($suppliers as $supplier) {
if (\stripos($content, $supplier->account->name1) !== false) {
if ((!empty($supplier->mainAddress->city)
&& \stripos($content, $supplier->mainAddress->city) !== false)
@ -278,14 +380,30 @@ final class CliController extends Controller
) {
return $supplier->getId();
}
}
}
$bestMatch = $supplier->getId();
// name1
foreach ($suppliers as $supplier) {
if (\stripos($content, $supplier->account->name1) !== false) {
return $supplier->getId();
}
}
return $bestMatch;
}
/**
* Create DateTime from date string
*
* @param string $date Date string
* @param Supplier $supplier Supplier
* @param string[] $formats Date formats
*
* @return null|\DateTime
*
* @since 1.0.0
*/
private function parseDate(string $date, Supplier $supplier, array $formats) : ?\DateTime
{
if ((!empty($supplier->getAttributeByTypeName('bill_date_format')->value->valueStr))) {

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -21,7 +21,7 @@ use phpOMS\Module\WebInterface;
* Billing class.
*
* @package Modules\Billing
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Attribute
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -20,7 +20,7 @@ use phpOMS\Stdlib\Base\Enum;
* Attribute value type enum.
*
* @package Modules\Billing\Models\Attribute
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Attribute
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -18,7 +18,7 @@ namespace Modules\Billing\Models\Attribute;
* Bill class.
*
* @package Modules\Billing\Models\Attribute
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Attribute
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -20,7 +20,7 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
* Bill mapper class.
*
* @package Modules\Billing\Models\Attribute
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Attribute
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -21,7 +21,7 @@ use phpOMS\Localization\ISO639x1Enum;
* Bill Attribute Type class.
*
* @package Modules\Billing\Models\Attribute
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
@ -143,7 +143,7 @@ class BillAttributeType implements \JsonSerializable
if ($l11n instanceof BaseStringL11n) {
$this->l11n = $l11n;
} elseif (isset($this->l11n) && $this->l11n instanceof BaseStringL11n) {
$this->l11n->content = $l11n;
$this->l11n->content = $l11n;
$this->l11n->setLanguage($lang);
} else {
$this->l11n = new BaseStringL11n();

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Attribute
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -21,7 +21,7 @@ use phpOMS\Localization\BaseStringL11n;
* Bill mapper class.
*
* @package Modules\Billing\Models\Attribute
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Attribute
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -20,7 +20,7 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
* Bill mapper class.
*
* @package Modules\Billing\Models\Attribute
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Attribute
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -23,7 +23,7 @@ use phpOMS\Localization\ISO639x1Enum;
* The relation with the type/bill is defined in the BillAttribute class.
*
* @package Modules\Billing\Models\Attribute
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
@ -135,7 +135,7 @@ class BillAttributeValue implements \JsonSerializable
if ($l11n instanceof BaseStringL11n) {
$this->l11n = $l11n;
} elseif (isset($this->l11n) && $this->l11n instanceof BaseStringL11n) {
$this->l11n->content = $l11n;
$this->l11n->content = $l11n;
$this->l11n->setLanguage($lang);
} else {
$this->l11n = new BaseStringL11n();

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Attribute
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -21,7 +21,7 @@ use phpOMS\Localization\BaseStringL11n;
* Bill mapper class.
*
* @package Modules\Billing\Models\Attribute
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Attribute
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -20,7 +20,7 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
* Bill mapper class.
*
* @package Modules\Billing\Models\Attribute
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Attribute
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -18,7 +18,7 @@ namespace Modules\Billing\Models\Attribute;
* Null model
*
* @package Modules\Billing\Models\Attribute
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Attribute
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -18,7 +18,7 @@ namespace Modules\Billing\Models\Attribute;
* Null model
*
* @package Modules\Billing\Models\Attribute
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Attribute
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -18,7 +18,7 @@ namespace Modules\Billing\Models\Attribute;
* Null model
*
* @package Modules\Billing\Models\Attribute
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -31,7 +31,7 @@ use phpOMS\Localization\Money;
* Bill class.
*
* @package Modules\Billing\Models
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -21,7 +21,7 @@ use phpOMS\Stdlib\Base\FloatInt;
* Bill class.
*
* @package Modules\Billing\Models
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -20,7 +20,7 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
* Mapper class.
*
* @package Modules\Billing\Models
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -27,7 +27,7 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
* Mapper class.
*
* @package Modules\Billing\Models
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -20,7 +20,7 @@ use phpOMS\Stdlib\Base\Enum;
* Bill status enum.
*
* @package Modules\Billing\Models
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -20,7 +20,7 @@ use phpOMS\Stdlib\Base\Enum;
* Bill transfer type enum.
*
* @package Modules\Billing\Models
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -23,7 +23,7 @@ use phpOMS\Localization\ISO639x1Enum;
* Bill type enum.
*
* @package Modules\Billing\Models
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -21,7 +21,7 @@ use phpOMS\Localization\BaseStringL11n;
* Bill type mapper class.
*
* @package Modules\Billing\Models
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -22,7 +22,7 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
* Billing mapper class.
*
* @package Modules\Billing\Models
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -18,7 +18,7 @@ namespace Modules\Billing\Models;
* Null bill class.
*
* @package Modules\Billing\Models
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -18,7 +18,7 @@ namespace Modules\Billing\Models;
* Null bill element class.
*
* @package Modules\Billing\Models
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -18,7 +18,7 @@ namespace Modules\Billing\Models;
* Null bill type class.
*
* @package Modules\Billing\Models
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -20,7 +20,7 @@ use phpOMS\Stdlib\Base\Enum;
* Permision state enum.
*
* @package Modules\Billing\Models
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Price
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -18,7 +18,7 @@ namespace Modules\Billing\Models\Price;
* Null bill type class.
*
* @package Modules\Billing\Models\Price
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Price
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -30,7 +30,7 @@ use phpOMS\Localization\ISO4217CharEnum;
* Bill class.
*
* @package Modules\Billing\Models\Price
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Price
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -26,7 +26,7 @@ use phpOMS\Localization\Defaults\CountryMapper;
* Billing mapper class.
*
* @package Modules\Billing\Models\Price
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Price
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -20,7 +20,7 @@ use phpOMS\Stdlib\Base\Enum;
* Module settings enum.
*
* @package Modules\Billing\Models\Price
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -23,7 +23,7 @@ use phpOMS\Localization\Money;
* Mapper class.
*
* @package Modules\Billing\Models
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -23,7 +23,7 @@ use phpOMS\Localization\Money;
* Mapper class.
*
* @package Modules\Billing\Models
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -20,7 +20,7 @@ use phpOMS\Stdlib\Base\Enum;
* Module settings enum.
*
* @package Modules\Billing\Models
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -20,7 +20,7 @@ use phpOMS\DataStorage\Database\Query\Builder;
* Mapper class.
*
* @package Modules\Billing\Models
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Tax
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -20,7 +20,7 @@ use phpOMS\Stdlib\Base\Enum;
* Bill transfer type enum.
*
* @package Modules\Billing\Models\Tax
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Tax
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -18,7 +18,7 @@ namespace Modules\Billing\Models\Tax;
* Null model
*
* @package Modules\Billing\Models\Tax
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Tax
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -25,7 +25,7 @@ use Modules\SupplierManagement\Models\SupplierAttributeValue;
* Billing class.
*
* @package Modules\Billing\Models\Tax
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
@ -63,6 +63,11 @@ class TaxCombination implements \JsonSerializable
public ?\DateTime $end = null;
/**
* Constructor
*
* @since 1.0.0
*/
public function __construct()
{
$this->itemCode = new NullItemAttributeValue();
@ -97,4 +102,4 @@ class TaxCombination implements \JsonSerializable
{
return $this->toArray();
}
}
}

View File

@ -6,7 +6,7 @@
*
* @package Modules\Billing\Models\Tax
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@ -23,7 +23,7 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
* Billing mapper class.
*
* @package Modules\Billing\Models\Tax
* @license OMS License 1.0
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

View File

@ -6,7 +6,7 @@
*
* @package Modules\Localization
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/

Some files were not shown because too many files have changed in this diff Show More