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 * @package Modules\Billing\Admin
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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