continue implementations

This commit is contained in:
Dennis Eichhorn 2024-01-12 00:30:20 +00:00
parent e79230dbf9
commit d8cb2bcd64
62 changed files with 2294 additions and 859 deletions

View File

@ -57,6 +57,36 @@
"permission": { "permission": 4, "category": null, "element": null },
"parent": 1005104001,
"children": []
},
{
"id": 1005104401,
"pid": "/sales/bill",
"type": 3,
"subtype": 1,
"name": "PaymentTerms",
"uri": "{/base}/bill/payment/list?{?}",
"target": "self",
"icon": null,
"order": 15,
"from": "Billing",
"permission": { "permission": 4, "category": null, "element": null },
"parent": 1005104001,
"children": []
},
{
"id": 1005104501,
"pid": "/sales/bill",
"type": 3,
"subtype": 1,
"name": "ShippingTerms",
"uri": "{/base}/bill/shipping/list?{?}",
"target": "self",
"icon": null,
"order": 20,
"from": "Billing",
"permission": { "permission": 4, "category": null, "element": null },
"parent": 1005104001,
"children": []
}
]
},

View File

@ -1,4 +1,112 @@
{
"billing_payment_term": {
"name": "billing_payment_term",
"fields": {
"billing_payment_term_id": {
"name": "billing_payment_term_id",
"type": "INT",
"null": false,
"primary": true,
"autoincrement": true
},
"billing_payment_term_code": {
"description": "In days",
"name": "billing_payment_term_code",
"type": "VARCHAR(100)",
"null": false,
"unique": true
},
"billing_payment_term_due": {
"description": "In days",
"name": "billing_payment_term_due",
"type": "INT",
"null": false
}
}
},
"billing_payment_term_l11n": {
"name": "billing_payment_term_l11n",
"fields": {
"billing_payment_term_l11n_id": {
"name": "billing_payment_term_l11n_id",
"type": "INT",
"null": false,
"primary": true,
"autoincrement": true
},
"billing_payment_term_l11n_name": {
"name": "billing_payment_term_l11n_name",
"type": "VARCHAR(255)",
"null": false
},
"billing_payment_term_l11n_term": {
"name": "billing_payment_term_l11n_term",
"type": "INT",
"null": false,
"foreignTable": "billing_payment_term",
"foreignKey": "billing_payment_term_id"
},
"billing_payment_term_l11n_language": {
"name": "billing_payment_term_l11n_language",
"type": "VARCHAR(2)",
"default": null,
"null": true,
"foreignTable": "language",
"foreignKey": "language_639_1"
}
}
},
"billing_shipping_term": {
"name": "billing_shipping_term",
"fields": {
"billing_shipping_term_id": {
"name": "billing_shipping_term_id",
"type": "INT",
"null": false,
"primary": true,
"autoincrement": true
},
"billing_shipping_term_code": {
"description": "In days",
"name": "billing_shipping_term_code",
"type": "VARCHAR(100)",
"null": false,
"unique": true
}
}
},
"billing_shipping_term_l11n": {
"name": "billing_shipping_term_l11n",
"fields": {
"billing_shipping_term_l11n_id": {
"name": "billing_shipping_term_l11n_id",
"type": "INT",
"null": false,
"primary": true,
"autoincrement": true
},
"billing_shipping_term_l11n_name": {
"name": "billing_shipping_term_l11n_name",
"type": "VARCHAR(255)",
"null": false
},
"billing_shipping_term_l11n_term": {
"name": "billing_shipping_term_l11n_term",
"type": "INT",
"null": false,
"foreignTable": "billing_shipping_term",
"foreignKey": "billing_shipping_term_id"
},
"billing_shipping_term_l11n_language": {
"name": "billing_shipping_term_l11n_language",
"type": "VARCHAR(2)",
"default": null,
"null": true,
"foreignTable": "language",
"foreignKey": "language_639_1"
}
}
},
"billing_price": {
"name": "billing_price",
"fields": {
@ -27,8 +135,16 @@
"foreignTable": "itemmgmt_item",
"foreignKey": "itemmgmt_item_id"
},
"billing_price_itemgroup": {
"name": "billing_price_itemgroup",
"billing_price_itemsalesgroup": {
"name": "billing_price_itemsalesgroup",
"type": "INT",
"null": true,
"default": null,
"foreignTable": "itemmgmt_attr_value",
"foreignKey": "itemmgmt_attr_value_id"
},
"billing_price_itemproductgroup": {
"name": "billing_price_itemproductgroup",
"type": "INT",
"null": true,
"default": null,
@ -666,7 +782,10 @@
"billing_bill_paymentterms": {
"name": "billing_bill_paymentterms",
"type": "INT",
"null": false
"null": true,
"default": null,
"foreignTable": "billing_payment_term",
"foreignKey": "billing_payment_term_id"
},
"billing_bill_paymentterms_text": {
"name": "billing_bill_paymentterms_text",
@ -677,7 +796,10 @@
"billing_bill_ship_type": {
"name": "billing_bill_ship_type",
"type": "INT",
"null": false
"null": true,
"default": null,
"foreignTable": "billing_shipping_term",
"foreignKey": "billing_shipping_term_id"
},
"billing_bill_ship_text": {
"name": "billing_bill_ship_text",
@ -1038,6 +1160,11 @@
"type": "TINYINT(1)",
"null": false
},
"billing_attr_type_repeatable": {
"name": "billing_attr_type_repeatable",
"type": "TINYINT(1)",
"null": false
},
"billing_attr_type_required": {
"description": "Every item must have this attribute type if set to true.",
"name": "billing_attr_type_required",

View File

@ -0,0 +1,149 @@
[
{
"name": "PORI",
"l11n": {
"en" : "Payment on receipt of invoice",
"de" : "Zahlung fällig sofort nach Rechnungserhalt"
}
},
{
"name": "Net 10",
"l11n": {
"en" : "Payment is due 10 days after the invoice date",
"de" : "Zahlung fällig 10 Tage nach Rechnungsdatum"
}
},
{
"name": "Net 15",
"l11n": {
"en" : "Payment is due 15 days after the invoice date",
"de" : "Zahlung fällig 15 Tage nach Rechnungsdatum"
}
},
{
"name": "Net 30",
"l11n": {
"en" : "Payment is due 30 days after the invoice date",
"de" : "Zahlung fällig 30 Tage nach Rechnungsdatum"
}
},
{
"name": "Net 60",
"l11n": {
"en" : "Payment is due 60 days after the invoice date",
"de" : "Zahlung fällig 60 Tage nach Rechnungsdatum"
}
},
{
"name": "Net 90",
"l11n": {
"en" : "Payment is due 90 days after the invoice date",
"de" : "Zahlung fällig 90 Tage nach Rechnungsdatum"
}
},
{
"name": "COD",
"l11n": {
"en" : "Payment is made at the time of delivery",
"de" : "Zahlung fällig bei Lieferung"
}
},
{
"name": "CWO",
"l11n": {
"en" : "Cash with order",
"de" : "Zahlung fällig bei Bestellung"
}
},
{
"name": "CBS",
"l11n": {
"en" : "Cash before shipment",
"de" : "Zahlung fällig vor Lieferung"
}
},
{
"name": "Monthly",
"l11n": {
"en" : "Due at the end of the month",
"de" : "Zahlung fällig zum Monatsende des Rechnungsdatums"
}
},
{
"name": "PIA",
"l11n": {
"en" : "Payment in advance (pay-as-you-use)",
"de" : "Vorauszahlung (Pay-as-you-use)"
}
},
{
"name": "2/10 Net 30",
"l11n": {
"en" : "2% discount for payment within 10 days after invoice date; otherwise, the full amount is due in 30 days after invoice date",
"de" : "2% Skonto innerhalb von 10 Tagen nach Rechnungsdatum, andernfalls fällig zum vollen Betrag nach 30 Tagen nach Rechnungsdatum"
}
},
{
"name": "3/10 Net 30",
"l11n": {
"en" : "3% discount for payment within 10 days after invoice date; otherwise, the full amount is due in 30 days after invoice date",
"de" : "3% Skonto innerhalb von 10 Tagen nach Rechnungsdatum, andernfalls fällig zum vollen Betrag nach 30 Tagen nach Rechnungsdatum"
}
},
{
"name": "2/15 Net 30",
"l11n": {
"en" : "2% discount for payment within 15 days after invoice date; otherwise, the full amount is due in 30 days after invoice date",
"de" : "2% Skonto innerhalb von 15 Tagen nach Rechnungsdatum, andernfalls fällig zum vollen Betrag nach 30 Tagen nach Rechnungsdatum"
}
},
{
"name": "3/15 Net 30",
"l11n": {
"en" : "3% discount for payment within 15 days after invoice date; otherwise, the full amount is due in 30 days after invoice date",
"de" : "3% Skonto innerhalb von 15 Tagen nach Rechnungsdatum, andernfalls fällig zum vollen Betrag nach 30 Tagen nach Rechnungsdatum"
}
},
{
"name": "Escrow",
"l11n": {
"en" : "Payment is held by a third party until certain conditions are met (Escrow)",
"de" : "Die Zahlung wird von einer dritten Partei zurückgehalten, bis bestimmte Bedingungen erfüllt sind (Escrow)"
}
},
{
"name": "Open account",
"l11n": {
"en" : "There is a credit agreement and payment is expected within the agreed period",
"de" : "Es besteht eine Kreditvereinbarung, und die Zahlung wird innerhalb der vereinbarten Frist erwartet"
}
},
{
"name": "Installment payments",
"l11n": {
"en" : "Payments are divided into installments over a defined period",
"de" : "Die Zahlungen werden in Raten über einen bestimmten Zeitraum verteilt"
}
},
{
"name": "LC",
"l11n": {
"en" : "Payment is guaranteed by a bank upon presentation of specified documents",
"de" : "Die Zahlung wird von einer Bank gegen Vorlage bestimmter Dokumente garantiert"
}
},
{
"name": "Consignment",
"l11n": {
"en" : "Payment is made only after the goods are sold by the buyer",
"de" : "Die Zahlung erfolgt erst nach dem Verkauf der Ware durch den Käufer"
}
},
{
"name": "Retainer",
"l11n": {
"en" : "A partial upfront payment to secure services",
"de" : "Eine teilweise Vorauszahlung zur Sicherung der Dienstleistungen"
}
}
]

View File

@ -0,0 +1,79 @@
[
{
"name": "EXW",
"l11n": {
"en": "Incoterms 2020 Ex Works",
"de": "Incotemrs 2020 Ex Works"
}
},
{
"name": "FCA",
"l11n": {
"en": "Incoterms 2020 Free Carrier",
"de": "Incotemrs 2020 Free Carrier"
}
},
{
"name": "CPT",
"l11n": {
"en": "Incoterms 2020 Carriage Paid to",
"de": "Incotemrs 2020 Carriage Paid to"
}
},
{
"name": "CIP",
"l11n": {
"en": "Incoterms 2020 Carriage and Insurance Paid To",
"de": "Incotemrs 2020 Carriage and Insurance Paid To"
}
},
{
"name": "DAP",
"l11n": {
"en": "Incoterms 2020 Delivered at Place",
"de": "Incotemrs 2020 Delivered at Place"
}
},
{
"name": "DPU",
"l11n": {
"en": "Incoterms 2020 Delivered at Place Unloaded",
"de": "Incotemrs 2020 Delivered at Place Unloaded"
}
},
{
"name": "DDP",
"l11n": {
"en": "Incoterms 2020 Delivered Duty Paid",
"de": "Incotemrs 2020 Delivered Duty Paid"
}
},
{
"name": "FAS",
"l11n": {
"en": "Incoterms 2020 Free Alongside Ship",
"de": "Incotemrs 2020 Free Alongside Ship"
}
},
{
"name": "FOB",
"l11n": {
"en": "Incoterms 2020 Free on Board",
"de": "Incotemrs 2020 Free on Board"
}
},
{
"name": "CFR",
"l11n": {
"en": "Incoterms 2020 Cost and Freight",
"de": "Incotemrs 2020 Cost and Freight"
}
},
{
"name": "CIF",
"l11n": {
"en": "Incoterms 2020 Cost Insurance and Freight",
"de": "Incotemrs 2020 Cost Insurance and Freight"
}
}
]

View File

@ -1,7 +1,7 @@
[
{
"name": "sales_offer",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 1,
"transferStock": false,
"isTemplate": false,
@ -12,7 +12,7 @@
},
{
"name": "sales_order_confirmation",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 1,
"transferStock": false,
"isTemplate": false,
@ -23,7 +23,7 @@
},
{
"name": "sales_delivery_note",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 1,
"transferStock": true,
"isTemplate": false,
@ -34,7 +34,7 @@
},
{
"name": "sales_invoice",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 1,
"transferStock": false,
"isTemplate": false,
@ -45,7 +45,7 @@
},
{
"name": "sales_proforma_invoice",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 1,
"transferStock": false,
"isTemplate": false,
@ -56,7 +56,7 @@
},
{
"name": "sales_credit_note",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 1,
"transferStock": false,
"isTemplate": false,
@ -67,7 +67,7 @@
},
{
"name": "sales_reverse_invoice",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 1,
"transferStock": false,
"isTemplate": false,
@ -78,7 +78,7 @@
},
{
"name": "purchase_offer",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 2,
"transferStock": false,
"isTemplate": false,
@ -89,7 +89,7 @@
},
{
"name": "purchase_order_confirmation",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 2,
"transferStock": false,
"isTemplate": false,
@ -100,7 +100,7 @@
},
{
"name": "purchase_delivery_note",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 2,
"transferStock": true,
"isTemplate": false,
@ -111,7 +111,7 @@
},
{
"name": "purchase_invoice",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 2,
"transferStock": false,
"isTemplate": false,
@ -122,7 +122,7 @@
},
{
"name": "purchase_proforma_invoice",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 2,
"transferStock": false,
"isTemplate": false,
@ -133,7 +133,7 @@
},
{
"name": "purchase_credit_note",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 2,
"transferStock": false,
"isTemplate": false,
@ -144,7 +144,7 @@
},
{
"name": "purchase_reverse_invoice",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 2,
"transferStock": false,
"isTemplate": false,
@ -155,7 +155,7 @@
},
{
"name": "stock_movement",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 4,
"transferStock": false,
"isTemplate": false,
@ -166,7 +166,7 @@
},
{
"name": "stock_scrapping",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 4,
"transferStock": false,
"isTemplate": false,
@ -177,7 +177,7 @@
},
{
"name": "sales_subscritpion",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 1,
"transferStock": false,
"isTemplate": false,
@ -188,7 +188,7 @@
},
{
"name": "sales_template",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 1,
"transferStock": false,
"isTemplate": true,
@ -199,7 +199,7 @@
},
{
"name": "purchase_subscritpion",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 2,
"transferStock": false,
"isTemplate": false,
@ -210,7 +210,7 @@
},
{
"name": "purchase_template",
"numberFormat": "{y}-{sequence}",
"numberFormat": "{y}{type}-{m}{sequence}",
"transferType": 2,
"transferStock": false,
"isTemplate": true,

View File

@ -17,7 +17,7 @@ namespace Modules\Billing\Admin;
use Modules\Billing\Models\BillTransferType;
use Modules\ClientManagement\Models\Attribute\ClientAttributeTypeMapper;
use Modules\ItemManagement\Models\Attribute\ItemAttributeTypeMapper;
use Modules\SupplierManagement\Models\SupplierAttributeTypeMapper;
use Modules\SupplierManagement\Models\Attribute\SupplierAttributeTypeMapper;
use phpOMS\Application\ApplicationAbstract;
use phpOMS\Config\SettingsInterface;
use phpOMS\Message\Http\HttpRequest;
@ -99,6 +99,26 @@ final class Installer extends InstallerAbstract
$attrTypes = self::createBillAttributeTypes($app, $attributes);
$attrValues = self::createBillAttributeValues($app, $attrTypes, $attributes);
/* Payment terms */
$fileContent = \file_get_contents(__DIR__ . '/Install/paymentterms.json');
if ($fileContent === false) {
return;
}
/** @var array $terms */
$terms = \json_decode($fileContent, true);
$paymentTypeArray = self::createPaymentTerms($app, $terms);
/* Shipping terms */
$fileContent = \file_get_contents(__DIR__ . '/Install/shippingterms.json');
if ($fileContent === false) {
return;
}
/** @var array $terms */
$terms = \json_decode($fileContent, true);
$shippingTypeArray = self::createShippingTerms($app, $terms);
}
/**
@ -377,4 +397,124 @@ final class Installer extends InstallerAbstract
return $billTypes;
}
/**
* Install default payment terms
*
* @param ApplicationAbstract $app Application
* @param array $types Payment term definitions
*
* @return array
*
* @since 1.0.0
*/
private static function createPaymentTerms(ApplicationAbstract $app, array $types) : array
{
/** @var array<string, array> $paymentTerms */
$paymentTerms = [];
/** @var \Modules\Billing\Controller\ApiController $module */
$module = $app->moduleManager->getModuleInstance('Billing', 'Api');
/** @var array $type */
foreach ($types as $type) {
$response = new HttpResponse();
$request = new HttpRequest(new HttpUri(''));
$request->header->account = 1;
$request->setData('name', $type['name'] ?? '');
$request->setData('title', \reset($type['l11n']));
$module->apiPaymentTermCreate($request, $response);
$responseData = $response->getData('');
if (!\is_array($responseData)) {
continue;
}
$paymentTerms[$type['name']] = \is_array($responseData['response'])
? $responseData['response']
: $responseData['response']->toArray();
$isFirst = true;
foreach ($type['l11n'] as $language => $l11n) {
if ($isFirst) {
$isFirst = false;
continue;
}
$response = new HttpResponse();
$request = new HttpRequest(new HttpUri(''));
$request->header->account = 1;
$request->setData('title', $l11n);
$request->setData('language', $language);
$request->setData('type', $paymentTerms[$type['name']]['id']);
$module->apiPaymentTermL11nCreate($request, $response);
}
}
return $paymentTerms;
}
/**
* Install default shipping terms
*
* @param ApplicationAbstract $app Application
* @param array $types Shipping term definitions
*
* @return array
*
* @since 1.0.0
*/
private static function createShippingTerms(ApplicationAbstract $app, array $types) : array
{
/** @var array<string, array> $shippingTerms */
$shippingTerms = [];
/** @var \Modules\Billing\Controller\ApiController $module */
$module = $app->moduleManager->getModuleInstance('Billing', 'Api');
/** @var array $type */
foreach ($types as $type) {
$response = new HttpResponse();
$request = new HttpRequest(new HttpUri(''));
$request->header->account = 1;
$request->setData('name', $type['name'] ?? '');
$request->setData('title', \reset($type['l11n']));
$module->apiShippingTermCreate($request, $response);
$responseData = $response->getData('');
if (!\is_array($responseData)) {
continue;
}
$shippingTerms[$type['name']] = \is_array($responseData['response'])
? $responseData['response']
: $responseData['response']->toArray();
$isFirst = true;
foreach ($type['l11n'] as $language => $l11n) {
if ($isFirst) {
$isFirst = false;
continue;
}
$response = new HttpResponse();
$request = new HttpRequest(new HttpUri(''));
$request->header->account = 1;
$request->setData('title', $l11n);
$request->setData('language', $language);
$request->setData('type', $shippingTerms[$type['name']]['id']);
$module->apiShippingTermL11nCreate($request, $response);
}
}
return $shippingTerms;
}
}

View File

@ -18,7 +18,7 @@ use phpOMS\Account\PermissionType;
use phpOMS\Router\RouteVerb;
return [
'^.*/bill/render.*$' => [
'^.*/bill/render\?.*$' => [
[
'dest' => '\Modules\Billing\Controller\ApiBillController:apiMediaRender',
'verb' => RouteVerb::GET,
@ -29,4 +29,26 @@ return [
],
],
],
'^.*/bill/render/preview.*$' => [
[
'dest' => '\Modules\Billing\Controller\ApiBillController:apiPreviewRender',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionCategory::SALES_INVOICE,
],
],
],
'^.*/bill/price.*$' => [
[
'dest' => '\Modules\Billing\Controller\ApiPriceController:apiPriceCreate',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionCategory::PRICE,
],
],
],
];

View File

@ -197,4 +197,49 @@ return [
],
],
],
'^.*/bill/payment/list.*$' => [
[
'dest' => '\Modules\Billing\Controller\BackendController:viewPaymentList',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionCategory::PAYMENT_TERM,
],
],
],
'^.*/bill/payment/view.*$' => [
[
'dest' => '\Modules\Billing\Controller\BackendController:viewPaymentView',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionCategory::PAYMENT_TERM,
],
],
],
'^.*/bill/shipping/list.*$' => [
[
'dest' => '\Modules\Billing\Controller\BackendController:viewShippingList',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionCategory::SHIPPING_TERM,
],
],
],
'^.*/bill/shipping/view.*$' => [
[
'dest' => '\Modules\Billing\Controller\BackendController:viewShippingView',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionCategory::SHIPPING_TERM,
],
],
],
];

View File

@ -61,7 +61,23 @@ final class ApiAttributeController extends Controller
return;
}
$type = BillAttributeTypeMapper::get()->with('defaults')->where('id', (int) $request->getData('type'))->execute();
$type = BillAttributeTypeMapper::get()->with('defaults')->where('id', (int) $request->getData('type'))->execute();
if (!$type->repeatable) {
$attr = BillAttributeMapper::count()
->with('type')
->where('type/id', (int) $request->getData('type'))
->where('ref', (int) $request->getData('ref'))
->execute();
if ($attr > 0) {
$response->header->status = RequestStatusCode::R_409;
$this->createInvalidCreateResponse($request, $response, $val);
return;
}
}
$attribute = $this->createAttributeFromRequest($request, $type);
$this->createModel($request->header->account, $attribute, BillAttributeMapper::class, 'attribute', $request->getOrigin());
$this->createStandardCreateResponse($request, $response, $attribute);

View File

@ -33,6 +33,7 @@ use Modules\ItemManagement\Models\ItemMapper;
use Modules\Media\Models\CollectionMapper;
use Modules\Media\Models\Media;
use Modules\Media\Models\MediaMapper;
use Modules\Media\Models\NullCollection;
use Modules\Media\Models\PathSettings;
use Modules\Media\Models\UploadStatus;
use Modules\Messages\Models\EmailMapper;
@ -42,6 +43,7 @@ use Modules\SupplierManagement\Models\SupplierMapper;
use phpOMS\Account\PermissionType;
use phpOMS\Application\ApplicationAbstract;
use phpOMS\Autoloader;
use phpOMS\DataStorage\Database\Query\ColumnName;
use phpOMS\Localization\ISO4217CharEnum;
use phpOMS\Localization\ISO639x1Enum;
use phpOMS\Message\Http\RequestStatusCode;
@ -227,10 +229,10 @@ final class ApiBillController extends Controller
$bill->accountNumber = $account->number;
$bill->setStatus($request->getDataInt('status') ?? BillStatus::DRAFT);
$bill->shipping = 0;
$bill->shippingTerms = null;
$bill->shippingText = '';
$bill->payment = 0;
$bill->paymentTerms = null;
$bill->paymentText = '';
if ($account instanceof Client) {
@ -258,7 +260,7 @@ final class ApiBillController extends Controller
if (empty($settings)) {
/** @var \Model\Setting $settings */
$settings = $this->app->appSettings->get(null,
SettingsEnum::VALID_BILL_LANGUAGES,
SettingsEnum::VALID_BILL_LANGUAGES,
unit: null,
module: 'Admin'
);
@ -293,7 +295,7 @@ final class ApiBillController extends Controller
$typeMapper = BillTypeMapper::get()
->with('l11n')
->where('l11n/langauge', $billLanguage)
->where('l11n/language', $billLanguage)
->limit(1);
if ($request->hasData('type')) {
@ -789,49 +791,31 @@ final class ApiBillController extends Controller
*/
public function apiPreviewRender(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void
{
Autoloader::addPath(__DIR__ . '/../../../Resources/');
/** @var \Modules\Billing\Models\Bill $bill */
$bill = BillMapper::get()
->with('type')
->with('type/l11n')
->with('elements')
->where('id', $request->getDataInt('bill') ?? 0)
->execute();
Autoloader::addPath(__DIR__ . '/../../../Resources/');
$templateId = $request->getData('bill_template', 'int');
if ($templateId === null) {
$billTypeId = $request->getData('bill_type', 'int');
if (empty($billTypeId)) {
$billTypeId = $bill->type->id;
}
if (empty($billTypeId)) {
return;
}
/** @var \Modules\Billing\Models\BillType $billType */
$billType = BillTypeMapper::get()
->with('defaultTemplate')
->where('id', $billTypeId)
->execute();
$templateId = $billType->defaultTemplate?->id;
// Load bill type
$billTypeId = $request->getDataInt('bill_type') ?? $bill->type->id;
if (empty($billTypeId)) {
return;
}
/** @var \Modules\Media\Models\Collection $template */
$template = CollectionMapper::get()
->with('sources')
->where('id', $templateId)
/** @var \Modules\Billing\Models\BillType $billType */
$billType = BillTypeMapper::get()
->with('l11n')
->where('id', $billTypeId)
->where('l11n/language', $bill->language)
->execute();
require_once __DIR__ . '/../../../Resources/tcpdf/TCPDF.php';
$templateId = $request->getDataInt('bill_template') ?? $billType->defaultTemplate?->id ?? 0;
$response->header->set('Content-Type', MimeType::M_PDF, true);
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/' . \substr($template->getSourceByName('bill.pdf.php')->getPath(), 0, -8), 'pdf.php');
// Overriding actual bill type
$bill->type = $billType;
/** @var \Model\Setting[] $settings */
$settings = $this->app->appSettings->get(null,
@ -855,17 +839,36 @@ final class ApiBillController extends Controller
);
}
/** @var \Modules\Media\Models\Collection $defaultTemplates */
$defaultTemplates = CollectionMapper::get()
$template = new NullCollection();
$defaultTemplates = new NullCollection();
$defaultAssets = new NullCollection();
/** @var \Modules\Media\Models\Collection[] $collections */
$collections = CollectionMapper::get()
->with('sources')
->where('id', (int) $settings[AdminSettingsEnum::DEFAULT_TEMPLATES]->content)
->where('id', [
(int) $settings[AdminSettingsEnum::DEFAULT_TEMPLATES]->content,
(int) $settings[AdminSettingsEnum::DEFAULT_ASSETS]->content,
$templateId
], 'IN')
->execute();
/** @var \Modules\Media\Models\Collection $defaultAssets */
$defaultAssets = CollectionMapper::get()
->with('sources')
->where('id', (int) $settings[AdminSettingsEnum::DEFAULT_ASSETS]->content)
->execute();
foreach ($collections as $collection) {
if ($collection->id === $templateId) {
$template = $collection;
} elseif ($collection->id === (int) $settings[AdminSettingsEnum::DEFAULT_TEMPLATES]->content) {
$defaultTemplates = $collection;
} elseif ($collection->id === (int) $settings[AdminSettingsEnum::DEFAULT_ASSETS]->content) {
$defaultAssets = $collection;
}
}
require_once __DIR__ . '/../../../Resources/tcpdf/TCPDF.php';
$response->header->set('Content-Type', MimeType::M_PDF, true);
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/' . \substr($template->getSourceByName('bill.pdf.php')->getPath(), 0, -8), 'pdf.php');
$view->data['defaultTemplates'] = $defaultTemplates;
$view->data['defaultAssets'] = $defaultAssets;
@ -892,7 +895,7 @@ final class ApiBillController extends Controller
$view->data['bill_taxes'] = $request->getDataString('bill_taxes');
$view->data['bill_currency'] = $request->getDataString('bill_currency');
// Unit specifc settings
// Unit specific settings
$view->data['bill_logo_name'] = $request->getDataString('bill_logo_name');
$view->data['bill_slogan'] = $request->getDataString('bill_slogan');
$view->data['legal_company_name'] = $request->getDataString('legal_company_name');
@ -936,42 +939,18 @@ final class ApiBillController extends Controller
/** @var \Modules\Billing\Models\Bill $bill */
$bill = BillMapper::get()
->where('id', $request->getDataInt('bill') ?? 0)
->execute();
// @todo This is stupid to do twice but I need to get the langauge.
// For the future it should just be a join on the bill langauge!!!
// The problem is the where here is a model where and not a query
// builder where meaning it is always considered a value and not a column.
/** @var \Modules\Billing\Models\Bill $bill */
$bill = BillMapper::get()
->with('elements')
->with('type')
->with('type/l11n')
->with('type/defaultTemplate')
->with('elements')
->where('id', $request->getDataInt('bill') ?? 0)
->where('type/l11n/language', $bill->language)
->where('type/l11n/language', new ColumnName(BillMapper::getColumnByMember('language')))
->execute();
$templateId = $request->getDataInt('bill_template');
if ($templateId === null) {
$templateId = $bill->type->defaultTemplate?->id;
}
// Handle PDF generation
$templateId = $request->getDataInt('bill_template') ?? $bill->type->defaultTemplate?->id ?? 0;
/** @var \Modules\Media\Models\Collection $template */
$template = CollectionMapper::get()
->with('sources')
->where('id', $templateId)
->execute();
require_once __DIR__ . '/../../../Resources/tcpdf/TCPDF.php';
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/' . \substr($template->getSourceByName('bill.pdf.php')->getPath(), 0, -8), 'pdf.php');
/** @var \Model\Setting[] $settings */
$settings = $this->app->appSettings->get(null,
/** @var \Model\Setting[] $settings */
$settings = $this->app->appSettings->get(null,
[
AdminSettingsEnum::DEFAULT_TEMPLATES,
AdminSettingsEnum::DEFAULT_ASSETS,
@ -992,17 +971,34 @@ final class ApiBillController extends Controller
);
}
/** @var \Modules\Media\Models\Collection $defaultTemplates */
$defaultTemplates = CollectionMapper::get()
$template = new NullCollection();
$defaultTemplates = new NullCollection();
$defaultAssets = new NullCollection();
/** @var \Modules\Media\Models\Collection[] $collections */
$collections = CollectionMapper::get()
->with('sources')
->where('id', (int) $settings[AdminSettingsEnum::DEFAULT_TEMPLATES]->content)
->where('id', [
(int) $settings[AdminSettingsEnum::DEFAULT_TEMPLATES]->content,
(int) $settings[AdminSettingsEnum::DEFAULT_ASSETS]->content,
$templateId
], 'IN')
->execute();
/** @var \Modules\Media\Models\Collection $defaultAssets */
$defaultAssets = CollectionMapper::get()
->with('sources')
->where('id', (int) $settings[AdminSettingsEnum::DEFAULT_ASSETS]->content)
->execute();
foreach ($collections as $collection) {
if ($collection->id === $templateId) {
$template = $collection;
} elseif ($collection->id === (int) $settings[AdminSettingsEnum::DEFAULT_TEMPLATES]->content) {
$defaultTemplates = $collection;
} elseif ($collection->id === (int) $settings[AdminSettingsEnum::DEFAULT_ASSETS]->content) {
$defaultAssets = $collection;
}
}
require_once __DIR__ . '/../../../Resources/tcpdf/TCPDF.php';
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/' . \substr($template->getSourceByName('bill.pdf.php')->getPath(), 0, -8), 'pdf.php');
$view->data['defaultTemplates'] = $defaultTemplates;
$view->data['defaultAssets'] = $defaultAssets;
@ -1297,7 +1293,7 @@ final class ApiBillController extends Controller
$old = BillElementMapper::get()->where('id', (int) $request->getData('id'))->execute();
// @todo can be edited?
// @todo adjust transfer protocolls
// @todo adjust transfer protocols
$new = $this->updateBillElementFromRequest($request, clone $old);

View File

@ -15,6 +15,14 @@ declare(strict_types=1);
namespace Modules\Billing\Controller;
use Modules\Billing\Models\PaymentTermL11nMapper;
use Modules\Billing\Models\PaymentTermMapper;
use Modules\Billing\Models\ShippingTermL11nMapper;
use Modules\Billing\Models\ShippingTermMapper;
use phpOMS\Localization\BaseStringL11n;
use phpOMS\Localization\BaseStringL11nType;
use phpOMS\Localization\ISO639x1Enum;
use phpOMS\Message\Http\RequestStatusCode;
use phpOMS\Message\RequestAbstract;
use phpOMS\Message\ResponseAbstract;
@ -368,4 +376,272 @@ final class ApiController extends Controller
public function apiSubscriptionFind(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void
{
}
/**
* Api method to create item payment type
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param array $data Generic data
*
* @return void
*
* @api
*
* @since 1.0.0
*/
public function apiPaymentTermCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void
{
if (!empty($val = $this->validatePaymentTermCreate($request))) {
$response->header->status = RequestStatusCode::R_400;
$this->createInvalidCreateResponse($request, $response, $val);
return;
}
$paymentTerm = $this->createPaymentTermFromRequest($request);
$this->createModel($request->header->account, $paymentTerm, PaymentTermMapper::class, 'payment_term', $request->getOrigin());
$this->createStandardCreateResponse($request, $response, $paymentTerm);
}
/**
* Validate payment create request
*
* @param RequestAbstract $request Request
*
* @return array<string, bool>
*
* @since 1.0.0
*/
private function validatePaymentTermCreate(RequestAbstract $request) : array
{
$val = [];
if (($val['title'] = !$request->hasData('title'))
|| ($val['name'] = !$request->hasData('name'))
) {
return $val;
}
return [];
}
/**
* Method to create payment from request.
*
* @param RequestAbstract $request Request
*
* @return BaseStringL11nType
*
* @since 1.0.0
*/
private function createPaymentTermFromRequest(RequestAbstract $request) : BaseStringL11nType
{
$paymentTerm = new BaseStringL11nType($request->getDataString('name') ?? '');
$paymentTerm->setL11n($request->getDataString('title') ?? '', $request->getDataString('language') ?? ISO639x1Enum::_EN);
return $paymentTerm;
}
/**
* Api method to create item payment l11n
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param array $data Generic data
*
* @return void
*
* @api
*
* @since 1.0.0
*/
public function apiPaymentTermL11nCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void
{
if (!empty($val = $this->validatePaymentTermL11nCreate($request))) {
$response->header->status = RequestStatusCode::R_400;
$this->createInvalidCreateResponse($request, $response, $val);
return;
}
$paymentL11n = $this->createPaymentTermL11nFromRequest($request);
$this->createModel($request->header->account, $paymentL11n, PaymentTermL11nMapper::class, 'payment_term_l11n', $request->getOrigin());
$this->createStandardCreateResponse($request, $response, $paymentL11n);
}
/**
* Validate payment l11n create request
*
* @param RequestAbstract $request Request
*
* @return array<string, bool>
*
* @since 1.0.0
*/
private function validatePaymentTermL11nCreate(RequestAbstract $request) : array
{
$val = [];
if (($val['title'] = !$request->hasData('title'))
|| ($val['type'] = !$request->hasData('type'))
) {
return $val;
}
return [];
}
/**
* Method to create payment l11n from request.
*
* @param RequestAbstract $request Request
*
* @return BaseStringL11n
*
* @since 1.0.0
*/
private function createPaymentTermL11nFromRequest(RequestAbstract $request) : BaseStringL11n
{
$paymentL11n = new BaseStringL11n();
$paymentL11n->ref = $request->getDataInt('type') ?? 0;
$paymentL11n->setLanguage(
$request->getDataString('language') ?? $request->header->l11n->language
);
$paymentL11n->content = $request->getDataString('title') ?? '';
return $paymentL11n;
}
/**
* Api method to create shipping term type
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param array $data Generic data
*
* @return void
*
* @api
*
* @since 1.0.0
*/
public function apiShippingTermCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void
{
if (!empty($val = $this->validateShippingTermCreate($request))) {
$response->header->status = RequestStatusCode::R_400;
$this->createInvalidCreateResponse($request, $response, $val);
return;
}
$shippingTerm = $this->createShippingTermFromRequest($request);
$this->createModel($request->header->account, $shippingTerm, ShippingTermMapper::class, 'shipping_term', $request->getOrigin());
$this->createStandardCreateResponse($request, $response, $shippingTerm);
}
/**
* Validate shipping create request
*
* @param RequestAbstract $request Request
*
* @return array<string, bool>
*
* @since 1.0.0
*/
private function validateShippingTermCreate(RequestAbstract $request) : array
{
$val = [];
if (($val['title'] = !$request->hasData('title'))
|| ($val['name'] = !$request->hasData('name'))
) {
return $val;
}
return [];
}
/**
* Method to create shipping from request.
*
* @param RequestAbstract $request Request
*
* @return BaseStringL11nType
*
* @since 1.0.0
*/
private function createShippingTermFromRequest(RequestAbstract $request) : BaseStringL11nType
{
$shippingTerm = new BaseStringL11nType($request->getDataString('name') ?? '');
$shippingTerm->setL11n($request->getDataString('title') ?? '', $request->getDataString('language') ?? ISO639x1Enum::_EN);
return $shippingTerm;
}
/**
* Api method to create shipping term l11n
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param array $data Generic data
*
* @return void
*
* @api
*
* @since 1.0.0
*/
public function apiShippingTermL11nCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void
{
if (!empty($val = $this->validateShippingTermL11nCreate($request))) {
$response->header->status = RequestStatusCode::R_400;
$this->createInvalidCreateResponse($request, $response, $val);
return;
}
$shippingL11n = $this->createShippingTermL11nFromRequest($request);
$this->createModel($request->header->account, $shippingL11n, ShippingTermL11nMapper::class, 'shipping_term_l11n', $request->getOrigin());
$this->createStandardCreateResponse($request, $response, $shippingL11n);
}
/**
* Validate shipping l11n create request
*
* @param RequestAbstract $request Request
*
* @return array<string, bool>
*
* @since 1.0.0
*/
private function validateShippingTermL11nCreate(RequestAbstract $request) : array
{
$val = [];
if (($val['title'] = !$request->hasData('title'))
|| ($val['type'] = !$request->hasData('type'))
) {
return $val;
}
return [];
}
/**
* Method to create shipping l11n from request.
*
* @param RequestAbstract $request Request
*
* @return BaseStringL11n
*
* @since 1.0.0
*/
private function createShippingTermL11nFromRequest(RequestAbstract $request) : BaseStringL11n
{
$shippingL11n = new BaseStringL11n();
$shippingL11n->ref = $request->getDataInt('type') ?? 0;
$shippingL11n->setLanguage(
$request->getDataString('language') ?? $request->header->l11n->language
);
$shippingL11n->content = $request->getDataString('title') ?? '';
return $shippingL11n;
}
}

View File

@ -81,13 +81,13 @@ final class ApiPriceController extends Controller
/** @var null|\Modules\SupplierManagement\Models\Supplier $supplier */
$supplier = null;
if ($request->hasData('price_client')) {
if ($request->hasData('client')) {
/** @var \Modules\ClientManagement\Models\Client $client */
$client = ClientMapper::get()
->with('attributes')
->with('attributes/type')
->with('attributes/value')
->where('id', (int) $request->getData('price_client'))
->where('id', (int) $request->getData('client'))
->execute();
/** @var \Modules\ClientManagement\Models\Client */
@ -98,7 +98,7 @@ final class ApiPriceController extends Controller
->with('attributes')
->with('attributes/type')
->with('attributes/value')
->where('id', (int) $request->getData('price_supplier'))
->where('id', (int) $request->getData('supplier'))
->execute();
/** @var \Modules\SupplierManagement\Models\Supplier $account */
@ -109,28 +109,29 @@ final class ApiPriceController extends Controller
$queryMapper = PriceMapper::getAll();
if ($request->hasData('price_name')) {
$queryMapper->where('name', $request->getData('price_name'));
$queryMapper->where('name', $request->getData('name'));
}
$queryMapper->where('promocode', \array_unique([$request->getData('price_promocode'), null]), 'IN');
$queryMapper->where('promocode', \array_unique([$request->getData('promocode'), null]), 'IN');
$queryMapper->where('item', \array_unique([$request->getData('price_item', 'int'), null]), 'IN');
$queryMapper->where('itemgroup', \array_unique([$request->getData('price_itemgroup', 'int'), $item?->getAttribute('itemgroup')->id, null]), 'IN');
$queryMapper->where('itemsegment', \array_unique([$request->getData('price_itemsegment', 'int'), $item?->getAttribute('itemsegment')->id, null]), 'IN');
$queryMapper->where('itemsection', \array_unique([$request->getData('price_itemsection', 'int'), $item?->getAttribute('itemsection')->id, null]), 'IN');
$queryMapper->where('itemtype', \array_unique([$request->getData('price_itemtype', 'int'), $item?->getAttribute('itemtype')->id, null]), 'IN');
$queryMapper->where('item', \array_unique([$request->getData('item', 'int'), null]), 'IN');
$queryMapper->where('itemsalesgroup', \array_unique([$request->getData('sales_group', 'int'), $item?->getAttribute('sales_group')->id, null]), 'IN');
$queryMapper->where('itemproductgroup', \array_unique([$request->getData('product_group', 'int'), $item?->getAttribute('product_group')->id, null]), 'IN');
$queryMapper->where('itemsegment', \array_unique([$request->getData('item_segment', 'int'), $item?->getAttribute('segment')->id, null]), 'IN');
$queryMapper->where('itemsection', \array_unique([$request->getData('item_section', 'int'), $item?->getAttribute('section')->id, null]), 'IN');
$queryMapper->where('itemtype', \array_unique([$request->getData('product_type', 'int'), $item?->getAttribute('product_type')->id, null]), 'IN');
$queryMapper->where('client', \array_unique([$request->getData('price_client', 'int'), null]), 'IN');
$queryMapper->where('clientgroup', \array_unique([$request->getData('price_clientgroup', 'int'), $client?->getAttribute('clientgroup')->id, null]), 'IN');
$queryMapper->where('clientsegment', \array_unique([$request->getData('price_clientsegment', 'int'), $client?->getAttribute('clientsegment')->id, null]), 'IN');
$queryMapper->where('clientsection', \array_unique([$request->getData('price_clientsection', 'int'), $client?->getAttribute('clientsection')->id, null]), 'IN');
$queryMapper->where('clienttype', \array_unique([$request->getData('price_clienttype', 'int'), $client?->getAttribute('clienttype')->id, null]), 'IN');
$queryMapper->where('clientcountry', \array_unique([$request->getData('price_clientcountry'), $client?->mainAddress->getCountry(), null]), 'IN');
$queryMapper->where('client', \array_unique([$request->getData('client', 'int'), null]), 'IN');
$queryMapper->where('clientgroup', \array_unique([$request->getData('client_group', 'int'), $client?->getAttribute('client_group')->id, null]), 'IN');
$queryMapper->where('clientsegment', \array_unique([$request->getData('client_segment', 'int'), $client?->getAttribute('segment')->id, null]), 'IN');
$queryMapper->where('clientsection', \array_unique([$request->getData('client_section', 'int'), $client?->getAttribute('section')->id, null]), 'IN');
$queryMapper->where('clienttype', \array_unique([$request->getData('client_type', 'int'), $client?->getAttribute('client_type')->id, null]), 'IN');
$queryMapper->where('clientcountry', \array_unique([$request->getData('client_region'), $client?->mainAddress->getCountry(), null]), 'IN');
$queryMapper->where('supplier', \array_unique([$request->getData('price_supplier', 'int'), null]), 'IN');
$queryMapper->where('supplier', \array_unique([$request->getData('supplier', 'int'), null]), 'IN');
$queryMapper->where('unit', \array_unique([$request->getData('price_unit', 'int'), null]), 'IN');
$queryMapper->where('type', $request->getData('price_type', 'int') ?? PriceType::SALES);
$queryMapper->where('currency', \array_unique([$request->getData('price_currency', 'int'), null]), 'IN');
$queryMapper->where('currency', \array_unique([$request->getData('currency', 'int'), null]), 'IN');
// @todo implement start and end
@ -153,7 +154,8 @@ final class ApiPriceController extends Controller
foreach ($prices as $price) {
if ($price->price->value !== 0 && $price->priceNew === 0
&& $price->item->id !== 0
&& $price->itemgroup->id === 0
&& $price->itemsalesgroup->id === 0
&& $price->itemproductgroup->id === 0
&& $price->itemsegment->id === 0
&& $price->itemsection->id === 0
&& $price->itemtype->id === 0
@ -261,15 +263,16 @@ final class ApiPriceController extends Controller
$price->promocode = $request->getDataString('promocode') ?? '';
$price->item = new NullItem((int) $request->getData('item'));
$price->itemgroup = new NullAttributeValue((int) $request->getData('itemgroup'));
$price->itemsegment = new NullAttributeValue((int) $request->getData('itemsegment'));
$price->itemsection = new NullAttributeValue((int) $request->getData('itemsection'));
$price->itemsalesgroup = new NullAttributeValue((int) $request->getData('itemsalesgroup'));
$price->itemproductgroup = new NullAttributeValue((int) $request->getData('itemproductgroup'));
$price->itemtype = new NullAttributeValue((int) $request->getData('itemtype'));
$price->client = new NullClient((int) $request->getData('client'));
$price->clientgroup = new NullAttributeValue((int) $request->getData('clientgroup'));
$price->clientsegment = new NullAttributeValue((int) $request->getData('clientsegment'));
$price->clientsection = new NullAttributeValue((int) $request->getData('clientsection'));
$price->clientgroup = new NullAttributeValue((int) $request->getData('clientgroup'));
$price->clienttype = new NullAttributeValue((int) $request->getData('clienttype'));
$price->supplier = new NullSupplier((int) $request->getData('supplier'));
@ -283,8 +286,8 @@ final class ApiPriceController extends Controller
$price->bonus = (int) $request->getData('bonus');
$price->multiply = $request->getDataBool('multiply') ?? false;
$price->currency = $request->getDataString('currency') ?? ISO4217CharEnum::_EUR;
$price->start = $request->getDataDateTime('start') ?? null;
$price->end = $request->getDataDateTime('end') ?? null;
$price->start = $request->getDataDateTime('start');
$price->end = $request->getDataDateTime('end');
return $price;
}
@ -360,7 +363,8 @@ final class ApiPriceController extends Controller
$new->promocode = $request->getDataString('promocode') ?? $new->promocode;
$new->item = $request->hasData('item') ? new NullItem((int) $request->getData('item')) : $new->item;
$new->itemgroup = $request->hasData('itemgroup') ? new NullAttributeValue((int) $request->getData('itemgroup')) : $new->itemgroup;
$new->itemsalesgroup = $request->hasData('itemsalesgroup') ? new NullAttributeValue((int) $request->getData('itemsalesgroup')) : $new->itemsalesgroup;
$new->itemproductgroup = $request->hasData('itemproductgroup') ? new NullAttributeValue((int) $request->getData('itemproductgroup')) : $new->itemproductgroup;
$new->itemsegment = $request->hasData('itemsegment') ? new NullAttributeValue((int) $request->getData('itemsegment')) : $new->itemsegment;
$new->itemsection = $request->hasData('itemsection') ? new NullAttributeValue((int) $request->getData('itemsection')) : $new->itemsection;
$new->itemtype = $request->hasData('itemtype') ? new NullAttributeValue((int) $request->getData('itemtype')) : $new->itemtype;

View File

@ -45,7 +45,7 @@ final class ApiTaxController extends Controller
* Get tax code from client and item.
*
* @param Client $client Client to get tax code from
* @param Item $item Item toget tax code from
* @param Item $item Item to get tax code from
* @param string $defaultCountry default country to use if no valid tax code could be found and if the unit country code shouldn't be used
*
* @return TaxCode

View File

@ -20,9 +20,13 @@ use Modules\Billing\Models\BillMapper;
use Modules\Billing\Models\BillStatus;
use Modules\Billing\Models\BillTransferType;
use Modules\Billing\Models\BillTypeMapper;
use Modules\Billing\Models\PaymentTermL11nMapper;
use Modules\Billing\Models\PaymentTermMapper;
use Modules\Billing\Models\PurchaseBillMapper;
use Modules\Billing\Models\SalesBillMapper;
use Modules\Billing\Models\SettingsEnum;
use Modules\Billing\Models\ShippingTermL11nMapper;
use Modules\Billing\Models\ShippingTermMapper;
use Modules\Billing\Models\StockBillMapper;
use phpOMS\Contract\RenderableInterface;
use phpOMS\DataStorage\Database\Query\OrderType;
@ -117,6 +121,15 @@ final class BackendController extends Controller
$view->data['bill'] = $bill;
$billTypes = BillTypeMapper::getAll()
->with('l11n')
->where('isTemplate', false)
->where('transferType', BillTransferType::SALES)
->where('l11n/language', $request->header->l11n->language)
->execute();
$view->data['billtypes'] = $billTypes;
/** @var \Modules\Auditor\Models\Audit[] $logsBill */
$logs = AuditMapper::getAll()
->with('createdBy')
@ -172,9 +185,7 @@ final class BackendController extends Controller
$view->data['billtypes'] = $billTypes;
$mediaListView = new \Modules\Media\Theme\Backend\Components\Media\ListView($this->app->l11nManager, $request, $response);
$mediaListView->setTemplate('/Modules/Media/Theme/Backend/Components/Media/list');
$view->data['medialist'] = $mediaListView;
$view->data['media-upload'] = new \Modules\Media\Theme\Backend\Components\Upload\BaseView($this->app->l11nManager, $request, $response);
return $view;
}
@ -296,13 +307,14 @@ final class BackendController extends Controller
$view->data['bill'] = $bill;
/** @var \Model\Setting $previewType */
$previewType = $this->app->appSettings->get(
names: SettingsEnum::PREVIEW_MEDIA_TYPE,
module: self::NAME
);
$billTypes = BillTypeMapper::getAll()
->with('l11n')
->where('isTemplate', false)
->where('transferType', BillTransferType::PURCHASE)
->where('l11n/language', $request->header->l11n->language)
->execute();
$view->data['previewType'] = (int) $previewType->content;
$view->data['billtypes'] = $billTypes;
/** @var \Model\Setting $originalType */
$originalType = $this->app->appSettings->get(
@ -527,4 +539,128 @@ final class BackendController extends Controller
return $view;
}
/**
* Routing end-point for application behavior.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param array $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewPaymentList(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
{
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/Billing/Theme/Backend/payment-type-list');
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002901101, $request, $response);
$view->data['types'] = PaymentTermMapper::getAll()
->with('l11n')
->where('l11n/language', $response->header->l11n->language)
->execute();
return $view;
}
/**
* Routing end-point for application behavior.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param array $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewPaymentView(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
{
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/Billing/Theme/Backend/payment-view');
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002901101, $request, $response);
$view->data['type'] = PaymentTermMapper::get()
->with('l11n')
->where('id', (int) $request->getData('id'))
->where('l11n/language', $response->header->l11n->language)
->execute();
$view->data['l11nView'] = new \Web\Backend\Views\L11nView($this->app->l11nManager, $request, $response);
/** @var \phpOMS\Localization\BaseStringL11n[] $l11nValues */
$l11nValues = PaymentTermL11nMapper::getAll()
->where('ref', $view->data['type']->id)
->execute();
$view->data['l11nValues'] = $l11nValues;
return $view;
}
/**
* Routing end-point for application behavior.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param array $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewShippingList(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
{
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/Billing/Theme/Backend/shipping-type-list');
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002901101, $request, $response);
$view->data['types'] = ShippingTermMapper::getAll()
->with('l11n')
->where('l11n/language', $response->header->l11n->language)
->execute();
return $view;
}
/**
* Routing end-point for application behavior.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param array $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewShippingView(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
{
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/Billing/Theme/Backend/shipping-view');
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002901101, $request, $response);
$view->data['type'] = ShippingTermMapper::get()
->with('l11n')
->where('id', (int) $request->getData('id'))
->where('l11n/language', $response->header->l11n->language)
->execute();
$view->data['l11nView'] = new \Web\Backend\Views\L11nView($this->app->l11nManager, $request, $response);
/** @var \phpOMS\Localization\BaseStringL11n[] $l11nValues */
$l11nValues = ShippingTermL11nMapper::getAll()
->where('ref', $view->data['type']->id)
->execute();
$view->data['l11nValues'] = $l11nValues;
return $view;
}
}

View File

@ -40,7 +40,7 @@ use phpOMS\Views\View;
final class CliController extends Controller
{
/**
* Analyse supplier bill
* Analyze supplier bill
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
@ -78,7 +78,7 @@ final class CliController extends Controller
$language = $this->detectLanguage($content);
$bill->language = $language;
$identifierContent = \file_get_contents(__DIR__ . '/../Models/billIdentifier.json');
$identifierContent = \file_get_contents(__DIR__ . '/../Models/bill_identifier.json');
if ($identifierContent === false) {
$identifierContent = '{}';
}
@ -130,10 +130,20 @@ final class CliController extends Controller
$billDue = $this->parseDate($billDueTemp, $supplier, $identifiers['date_format']);
// @todo implement multiple due dates for bills
/* Total Net */
$totalNet = $this->findBillNet($lines, $identifiers['total_net'][$language]);
$bill->netCosts = new FloatInt($totalNet);
/* Total Tax */
$totalTaxAmount = $this->findBillTaxAmount($lines, $identifiers['total_net'][$language]);
/* Total Gross */
$totalGross = $this->findBillGross($lines, $identifiers['total_gross'][$language]);
$bill->grossCosts = new FloatInt($totalGross);
/* Item lines */
$itemLines = $this->findBillItemLines($lines, $identifiers['item_table'][$language]);
$this->updateModel($request->header->account, $old, $bill, BillMapper::class, 'bill_parsing', $request->getOrigin());
$view = new View($this->app->l11nManager, $request, $response);
@ -294,6 +304,91 @@ final class CliController extends Controller
return $bestMatch;
}
/**
* Detect the supplier bill gross amount
*
* @param string[] $lines Bill lines
* @param array $matches Tax match patterns
*
* @return int
*
* @since 1.0.0
* @todo What about multiple tax lines?
*/
private function findBillTaxAmount(array $lines, array $matches) : int
{
$bestMatch = 0;
$found = [];
foreach ($matches as $match) {
foreach ($lines as $line) {
if (\preg_match($match, $line, $found) === 1) {
$temp = \trim($found['total_tax']);
$posD = \stripos($temp, '.');
$posK = \stripos($temp, ',');
$hasDecimal = ($posD !== false || $posK !== false)
&& \max((int) $posD, (int) $posK) + 3 >= \strlen($temp);
$gross = ((int) \str_replace(['.', ','], ['', ''], $temp)) * ($hasDecimal
? 100
: 10000);
if ($gross > $bestMatch) {
$bestMatch = $gross;
}
}
}
}
return $bestMatch;
}
/**
* Detect the supplier bill gross amount
*
* @param string[] $lines Bill lines
* @param array $matches Net match patterns
*
* @return int
*
* @since 1.0.0
* @todo maybe check with taxes
* @todo maybe make sure text position is before total_gross
*/
private function findBillNet(array $lines, array $matches) : int
{
$bestMatch = 0;
$found = [];
foreach ($matches as $match) {
foreach ($lines as $line) {
if (\preg_match($match, $line, $found) === 1) {
$temp = \trim($found['total_net']);
$posD = \stripos($temp, '.');
$posK = \stripos($temp, ',');
$hasDecimal = ($posD !== false || $posK !== false)
&& \max((int) $posD, (int) $posK) + 3 >= \strlen($temp);
$gross = ((int) \str_replace(['.', ','], ['', ''], $temp)) * ($hasDecimal
? 100
: 10000);
if ($gross > $bestMatch) {
$bestMatch = $gross;
}
}
}
}
return $bestMatch;
}
/**
* Detect the supplier bill gross amount
*
@ -335,12 +430,70 @@ final class CliController extends Controller
return $bestMatch;
}
/**
* Detect the supplier bill gross amount
*
* @param string[] $lines Bill lines
* @param array $matches Item lines match patterns
*
* @return array
*
* @since 1.0.0
*/
private function findBillItemLines(array $lines, array $matches) : array
{
// Find start for item list (should be a headline containing certain words)
$startLine = 0;
$bestMatch = 0;
foreach ($lines as $idx => $line) {
$headlineMatches = 0;
foreach ($matches['headline'] as $match) {
foreach ($match as $headline) {
if (\stripos($line, $headline) !== false) {
++$headlineMatches;
continue;
}
}
}
if ($headlineMatches > $bestMatch && $headlineMatches > 1) {
$bestMatch = $headlineMatches;
$startLine = $idx;
}
}
if ($startLine === 0) {
return [];
}
// Get headline structure = item list structure
$headlineStructure = [];
foreach ($matches['headline'] as $type => $match) {
foreach ($match as $headline) {
if (($pos = \stripos($line, $headline)) !== false) {
$headlineStructure[$type] = $pos;
continue;
}
}
}
\asort($headlineStructure);
// Get item list until end of item list/table is reached
return [];
}
/**
* Find possible supplier id
*
* Priorities:
* 1. bill_match_pattern
* 2. name1 + iban
* 2. name1 + IBAN
* 3. name1 + city || address
* 4. name1
*
@ -363,7 +516,7 @@ final class CliController extends Controller
}
}
// name1 + iban
// name1 + IBAN
foreach ($suppliers as $supplier) {
if (\stripos($content, $supplier->account->name1) !== false) {
$ibans = $supplier->getPaymentsByType(PaymentType::SWIFT);

View File

@ -42,6 +42,7 @@ final class BillAttributeTypeMapper extends DataMapperFactory
'billing_attr_type_datatype' => ['name' => 'billing_attr_type_datatype', 'type' => 'int', 'internal' => 'datatype'],
'billing_attr_type_fields' => ['name' => 'billing_attr_type_fields', 'type' => 'int', 'internal' => 'fields'],
'billing_attr_type_custom' => ['name' => 'billing_attr_type_custom', 'type' => 'bool', 'internal' => 'custom'],
'billing_attr_type_repeatable' => ['name' => 'billing_attr_type_repeatable', 'type' => 'bool', 'internal' => 'repeatable'],
'billing_attr_type_pattern' => ['name' => 'billing_attr_type_pattern', 'type' => 'string', 'internal' => 'validationPattern'],
'billing_attr_type_required' => ['name' => 'billing_attr_type_required', 'type' => 'bool', 'internal' => 'isRequired'],
];

View File

@ -59,6 +59,7 @@ final class BillAttributeValueMapper extends DataMapperFactory
'mapper' => BillAttributeValueL11nMapper::class,
'table' => 'billing_attr_value_l11n',
'self' => 'billing_attr_value_l11n_value',
'column' => 'content',
'external' => null,
],
];

View File

@ -239,7 +239,7 @@ class Bill implements \JsonSerializable
public string $billEmail = '';
/**
* Person refering for this order.
* Person referring for this order.
*
* @var Account
* @since 1.0.0
@ -360,12 +360,6 @@ class Bill implements \JsonSerializable
*/
public string $info = '';
/**
* Payment type.
*
* @var int
* @since 1.0.0
*/
public int $payment = 0;
/**
@ -384,6 +378,9 @@ class Bill implements \JsonSerializable
*/
public int $terms = 0;
public ?int $paymentTerms = null;
public ?int $shippingTerms = null;
/**
* Terms text.
*
@ -392,14 +389,6 @@ class Bill implements \JsonSerializable
*/
public string $termsText = '';
/**
* Shipping.
*
* @var int
* @since 1.0.0
*/
public int $shipping = 0;
/**
* Shipping text.
*
@ -492,6 +481,9 @@ class Bill implements \JsonSerializable
'{id}',
'{sequence}',
'{type}',
'{unit}',
'{account}',
'{country}',
],
[
$this->createdAt->format('Y'),
@ -500,6 +492,9 @@ class Bill implements \JsonSerializable
$this->id,
$this->sequence,
$this->type->id,
$this->unit,
$this->accountNumber,
$this->billCountry
],
$this->type->numberFormat
);

View File

@ -16,6 +16,7 @@ namespace Modules\Billing\Models;
use Modules\Finance\Models\TaxCode;
use Modules\ItemManagement\Models\Item;
use Modules\ItemManagement\Models\NullItem;
use phpOMS\Stdlib\Base\FloatInt;
use phpOMS\Stdlib\Base\SmartDateTime;
@ -39,8 +40,7 @@ class BillElement implements \JsonSerializable
public int $order = 0;
/** @todo consider to reference the model instead of the int, this would make it much easier in other places like the shop */
public ?int $item = null;
public ?Item $item = null;
public string $itemNumber = '';
@ -222,7 +222,7 @@ class BillElement implements \JsonSerializable
*/
public function setItem(int $item) : void
{
$this->item = $item;
$this->item = new NullItem($item);
}
/**
@ -241,7 +241,7 @@ class BillElement implements \JsonSerializable
{
$element = new self();
$element->bill = new NullBill($bill);
$element->item = empty($item->id) ? null : $item->id;
$element->item = empty($item->id) ? null : $item;
$element->itemNumber = $item->number;
$element->itemName = $item->getL11n('name1')->content;
$element->itemDescription = $item->getL11n('description_short')->content;
@ -279,7 +279,7 @@ class BillElement implements \JsonSerializable
) {
$element->subscription = new Subscription();
$element->subscription->bill = $element->bill->id;
$element->subscription->item = $element->item;
$element->subscription->item = $element->item->id;
$element->subscription->start = new \DateTime('now'); // @todo change to bill performanceDate
$element->subscription->end = new SmartDateTime('now'); // @todo depends on subscription type
$element->subscription->end->smartModify(m: 1);
@ -299,7 +299,7 @@ class BillElement implements \JsonSerializable
return [
'id' => $this->id,
'order' => $this->order,
'item' => $this->item,
'item' => $this->item->id,
'itemNumber' => $this->itemNumber,
'itemName' => $this->itemName,
'itemDescription' => $this->itemDescription,

View File

@ -14,6 +14,7 @@ declare(strict_types=1);
namespace Modules\Billing\Models;
use Modules\ItemManagement\Models\ItemMapper;
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
/**
@ -94,6 +95,10 @@ final class BillElementMapper extends DataMapperFactory
'mapper' => SubscriptionMapper::class,
'external' => 'billing_bill_element_subscription',
],
'item' => [
'mapper' => ItemMapper::class,
'external' => 'billing_bill_element_item',
],
];
/**

View File

@ -45,55 +45,55 @@ class BillMapper extends DataMapperFactory
* @since 1.0.0
*/
public const COLUMNS = [
'billing_bill_id' => ['name' => 'billing_bill_id', 'type' => 'int', 'internal' => 'id'],
'billing_bill_sequence' => ['name' => 'billing_bill_sequence', 'type' => 'int', 'internal' => 'sequence'],
'billing_bill_number' => ['name' => 'billing_bill_number', 'type' => 'string', 'internal' => 'number'],
'billing_bill_type' => ['name' => 'billing_bill_type', 'type' => 'int', 'internal' => 'type'],
'billing_bill_template' => ['name' => 'billing_bill_template', 'type' => 'int', 'internal' => 'template'],
'billing_bill_header' => ['name' => 'billing_bill_header', 'type' => 'string', 'internal' => 'header'],
'billing_bill_footer' => ['name' => 'billing_bill_footer', 'type' => 'string', 'internal' => 'footer'],
'billing_bill_info' => ['name' => 'billing_bill_info', 'type' => 'string', 'internal' => 'info'],
'billing_bill_status' => ['name' => 'billing_bill_status', 'type' => 'int', 'internal' => 'status'],
'billing_bill_paymentstatus' => ['name' => 'billing_bill_paymentstatus', 'type' => 'int', 'internal' => 'paymentStatus'],
'billing_bill_shipTo' => ['name' => 'billing_bill_shipTo', 'type' => 'string', 'internal' => 'shipTo'],
'billing_bill_shipFAO' => ['name' => 'billing_bill_shipFAO', 'type' => 'string', 'internal' => 'shipFAO'],
'billing_bill_shipAddr' => ['name' => 'billing_bill_shipAddr', 'type' => 'string', 'internal' => 'shipAddress'],
'billing_bill_shipCity' => ['name' => 'billing_bill_shipCity', 'type' => 'string', 'internal' => 'shipCity'],
'billing_bill_shipZip' => ['name' => 'billing_bill_shipZip', 'type' => 'string', 'internal' => 'shipZip'],
'billing_bill_shipCountry' => ['name' => 'billing_bill_shipCountry', 'type' => 'string', 'internal' => 'shipCountry'],
'billing_bill_billTo' => ['name' => 'billing_bill_billTo', 'type' => 'string', 'internal' => 'billTo'],
'billing_bill_billFAO' => ['name' => 'billing_bill_billFAO', 'type' => 'string', 'internal' => 'billFAO'],
'billing_bill_billAddr' => ['name' => 'billing_bill_billAddr', 'type' => 'string', 'internal' => 'billAddress'],
'billing_bill_billCity' => ['name' => 'billing_bill_billCity', 'type' => 'string', 'internal' => 'billCity'],
'billing_bill_billZip' => ['name' => 'billing_bill_billZip', 'type' => 'string', 'internal' => 'billZip'],
'billing_bill_billCountry' => ['name' => 'billing_bill_billCountry', 'type' => 'string', 'internal' => 'billCountry'],
'billing_bill_netprofit' => ['name' => 'billing_bill_netprofit', 'type' => 'Serializable', 'internal' => 'netProfit'],
'billing_bill_grossprofit' => ['name' => 'billing_bill_grossprofit', 'type' => 'Serializable', 'internal' => 'grossProfit'],
'billing_bill_netcosts' => ['name' => 'billing_bill_netcosts', 'type' => 'Serializable', 'internal' => 'netCosts'],
'billing_bill_grosscosts' => ['name' => 'billing_bill_grosscosts', 'type' => 'Serializable', 'internal' => 'grossCosts'],
'billing_bill_netsales' => ['name' => 'billing_bill_netsales', 'type' => 'Serializable', 'internal' => 'netSales'],
'billing_bill_grosssales' => ['name' => 'billing_bill_grosssales', 'type' => 'Serializable', 'internal' => 'grossSales'],
'billing_bill_netdiscount' => ['name' => 'billing_bill_netdiscount', 'type' => 'Serializable', 'internal' => 'netDiscount'],
'billing_bill_grossdiscount' => ['name' => 'billing_bill_grossdiscount', 'type' => 'Serializable', 'internal' => 'grossDiscount'],
'billing_bill_currency' => ['name' => 'billing_bill_currency', 'type' => 'string', 'internal' => 'currency'],
'billing_bill_language' => ['name' => 'billing_bill_language', 'type' => 'string', 'internal' => 'language'],
'billing_bill_referral' => ['name' => 'billing_bill_referral', 'type' => 'int', 'internal' => 'referral'],
'billing_bill_referral_name' => ['name' => 'billing_bill_referral_name', 'type' => 'string', 'internal' => 'referralName'],
'billing_bill_reference' => ['name' => 'billing_bill_reference', 'type' => 'int', 'internal' => 'reference'],
'billing_bill_payment' => ['name' => 'billing_bill_payment', 'type' => 'int', 'internal' => 'payment'],
'billing_bill_payment_text' => ['name' => 'billing_bill_payment_text', 'type' => 'string', 'internal' => 'paymentText'],
'billing_bill_paymentterms' => ['name' => 'billing_bill_paymentterms', 'type' => 'int', 'internal' => 'terms'],
'billing_bill_paymentterms_text' => ['name' => 'billing_bill_paymentterms_text', 'type' => 'string', 'internal' => 'termsText'],
'billing_bill_ship_type' => ['name' => 'billing_bill_ship_type', 'type' => 'int', 'internal' => 'shipping'],
'billing_bill_ship_text' => ['name' => 'billing_bill_ship_text', 'type' => 'string', 'internal' => 'shippingText'],
'billing_bill_account_no' => ['name' => 'billing_bill_account_no', 'type' => 'string', 'internal' => 'accountNumber'],
'billing_bill_client' => ['name' => 'billing_bill_client', 'type' => 'int', 'internal' => 'client'],
'billing_bill_supplier' => ['name' => 'billing_bill_supplier', 'type' => 'int', 'internal' => 'supplier'],
'billing_bill_created_by' => ['name' => 'billing_bill_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
'billing_bill_date' => ['name' => 'billing_bill_date', 'type' => 'DateTime', 'internal' => 'billDate'],
'billing_bill_performance_date' => ['name' => 'billing_bill_performance_date', 'type' => 'DateTime', 'internal' => 'performanceDate', 'readonly' => true],
'billing_bill_created_at' => ['name' => 'billing_bill_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
'billing_bill_unit' => ['name' => 'billing_bill_unit', 'type' => 'int', 'internal' => 'unit'],
'billing_bill_id' => ['name' => 'billing_bill_id', 'type' => 'int', 'internal' => 'id'],
'billing_bill_sequence' => ['name' => 'billing_bill_sequence', 'type' => 'int', 'internal' => 'sequence'],
'billing_bill_number' => ['name' => 'billing_bill_number', 'type' => 'string', 'internal' => 'number'],
'billing_bill_type' => ['name' => 'billing_bill_type', 'type' => 'int', 'internal' => 'type'],
'billing_bill_template' => ['name' => 'billing_bill_template', 'type' => 'int', 'internal' => 'template'],
'billing_bill_header' => ['name' => 'billing_bill_header', 'type' => 'string', 'internal' => 'header'],
'billing_bill_footer' => ['name' => 'billing_bill_footer', 'type' => 'string', 'internal' => 'footer'],
'billing_bill_info' => ['name' => 'billing_bill_info', 'type' => 'string', 'internal' => 'info'],
'billing_bill_status' => ['name' => 'billing_bill_status', 'type' => 'int', 'internal' => 'status'],
'billing_bill_paymentstatus' => ['name' => 'billing_bill_paymentstatus', 'type' => 'int', 'internal' => 'paymentStatus'],
'billing_bill_shipTo' => ['name' => 'billing_bill_shipTo', 'type' => 'string', 'internal' => 'shipTo'],
'billing_bill_shipFAO' => ['name' => 'billing_bill_shipFAO', 'type' => 'string', 'internal' => 'shipFAO'],
'billing_bill_shipAddr' => ['name' => 'billing_bill_shipAddr', 'type' => 'string', 'internal' => 'shipAddress'],
'billing_bill_shipCity' => ['name' => 'billing_bill_shipCity', 'type' => 'string', 'internal' => 'shipCity'],
'billing_bill_shipZip' => ['name' => 'billing_bill_shipZip', 'type' => 'string', 'internal' => 'shipZip'],
'billing_bill_shipCountry' => ['name' => 'billing_bill_shipCountry', 'type' => 'string', 'internal' => 'shipCountry'],
'billing_bill_billTo' => ['name' => 'billing_bill_billTo', 'type' => 'string', 'internal' => 'billTo'],
'billing_bill_billFAO' => ['name' => 'billing_bill_billFAO', 'type' => 'string', 'internal' => 'billFAO'],
'billing_bill_billAddr' => ['name' => 'billing_bill_billAddr', 'type' => 'string', 'internal' => 'billAddress'],
'billing_bill_billCity' => ['name' => 'billing_bill_billCity', 'type' => 'string', 'internal' => 'billCity'],
'billing_bill_billZip' => ['name' => 'billing_bill_billZip', 'type' => 'string', 'internal' => 'billZip'],
'billing_bill_billCountry' => ['name' => 'billing_bill_billCountry', 'type' => 'string', 'internal' => 'billCountry'],
'billing_bill_netprofit' => ['name' => 'billing_bill_netprofit', 'type' => 'Serializable', 'internal' => 'netProfit'],
'billing_bill_grossprofit' => ['name' => 'billing_bill_grossprofit', 'type' => 'Serializable', 'internal' => 'grossProfit'],
'billing_bill_netcosts' => ['name' => 'billing_bill_netcosts', 'type' => 'Serializable', 'internal' => 'netCosts'],
'billing_bill_grosscosts' => ['name' => 'billing_bill_grosscosts', 'type' => 'Serializable', 'internal' => 'grossCosts'],
'billing_bill_netsales' => ['name' => 'billing_bill_netsales', 'type' => 'Serializable', 'internal' => 'netSales'],
'billing_bill_grosssales' => ['name' => 'billing_bill_grosssales', 'type' => 'Serializable', 'internal' => 'grossSales'],
'billing_bill_netdiscount' => ['name' => 'billing_bill_netdiscount', 'type' => 'Serializable', 'internal' => 'netDiscount'],
'billing_bill_grossdiscount' => ['name' => 'billing_bill_grossdiscount', 'type' => 'Serializable', 'internal' => 'grossDiscount'],
'billing_bill_currency' => ['name' => 'billing_bill_currency', 'type' => 'string', 'internal' => 'currency'],
'billing_bill_language' => ['name' => 'billing_bill_language', 'type' => 'string', 'internal' => 'language'],
'billing_bill_referral' => ['name' => 'billing_bill_referral', 'type' => 'int', 'internal' => 'referral'],
'billing_bill_referral_name' => ['name' => 'billing_bill_referral_name', 'type' => 'string', 'internal' => 'referralName'],
'billing_bill_reference' => ['name' => 'billing_bill_reference', 'type' => 'int', 'internal' => 'reference'],
'billing_bill_payment' => ['name' => 'billing_bill_payment', 'type' => 'int', 'internal' => 'payment'],
'billing_bill_payment_text' => ['name' => 'billing_bill_payment_text', 'type' => 'string', 'internal' => 'paymentText'],
'billing_bill_paymentterms' => ['name' => 'billing_bill_paymentterms', 'type' => 'int', 'internal' => 'paymentTerms'],
'billing_bill_paymentterms_text'=> ['name' => 'billing_bill_paymentterms_text', 'type' => 'string', 'internal' => 'termsText'],
'billing_bill_ship_type' => ['name' => 'billing_bill_ship_type', 'type' => 'int', 'internal' => 'shippingTerms'],
'billing_bill_ship_text' => ['name' => 'billing_bill_ship_text', 'type' => 'string', 'internal' => 'shippingText'],
'billing_bill_account_no' => ['name' => 'billing_bill_account_no', 'type' => 'string', 'internal' => 'accountNumber'],
'billing_bill_client' => ['name' => 'billing_bill_client', 'type' => 'int', 'internal' => 'client'],
'billing_bill_supplier' => ['name' => 'billing_bill_supplier', 'type' => 'int', 'internal' => 'supplier'],
'billing_bill_created_by' => ['name' => 'billing_bill_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
'billing_bill_date' => ['name' => 'billing_bill_date', 'type' => 'DateTime', 'internal' => 'billDate'],
'billing_bill_performance_date' => ['name' => 'billing_bill_performance_date', 'type' => 'DateTime', 'internal' => 'performanceDate', 'readonly' => true],
'billing_bill_created_at' => ['name' => 'billing_bill_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
'billing_bill_unit' => ['name' => 'billing_bill_unit', 'type' => 'int', 'internal' => 'unit'],
];
/**

View File

@ -30,5 +30,7 @@ abstract class BillTransferType extends Enum
public const PURCHASE = 2;
public const PRODUCTION = 3;
public const STOCK = 4;
}

View File

@ -0,0 +1,69 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
namespace Modules\Billing\Models;
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
use phpOMS\Localization\BaseStringL11n;
/**
* Item mapper class.
*
* @package Modules\Billing\Models
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*
* @template T of BaseStringL11n
* @extends DataMapperFactory<T>
*/
final class PaymentTermL11nMapper extends DataMapperFactory
{
/**
* Columns.
*
* @var array<string, array{name:string, type:string, internal:string, autocomplete?:bool, readonly?:bool, writeonly?:bool, annotations?:array}>
* @since 1.0.0
*/
public const COLUMNS = [
'billing_payment_term_l11n_id' => ['name' => 'billing_payment_term_l11n_id', 'type' => 'int', 'internal' => 'id'],
'billing_payment_term_l11n_name' => ['name' => 'billing_payment_term_l11n_name', 'type' => 'string', 'internal' => 'content', 'autocomplete' => true],
'billing_payment_term_l11n_term' => ['name' => 'billing_payment_term_l11n_term', 'type' => 'int', 'internal' => 'ref'],
'billing_payment_term_l11n_language' => ['name' => 'billing_payment_term_l11n_language', 'type' => 'string', 'internal' => 'language'],
];
/**
* Primary table.
*
* @var string
* @since 1.0.0
*/
public const TABLE = 'billing_payment_term_l11n';
/**
* Primary field name.
*
* @var string
* @since 1.0.0
*/
public const PRIMARYFIELD = 'billing_payment_term_l11n_id';
/**
* Model to use by the mapper.
*
* @var class-string<T>
* @since 1.0.0
*/
public const MODEL = BaseStringL11n::class;
}

View File

@ -0,0 +1,83 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
namespace Modules\Billing\Models;
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
use phpOMS\Localization\BaseStringL11nType;
/**
* Item mapper class.
*
* @package Modules\Billing\Models
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*
* @template T of BaseStringL11nType
* @extends DataMapperFactory<T>
*/
final class PaymentTermMapper extends DataMapperFactory
{
/**
* Columns.
*
* @var array<string, array{name:string, type:string, internal:string, autocomplete?:bool, readonly?:bool, writeonly?:bool, annotations?:array}>
* @since 1.0.0
*/
public const COLUMNS = [
'billing_payment_term_id' => ['name' => 'billing_payment_term_id', 'type' => 'int', 'internal' => 'id'],
'billing_payment_term_code' => ['name' => 'billing_payment_term_code', 'type' => 'string', 'internal' => 'title', 'autocomplete' => true],
];
/**
* Has many relation.
*
* @var array<string, array{mapper:class-string, table:string, self?:?string, external?:?string, column?:string}>
* @since 1.0.0
*/
public const HAS_MANY = [
'l11n' => [
'mapper' => PaymentTermL11nMapper::class,
'table' => 'billing_payment_term_l11n',
'self' => 'billing_payment_term_l11n_term',
'column' => 'content',
'external' => null,
]
];
/**
* Model to use by the mapper.
*
* @var class-string<T>
* @since 1.0.0
*/
public const MODEL = BaseStringL11nType::class;
/**
* Primary table.
*
* @var string
* @since 1.0.0
*/
public const TABLE = 'billing_payment_term';
/**
* Primary field name.
*
* @var string
* @since 1.0.0
*/
public const PRIMARYFIELD = 'billing_payment_term_id';
}

View File

@ -37,4 +37,10 @@ abstract class PermissionCategory extends Enum
public const PRIVATE_BILL_UPLOAD = 6;
public const BILL_NOTE = 7;
public const PRICE = 8;
public const PAYMENT_TERM = 9;
public const SHIPPING_TERM = 10;
}

View File

@ -49,7 +49,8 @@ class Price implements \JsonSerializable
public Item $item;
public AttributeValue $itemgroup;
public AttributeValue $itemsalesgroup;
public AttributeValue $itemproductgroup;
public AttributeValue $itemsegment;
@ -103,7 +104,8 @@ class Price implements \JsonSerializable
public function __construct()
{
$this->item = new NullItem();
$this->itemgroup = new NullAttributeValue();
$this->itemsalesgroup = new NullAttributeValue();
$this->itemproductgroup = new NullAttributeValue();
$this->itemsegment = new NullAttributeValue();
$this->itemsection = new NullAttributeValue();
$this->itemtype = new NullAttributeValue();

View File

@ -46,14 +46,15 @@ final class PriceMapper extends DataMapperFactory
'billing_price_name' => ['name' => 'billing_price_name', 'type' => 'string', 'internal' => 'name'],
'billing_price_promocode' => ['name' => 'billing_price_promocode', 'type' => 'string', 'internal' => 'promocode'],
'billing_price_item' => ['name' => 'billing_price_item', 'type' => 'int', 'internal' => 'item'],
'billing_price_itemgroup' => ['name' => 'billing_price_itemgroup', 'type' => 'int', 'internal' => 'itemgroup'],
'billing_price_itemsegment' => ['name' => 'billing_price_itemsegment', 'type' => 'int', 'internal' => 'itemsegment'],
'billing_price_itemsection' => ['name' => 'billing_price_itemsection', 'type' => 'int', 'internal' => 'itemsection'],
'billing_price_itemsalesgroup' => ['name' => 'billing_price_itemsalesgroup', 'type' => 'int', 'internal' => 'itemsalesgroup'],
'billing_price_itemproductgroup' => ['name' => 'billing_price_itemproductgroup', 'type' => 'int', 'internal' => 'itemproductgroup'],
'billing_price_itemtype' => ['name' => 'billing_price_itemtype', 'type' => 'int', 'internal' => 'itemtype'],
'billing_price_client' => ['name' => 'billing_price_client', 'type' => 'int', 'internal' => 'client'],
'billing_price_clientgroup' => ['name' => 'billing_price_clientgroup', 'type' => 'int', 'internal' => 'clientgroup'],
'billing_price_clientsegment' => ['name' => 'billing_price_clientsegment', 'type' => 'int', 'internal' => 'clientsegment'],
'billing_price_clientsection' => ['name' => 'billing_price_clientsection', 'type' => 'int', 'internal' => 'clientsection'],
'billing_price_clientgroup' => ['name' => 'billing_price_clientgroup', 'type' => 'int', 'internal' => 'clientgroup'],
'billing_price_clienttype' => ['name' => 'billing_price_clienttype', 'type' => 'int', 'internal' => 'clienttype'],
'billing_price_clientcountry' => ['name' => 'billing_price_clientcountry', 'type' => 'string', 'internal' => 'clientcountry'],
'billing_price_supplier' => ['name' => 'billing_price_supplier', 'type' => 'int', 'internal' => 'supplier'],
@ -82,9 +83,13 @@ final class PriceMapper extends DataMapperFactory
'mapper' => ItemMapper::class,
'external' => 'billing_price_item',
],
'itemgroup' => [
'itemsalesgroup' => [
'mapper' => ItemAttributeValueMapper::class,
'external' => 'billing_price_itemgroup',
'external' => 'billing_price_itemsalesgroup',
],
'itemproductgroup' => [
'mapper' => ItemAttributeValueMapper::class,
'external' => 'billing_price_itemproductgroup',
],
'itemsegment' => [
'mapper' => ItemAttributeValueMapper::class,

View File

@ -283,11 +283,15 @@ final class SalesBillMapper extends BillMapper
*/
public static function getItemBills(int $id, \DateTime $start, \DateTime $end) : array
{
$query = self::getQuery();
$query = self::reader()
->with('type')
->with('type/l11n')
->where('type/l11n/language', 'en')
->getQuery();
$query->leftJoin(BillElementMapper::TABLE, BillElementMapper::TABLE . '_d1')
->on(self::TABLE . '_d1.billing_bill_id', '=', BillElementMapper::TABLE . '_d1.billing_bill_element_bill')
->where(BillElementMapper::TABLE . '_d1.billing_bill_element_item', '=', $id)
->limit($limit = 10);
->where(BillElementMapper::TABLE . '_d1.billing_bill_element_item', '=', $id);
/** @phpstan-ignore-next-line */
if (!empty(self::CREATED_AT)) {
@ -296,7 +300,10 @@ final class SalesBillMapper extends BillMapper
$query->orderBy(self::TABLE . '_d1.' . self::COLUMNS[self::PRIMARYFIELD]['name'], 'DESC');
}
return self::getAll()->execute($query);
return self::getAll()
->with('type')
->with('type/l11n')
->execute($query);
}
/**
@ -319,20 +326,12 @@ final class SalesBillMapper extends BillMapper
*/
public static function getClientItem(int $client, \DateTime $start, \DateTime $end) : array
{
$query = BillElementMapper::getQuery();
$query->leftJoin(self::TABLE, self::TABLE . '_d1')
->on(BillElementMapper::TABLE . '_d1.billing_bill_element_bill', '=', self::TABLE . '_d1.billing_bill_id')
->where(self::TABLE . '_d1.billing_bill_client', '=', $client)
->limit($limit = 10);
/** @phpstan-ignore-next-line */
if (!empty(self::CREATED_AT)) {
$query->orderBy(self::TABLE . '_d1.' . self::COLUMNS[self::CREATED_AT]['name'], 'DESC');
} else {
$query->orderBy(self::TABLE . '_d1.' . self::COLUMNS[self::PRIMARYFIELD]['name'], 'DESC');
}
return BillElementMapper::getAll()->execute($query);
return BillElementMapper::getAll()
->with('bill')
->with('bill/type')
->where('bill/client', $client)
->where('bill/type/transferStock', true)
->execute();
}
/**

View File

@ -0,0 +1,69 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
namespace Modules\Billing\Models;
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
use phpOMS\Localization\BaseStringL11n;
/**
* Item mapper class.
*
* @package Modules\Billing\Models
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*
* @template T of BaseStringL11n
* @extends DataMapperFactory<T>
*/
final class ShippingTermL11nMapper extends DataMapperFactory
{
/**
* Columns.
*
* @var array<string, array{name:string, type:string, internal:string, autocomplete?:bool, readonly?:bool, writeonly?:bool, annotations?:array}>
* @since 1.0.0
*/
public const COLUMNS = [
'billing_shipping_term_l11n_id' => ['name' => 'billing_shipping_term_l11n_id', 'type' => 'int', 'internal' => 'id'],
'billing_shipping_term_l11n_name' => ['name' => 'billing_shipping_term_l11n_name', 'type' => 'string', 'internal' => 'content', 'autocomplete' => true],
'billing_shipping_term_l11n_term' => ['name' => 'billing_shipping_term_l11n_term', 'type' => 'int', 'internal' => 'ref'],
'billing_shipping_term_l11n_language' => ['name' => 'billing_shipping_term_l11n_language', 'type' => 'string', 'internal' => 'language'],
];
/**
* Primary table.
*
* @var string
* @since 1.0.0
*/
public const TABLE = 'billing_shipping_term_l11n';
/**
* Primary field name.
*
* @var string
* @since 1.0.0
*/
public const PRIMARYFIELD = 'billing_shipping_term_l11n_id';
/**
* Model to use by the mapper.
*
* @var class-string<T>
* @since 1.0.0
*/
public const MODEL = BaseStringL11n::class;
}

View File

@ -0,0 +1,83 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Billing\Models
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
namespace Modules\Billing\Models;
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
use phpOMS\Localization\BaseStringL11nType;
/**
* Item mapper class.
*
* @package Modules\Billing\Models
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*
* @template T of BaseStringL11nType
* @extends DataMapperFactory<T>
*/
final class ShippingTermMapper extends DataMapperFactory
{
/**
* Columns.
*
* @var array<string, array{name:string, type:string, internal:string, autocomplete?:bool, readonly?:bool, writeonly?:bool, annotations?:array}>
* @since 1.0.0
*/
public const COLUMNS = [
'billing_shipping_term_id' => ['name' => 'billing_shipping_term_id', 'type' => 'int', 'internal' => 'id'],
'billing_shipping_term_code' => ['name' => 'billing_shipping_term_code', 'type' => 'string', 'internal' => 'title', 'autocomplete' => true],
];
/**
* Has many relation.
*
* @var array<string, array{mapper:class-string, table:string, self?:?string, external?:?string, column?:string}>
* @since 1.0.0
*/
public const HAS_MANY = [
'l11n' => [
'mapper' => ShippingTermL11nMapper::class,
'table' => 'billing_shipping_term_l11n',
'self' => 'billing_shipping_term_l11n_term',
'column' => 'content',
'external' => null,
]
];
/**
* Model to use by the mapper.
*
* @var class-string<T>
* @since 1.0.0
*/
public const MODEL = BaseStringL11nType::class;
/**
* Primary table.
*
* @var string
* @since 1.0.0
*/
public const TABLE = 'billing_shipping_term';
/**
* Primary field name.
*
* @var string
* @since 1.0.0
*/
public const PRIMARYFIELD = 'billing_shipping_term_id';
}

View File

@ -1,106 +0,0 @@
{
"type": {
"purchase_invoice": {
"en": [
"Invoice"
],
"de": [
"Rechnung"
]
},
"purchase_credit_note": {
"en": [
"Credit Note"
],
"de": [
"Rechnungskorrektur",
"Gutschrift"
]
},
"purchase_delivery_note": {
"en": [
"Delivery Note"
],
"de": [
"Lieferschein"
]
},
"purchase_order_confirmation": {
"en": [
"Order Confirmation"
],
"de": [
"Auftragsbestätigung"
]
},
"purchase_reverse_invoice": {
"en": [
"Credit Note"
],
"de": [
"Gutschrift"
]
}
},
"date_format": [
"Y-m-d",
"Y.m.d",
"Y/m/d",
"d-m-Y",
"d.m.Y",
"d/m/Y",
"m-d-Y",
"m.d.Y",
"m/d/Y",
"M. d.Y",
"M. d. Y",
"M. d Y",
"M. d,Y",
"M. d, Y",
"M d.Y",
"M d. Y",
"M d Y",
"M d,Y",
"M d, Y",
"M, d.Y",
"M, d. Y",
"M, d Y",
"M, d,Y",
"M, d, Y"
],
"bill_no": {
"en": [
"/(inv.*?)(no|\\s|,|:|\\.|#)+(?<bill_no>.*?)( |$)/i",
"/(#)(?<bill_no>.*?)( |$)/i"
],
"de": [
"/(rechnungsn.*?|beleg.*?)(?<bill_no>.*?)( |$)/i"
]
},
"bill_date": {
"en": [
"/(inv.*?)(date.*?)(\\s|,|:|\\.)+(?<bill_date>.*?)( |$)/i",
"/(date.*?)(\\s|,|:|\\.)+(?<bill_date>.*?)( |$)/i"
],
"de": [
"/(rechnungsdat.*?|belegdat.*?)(\\s|,|:|\\.)+(?<bill_date>.*?)( |$)/i"
]
},
"bill_due": {
"en": [
"/(due date.*?)(\\s|,|:|\\.)+(?<bill_due>.*?)( |$)/i",
"/(due.*?)(\\s|,|:|\\.)+(?<bill_due>.*?)( |$)/i"
],
"de": [
"/(fällig.*?)(\\s|,|:|\\.)+(?<bill_due>.*?)( |$)/i"
]
},
"total_gross": {
"en": [
"/(total.*?|gross.*?)(?<total_gross>([0-9]+,*\\.*)+)/i"
],
"de": [
"/(betrag.*?|gesamt.*?|brutto.*?)(?<total_gross>([0-9]+,*\\.*)+)/i"
]
}
}

164
Models/bill_identifier.json Normal file
View File

@ -0,0 +1,164 @@
{
"type": {
"purchase_invoice": {
"en": [
"Invoice"
],
"de": [
"Rechnung"
]
},
"purchase_credit_note": {
"en": [
"Credit Note"
],
"de": [
"Rechnungskorrektur",
"Gutschrift"
]
},
"purchase_delivery_note": {
"en": [
"Delivery Note"
],
"de": [
"Lieferschein"
]
},
"purchase_order_confirmation": {
"en": [
"Order Confirmation"
],
"de": [
"Auftragsbestätigung"
]
},
"purchase_reverse_invoice": {
"en": [
"Credit Note"
],
"de": [
"Gutschrift"
]
}
},
"date_format": [
"Y-m-d",
"Y.m.d",
"Y/m/d",
"d-m-Y",
"d.m.Y",
"d/m/Y",
"m-d-Y",
"m.d.Y",
"m/d/Y",
"M. d.Y",
"M. d. Y",
"M. d Y",
"M. d,Y",
"M. d, Y",
"M d.Y",
"M d. Y",
"M d Y",
"M d,Y",
"M d, Y",
"M, d.Y",
"M, d. Y",
"M, d Y",
"M, d,Y",
"M, d, Y"
],
"bill_no": {
"en": [
"/(inv.*?)(no|\\s|,|:|\\.|#)+(?<bill_no>.*?)( |$)/i",
"/(#)(?<bill_no>.*?)( |$)/i"
],
"de": [
"/(rechnungsn.*?|beleg.*?)(?<bill_no>.*?)( |$)/i"
]
},
"bill_date": {
"en": [
"/(inv.*?)(date.*?)(\\s|,|:|\\.)+(?<bill_date>.*?)( |$)/i",
"/(date.*?)(\\s|,|:|\\.)+(?<bill_date>.*?)( |$)/i"
],
"de": [
"/(rechnungsdat.*?|belegdat.*?)(\\s|,|:|\\.)+(?<bill_date>.*?)( |$)/i"
]
},
"bill_due": {
"en": [
"/(due date.*?)(\\s|,|:|\\.)+(?<bill_due>.*?)( |$)/i",
"/(due.*?)(\\s|,|:|\\.)+(?<bill_due>.*?)( |$)/i"
],
"de": [
"/(fällig.*?)(\\s|,|:|\\.)+(?<bill_due>.*?)( |$)/i"
]
},
"total_net": {
"en": [
"/(subtotal.*?|net.*?)(?<total_net>([0-9]+,*\\.*)+)/i"
],
"de": [
"/(netto.*?|zwischensumme.*?)(?<total_net>([0-9]+,*\\.*)+)/i"
]
},
"total_tax": {
"en": [
"/(tax.*?)(?<total_tax>([0-9]+,*\\.*)+)/i"
],
"de": [
"/(USt.*?|Mwst.*?|Umsatzsteuer.*?|Mehrwehrtsteuer.*?)(?<total_tax>([0-9]+,*\\.*)+)/i"
]
},
"total_gross": {
"en": [
"/(total.*?|gross.*?)(?<total_gross>([0-9]+,*\\.*)+)/i"
],
"de": [
"/(betrag.*?|gesamt.*?|brutto|rechnungsbetrag.*?|summe.*?)(?<total_gross>([0-9]+,*\\.*)+)/i"
]
},
"item_table": {
"en": {
"headline": {
"order": ["no.", "#"],
"description": ["description", "name", "service", "product"],
"quantity": ["qty", "quantity"],
"price": ["price", "net", "gross"],
"unit": ["unit"],
"total": ["amount", "total", "price", "net", "gross"],
"tax": ["tax"]
},
"row": {
"order": "\\d+",
"description": ".*?",
"quantity": "[+-]?([0-9]{1,3}([,\\.][0-9]{3})*(,\\.[0-9]+)?|\\d*[,\\.]\\d+|\\d+)",
"price": "[+-]?([0-9]{1,3}([,\\.][0-9]{3})*(,\\.[0-9]+)?|\\d*[,\\.]\\d+|\\d+)",
"unit": ".*?",
"total": "[+-]?([0-9]{1,3}([,\\.][0-9]{3})*(,\\.[0-9]+)?|\\d*[,\\.]\\d+|\\d+)",
"tax": "[+-]?([0-9]{1,3}([,\\.][0-9]{3})*(,\\.[0-9]+)?|\\d*[,\\.]\\d+|\\d+)"
}
},
"de": {
"headline": {
"order": ["Pos", "#", "Position"],
"description": ["Beschreibung", "Bez", "Bezeichnung", "Leistung", "Produkt"],
"quantity": ["Menge", "Anzahl"],
"price": ["Einzel", "Preis", "Netto", "Net", "Brutto"],
"unit": ["Einheit", "Einh"],
"total": ["Gesamt", "Preis", "Netto", "Net", "Brutto"],
"tax": ["MwSt", "USt"]
},
"row": {
"order": "\\d+",
"description": ".*?",
"quantity": "[+-]?([0-9]{1,3}([,\\.][0-9]{3})*(,\\.[0-9]+)?|\\d*[,\\.]\\d+|\\d+)",
"price": "[+-]?([0-9]{1,3}([,\\.][0-9]{3})*(,\\.[0-9]+)?|\\d*[,\\.]\\d+|\\d+)",
"unit": ".*?",
"total": "[+-]?([0-9]{1,3}([,\\.][0-9]{3})*(,\\.[0-9]+)?|\\d*[,\\.]\\d+|\\d+)",
"tax": "[+-]?([0-9]{1,3}([,\\.][0-9]{3})*(,\\.[0-9]+)?|\\d*[,\\.]\\d+|\\d+)"
}
}
}
}

View File

@ -10,14 +10,26 @@
"cabinet labels", "paper towels", "cleaning supplies", "sticky tack",
"adhesive putty", "wall calendar"
],
"de": []
"de": [
"Büromaterial", "Bleistift", "Kugelschreiber", "Notizbuch", "Notiz", "Textmarker",
"Radiergummi", "Büroklammer", "Foldback-Klammer", "Heftklammern", "Hefter", "Klebebandabroller",
"Tesafilm", "Gummibänder", "Marker", "Whiteboard-Marker",
"Whiteboard-Radiergummi", "Schreibtischorganizer", "Kalender", "Schreibtischkalender",
"Aktenordner", "Ordner", "Hängeregistratur", "Umschlag", "Briefmarke",
"Schere", "Taschenrechner", "Lineal", "Mülleimer", "Abfalleimer",
"Schranketiketten", "Papierhandtücher", "Putzmittel", "Knetklebe", "Haftmasse",
"Wandkalender"
]
},
"it_supplies": {
"en": [
"keyboard", "mouse", "mice", "USB drive", "network cable", "toner",
"printer paper", "ink", "cartridge"
],
"de": []
"de": [
"Tastatur", "Maus", "Mäuse", "USB-Laufwerk", "Netzwerkkabel", "Toner",
"Druckerpapier", "Tinte", "Patrone"
]
},
"it_equipment": {
"en": [
@ -25,13 +37,19 @@
"router", "webcam", "headset", "hard drive", "microphone", "macbook", "phone",
"cellphone", "mobile phone"
],
"de": []
"de": [
"PC", "Computer", "Laptop", "Monitor", "Switch", "Netzteil", "Server", "Drucker",
"Router", "Webcam", "Headset", "Festplatte", "Mikrofon", "Macbook", "Telefon",
"Handy", "Mobiltelefon"
]
},
"internet_phone": {
"en": [
"domain", "website", "web server", "phone", "internet", "cellphone"
],
"de": []
"de": [
"Domäne", "Website", "Webserver", "Telefon", "Internet", "Mobiltelefon"
]
},
"furniture": {
"en": [
@ -43,7 +61,15 @@
"bean bag", "stool", "cubby storage", "shoe rack", "coat rack", "futon",
"crib", "playpen"
],
"de": []
"de": [
"Sofa", "Sessel", "Tisch", "Stuhl", "Bett", "Nachttisch", "Kommode", "Kleiderschrank",
"Bücherregal", "Schreibtisch", "Schrank", "Couch", "Sessel", "Fernsehtisch", "Kücheninsel",
"Barhocker", "Badezimmer-Waschtisch", "Esszimmerschrank", "Kommode",
"Bank", "Kredenz", "Sideboard", "Ottomane", "Kopfteil", "Fußteil",
"Chaiselongue", "Terrassenmöbel", "Essgarnitur für draußen", "Hängematte",
"Sitzsack", "Hocker", "Schrankmöbel", "Schuhregal", "Garderobe", "Futon",
"Kinderbett", "Laufstall"
]
},
"appliances": {
"en": [
@ -59,7 +85,19 @@
"portable air conditioner", "hot water dispenser", "skillet",
"popcorn maker", "margarita machine", "deep fryer", "griddle", "scale"
],
"de": []
"de": [
"Kühlschrank", "Backofen", "Herd", "Mikrowelle", "Geschirrspüler", "Waschmaschine",
"Wäschetrockner", "Gefrierschrank", "Kaffeemaschine", "Toaster", "Mixer",
"Küchenmaschine", "Wasserkocher", "Reiskocher", "Langsamkocher",
"Toaster", "Klimaanlage", "Heizung", "Deckenventilator", "Staubsauger",
"Bügeleisen", "Haartrockner", "Lockenstab", "Rasierapparat",
"Luftreiniger", "Luftentfeuchter", "Luftbefeuchter", "Müllschlucker",
"Müllpresse", "Dunstabzugshaube", "Entsafter", "Mixer", "Grill",
"Brotbackautomat", "Eismaschine", "Wasserspender", "ductless mini-split system",
"Wandofen", "Induktionskochfeld", "Espressomaschine", "Dosenöffner",
"tragbares Klimagerät", "Heißwasserspender", "Bratpfanne",
"Popcornmaschine", "Margarita-Maschine", "Fritteuse", "Bratplatte", "Waage"
]
},
"cleaning": {
"en": [
@ -74,7 +112,18 @@
"furniture polish", "shoe polish", "stainless steel cleaner", "rust remover",
"grill brush", "lime scale remover", "rug cleaner", "furniture stain remover"
],
"de": []
"de": [
"Besen", "Mopp", "Kehrblech", "Eimer", "Schwamm", "Schrubber", "Lappen",
"Papierhandtücher", "Müllbeutel", "Mülleimer", "Staubsauger",
"Teppichreiniger", "Glasreiniger", "Reinigungsmittel", "Desinfektionstücher",
"Toilettenbürste", "Toilettenschüsselreiniger", "Badreiniger", "Fliesenreiniger",
"Backofenreiniger", "Geschirrspülmittel", "Waschmittel", "Weichspüler",
"Fleckenentferner", "Mülleimerauskleidung", "Backpulver", "Essig",
"Staubmaske", "Putzkorb", "Fensterabzieher", "Staubwedel",
"Fusselrolle", "Lufterfrischer", "Handschuhe", "Entfetter", "Bodenwachs",
"Möbelpolitur", "Schuhcreme", "Edelstahlreiniger", "Rostlöser",
"Grillbürste", "Kalkentferner", "Teppichreiniger", "Möbelfleckenentferner"
]
},
"marketing": {
"en": [
@ -82,7 +131,11 @@
"advertising", "social media", "market research", "marketing", "catalogue",
"catalog", "price list"
],
"de": []
"de": [
"Flugblatt", "Broschüre", "Artikel", "Messe", "Ausstellung", "Messe",
"Werbung", "Social Media", "Marktforschung", "Marketing", "Katalog",
"katalog", "preisliste"
]
},
"food": {
"en": [
@ -90,18 +143,26 @@
"cake", "ice cream", "pudding", "donut",
"nudle", "steak", "fish", "salat", "burger", "fries", "potato", "soup"
],
"de": []
"de": [
"Wein", "Bier", "Schnaps", "Wasser", "Cola", "Fanta", "Saft", "Sprite", "Kaffee",
"Kuchen", "Eis", "Pudding", "Donut",
"Nudel", "Steak", "Fisch", "Salat", "Burger", "Pommes", "Kartoffel", "Suppe"
]
},
"hotel": {
"en": [
"hotel", "motel", "hostel"
],
"de": []
"de": [
"Hotel", "Motel", "Herberge"
]
},
"travel": {
"en": [
"flight", "taxi", "train", "uber", "parking"
"flight", "taxi", "train", "uber", "parking", "garage"
],
"de": []
"de": [
"Flug", "Taxi", "Zug", "Uber", "Parken", "Garage"
]
}
}

View File

@ -19,4 +19,6 @@ return ['Navigation' => [
'InvoiceRecognition' => 'Invoice Recognition',
'Open' => 'Open',
'Upload' => 'Upload',
'PaymentTerms' => 'Payment Terms',
'ShippingTerms' => 'Shipping Terms',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => 'تبوك',
'Addresses' => 'عناوين',
'Africa' => '',
'AlreadyPaid' => 'مدفوع بالفعل',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => 'فواتير',
'Bonus' => 'علاوة',
'CIS' => '',
'Cashback' => 'استرداد النقدي',
'City' => 'مدينة',
'Client' => 'عميل',
'ClientID' => 'معرف العميل',
'ComparisonTime' => '',
'Confirmation' => 'تأكيد',
'Country' => 'دولة',
'CreateBill' => '',
'Created' => 'خلقت',
'CreditCard' => 'بطاقة إئتمان',
'CreditNote' => 'اشعار دائن',
'Currency' => '',
'Customers' => '',
'Date' => 'تاريخ',
'Delivery' => 'توصيل',
'DeliveryNote' => 'مذكرة تسليم',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => 'خصم ٪',
'Due' => 'بسبب',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => 'شحن',
'General' => '',
'Gross' => 'أزداد',
'Invoice' => 'فاتورة',
'Invoices' => 'الفواتير',
'Item' => 'العنصر',
'Items' => 'أغراض',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'شبكة',
'Offer' => 'عرض',
'Original' => '',
'Other' => '',
'Payment' => 'دفع',
'PaymentPlan' => '',
'Postal' => 'بريدي',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => 'ربح',
'Quantity' => 'كمية',
'Recipient' => 'متلقي',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => 'يختار',
'Shipment' => 'شحنة',
'Source' => 'مصدر',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => 'نوع',
'Types' => '',
'Upload' => 'تحميل',
'Value' => '',
'Variation' => 'تفاوت',
'Zip' => 'أزيز',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => 'Adresa',
'Addresses' => 'Adresy',
'Africa' => '',
'AlreadyPaid' => 'Již zaplatil',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => 'Účtenka',
'Bonus' => 'Bonus',
'CIS' => '',
'Cashback' => 'Hotovost',
'City' => 'Město',
'Client' => 'Klienta',
'ClientID' => 'ID klienta',
'ComparisonTime' => '',
'Confirmation' => 'potvrzení',
'Country' => 'Země',
'CreateBill' => '',
'Created' => 'Vytvořený',
'CreditCard' => 'Kreditní karta',
'CreditNote' => 'Dobropis',
'Currency' => '',
'Customers' => '',
'Date' => 'datum',
'Delivery' => 'dodávka',
'DeliveryNote' => 'Dodací list',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => 'Sleva%',
'Due' => 'Způsoben',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => 'Dopravné',
'General' => '',
'Gross' => 'Hrubý',
'Invoice' => 'Faktura',
'Invoices' => 'Faktury',
'Item' => 'Položka',
'Items' => 'Položky',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'Síť',
'Offer' => 'Nabídka',
'Original' => '',
'Other' => '',
'Payment' => 'Způsob platby',
'PaymentPlan' => '',
'Postal' => 'Poštovní',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => 'Zisk',
'Quantity' => 'Množství',
'Recipient' => 'Příjemce',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => 'Vybrat',
'Shipment' => 'náklad',
'Source' => 'Zdroj',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => 'Typ',
'Types' => '',
'Upload' => 'nahrát',
'Value' => '',
'Variation' => 'Variace',
'Zip' => 'Zip',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => 'Adresse',
'Addresses' => 'Adresser',
'Africa' => '',
'AlreadyPaid' => 'Allerede betalt',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => 'Regninger.',
'Bonus' => 'Bonus',
'CIS' => '',
'Cashback' => 'Penge tilbage',
'City' => 'City.',
'Client' => 'Klient',
'ClientID' => 'Klient ID.',
'ComparisonTime' => '',
'Confirmation' => 'Bekræftelse',
'Country' => 'Land',
'CreateBill' => '',
'Created' => 'Oprettet',
'CreditCard' => 'Kreditkort',
'CreditNote' => 'Kreditnota',
'Currency' => '',
'Customers' => '',
'Date' => 'Dato',
'Delivery' => 'Levering',
'DeliveryNote' => 'Levering note',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => 'Rabat%',
'Due' => 'På grund',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => 'Gods',
'General' => '',
'Gross' => 'Brutto',
'Invoice' => 'Faktura',
'Invoices' => 'Fakturaer.',
'Item' => 'Vare',
'Items' => 'Varer',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'Net',
'Offer' => 'Tilbud',
'Original' => '',
'Other' => '',
'Payment' => 'Betaling',
'PaymentPlan' => '',
'Postal' => 'Postal.',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => 'Profit',
'Quantity' => 'Antal',
'Recipient' => 'Modtager',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => 'Vælg',
'Shipment' => 'Forsendelse',
'Source' => 'Kilde',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => 'Type',
'Types' => '',
'Upload' => 'Upload',
'Value' => '',
'Variation' => 'Variation',
'Zip' => 'Zip.',
]];

View File

@ -15,48 +15,33 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => 'Adresse',
'Addresses' => 'Adressen',
'Africa' => 'Africa',
'AlreadyPaid' => 'Bereits bezahlt',
'America' => 'Amerika',
'Amount' => 'Betrag',
'Analyse' => 'Analyse',
'Archive' => 'Archiev',
'Articles' => 'Artikel',
'Asia' => 'Asien',
'Attribute' => 'Attribute',
'BaseTime' => 'Basiszeit',
'Billing' => 'Rechnungsstellung',
'Bills' => 'Rechnungen',
'Bonus' => 'Bonus',
'CIS' => 'CIS',
'Cashback' => 'Kennzeichnen',
'City' => 'Stadt',
'Client' => 'Kunde',
'ClientID' => 'Kunden ID',
'ComparisonTime' => 'Vergleichszeit',
'Confirmation' => 'Bestätigung',
'Country' => 'Land',
'CreateBill' => 'Erstelle Rechnung',
'Created' => 'Erstellt',
'CreditCard' => 'Kreditkarte',
'CreditNote' => 'Gutschrift',
'CreditNote' => 'Rechnungskorrektur',
'Currency' => 'Währung',
'Customers' => 'Kunden',
'Date' => 'Datum',
'Delivery' => 'Die Zustellung',
'Delivery' => 'Lieferung',
'DeliveryNote' => 'Lieferschein',
'DirectDebit' => 'DirectDeBIT.',
'DirectDebit' => 'Direktüberweisung.',
'Discount' => 'Rabatt',
'DiscountP' => 'Rabatt %',
'Due' => 'Fällig',
'Email' => 'Email',
'Europe' => 'Europa',
'Filter' => 'Filter',
'Freightage' => 'Fracht',
'General' => 'Allgemein',
'Gross' => 'Grob',
'Invoice' => 'Rechnung',
'Invoices' => 'Rechnungen',
'Item' => 'Artikel',
'Items' => 'Produkte',
'Language' => 'Sprache',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'Netz',
'Offer' => 'Angebot',
'Original' => 'Original',
'Other' => 'Sonstige',
'Payment' => 'Zahlung',
'PaymentPlan' => 'Zahlungsplan',
'Postal' => 'Post',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => 'Profitieren',
'Quantity' => 'Menge',
'Recipient' => 'Empfänger',
'Region' => 'Region',
'Rep' => 'Vertreter',
'Sales' => 'Umsatz',
'Select' => 'Wählen',
'Shipment' => 'Sendung',
'Source' => 'Quelle',
@ -92,7 +73,10 @@ return ['Billing' => [
'Type' => 'Typ',
'Types' => 'Typen',
'Upload' => 'Hochladen',
'Value' => 'Wert',
'Variation' => 'Variation',
'Zip' => 'Zip',
'Files' => 'Files',
'PaymentTerms' => 'Zahlungsbedingungen',
'ShippingTerms' => 'Lieferbedingungen',
'PaymentTerm' => 'Zahlungsbedingung',
'ShippingTerm' => 'Lieferbedingung',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => 'Διεύθυνση',
'Addresses' => 'Διευθύνσεις',
'Africa' => '',
'AlreadyPaid' => 'Ήδη πληρωθεί',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => 'Λογαριασμοί',
'Bonus' => 'Δώρο',
'CIS' => '',
'Cashback' => 'Επιστροφή μετρητών',
'City' => 'Πόλη',
'Client' => 'Πελάτης',
'ClientID' => 'ταυτότητα πελάτη',
'ComparisonTime' => '',
'Confirmation' => 'Επιβεβαίωση',
'Country' => 'Χώρα',
'CreateBill' => '',
'Created' => 'Δημιουργήθηκε',
'CreditCard' => 'Πιστωτική κάρτα',
'CreditNote' => 'Πιστωτικό σημείωμα',
'Currency' => '',
'Customers' => '',
'Date' => 'Ημερομηνία',
'Delivery' => 'Διανομή',
'DeliveryNote' => 'Δελτίο παράδοσης',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => 'Έκπτωση%',
'Due' => 'Λόγω',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => 'Ναύλος',
'General' => '',
'Gross' => 'Ακαθάριστο',
'Invoice' => 'Τιμολόγιο',
'Invoices' => 'Τιμολόγια',
'Item' => 'Είδος',
'Items' => 'Αντικείμενα',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'Καθαρά',
'Offer' => 'Προσφορά',
'Original' => '',
'Other' => '',
'Payment' => 'Πληρωμή',
'PaymentPlan' => '',
'Postal' => 'Ταχυδρομικός',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => 'Κέρδος',
'Quantity' => 'Ποσότητα',
'Recipient' => 'Παραλήπτης',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => 'Επιλέγω',
'Shipment' => 'Αποστολή',
'Source' => 'Πηγή',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => 'Τύπος',
'Types' => '',
'Upload' => 'Μεταφόρτω',
'Value' => '',
'Variation' => 'Παραλλαγή',
'Zip' => 'Φερμουάρ',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => 'Address',
'Addresses' => 'Addresses',
'Africa' => 'Africa',
'AlreadyPaid' => 'Already Paid',
'America' => 'America',
'Amount' => 'Amount',
'Analyse' => 'Analyse',
'Archive' => 'Archive',
'Articles' => 'Articles',
'Asia' => 'Asia',
'Attribute' => 'Attribute',
'BaseTime' => 'Base time',
'Billing' => 'Billing',
'Bills' => 'Bills',
'Bonus' => 'Bonus',
'CIS' => 'CIS',
'Cashback' => 'Cash Back',
'City' => 'City',
'Client' => 'Client',
'ClientID' => 'Client ID',
'ComparisonTime' => 'Comparison time',
'Confirmation' => 'Confirmation',
'Country' => 'Country',
'CreateBill' => 'Create Bill',
'Created' => 'Created',
'CreditCard' => 'CreditCard',
'CreditNote' => 'Credit Note',
'Currency' => 'Currency',
'Customers' => 'Customers',
'Date' => 'Date',
'Delivery' => 'Delivery',
'DeliveryNote' => 'Delivery Note',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => 'Discount %',
'Due' => 'Due',
'Email' => 'Email',
'Europe' => 'Europe',
'Filter' => 'Filter',
'Freightage' => 'Freightage',
'General' => 'General',
'Gross' => 'Gross',
'Invoice' => 'Invoice',
'Invoices' => 'Invoices',
'Item' => 'Item',
'Items' => 'Items',
'Language' => 'Language',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'Net',
'Offer' => 'Offer',
'Original' => 'Original',
'Other' => 'Other',
'Payment' => 'Payment',
'PaymentPlan' => 'Payment Plan',
'Postal' => 'Postal',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => 'Profit',
'Quantity' => 'Quantity',
'Recipient' => 'Recipient',
'Region' => 'Region',
'Rep' => 'Rep.',
'Sales' => 'Sales',
'Select' => 'Select',
'Shipment' => 'Shipment',
'Source' => 'Source',
@ -92,7 +73,10 @@ return ['Billing' => [
'Type' => 'Type',
'Types' => 'Types',
'Upload' => 'Upload',
'Value' => 'Value',
'Variation' => 'Variation',
'Zip' => 'Zip',
'Files' => 'Files',
'PaymentTerms' => 'Payment Terms',
'ShippingTerms' => 'Shipping Terms',
'PaymentTerm' => 'Payment Term',
'ShippingTerm' => 'Shipping Term',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => 'Habla a',
'Addresses' => 'Direcciones',
'Africa' => '',
'AlreadyPaid' => 'Ya pagado',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => 'Facturas',
'Bonus' => 'Prima',
'CIS' => '',
'Cashback' => 'Devolución de dinero',
'City' => 'Ciudad',
'Client' => 'Cliente',
'ClientID' => 'Identificación del cliente',
'ComparisonTime' => '',
'Confirmation' => 'Confirmación',
'Country' => 'País',
'CreateBill' => '',
'Created' => 'Creado',
'CreditCard' => 'Tarjeta de crédito',
'CreditNote' => 'Nota de crédito',
'Currency' => '',
'Customers' => '',
'Date' => 'Fecha',
'Delivery' => 'Entrega',
'DeliveryNote' => 'Nota de entrega',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => 'Descuento%',
'Due' => 'Vencer',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => 'Flete',
'General' => '',
'Gross' => 'Bruto',
'Invoice' => 'Factura',
'Invoices' => 'Facturas',
'Item' => 'Articulo',
'Items' => 'Elementos',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'Red',
'Offer' => 'Oferta',
'Original' => '',
'Other' => '',
'Payment' => 'Pago',
'PaymentPlan' => '',
'Postal' => 'Postal',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => 'Lucro',
'Quantity' => 'Cantidad',
'Recipient' => 'Recipiente',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => 'Seleccione',
'Shipment' => 'Envío',
'Source' => 'Fuente',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => 'Escribe',
'Types' => '',
'Upload' => 'Subir',
'Value' => '',
'Variation' => 'Variación',
'Zip' => 'Cremallera',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => 'Osoite',
'Addresses' => 'Osoitteet',
'Africa' => '',
'AlreadyPaid' => 'Jo maksettu',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => 'Laskut',
'Bonus' => 'Bonus',
'CIS' => '',
'Cashback' => 'Vaihtorahat',
'City' => 'Kaupunki',
'Client' => 'Asiakas',
'ClientID' => 'Asiakastunnus',
'ComparisonTime' => '',
'Confirmation' => 'Vahvistus',
'Country' => 'Maa',
'CreateBill' => '',
'Created' => 'Luotu',
'CreditCard' => 'Luottokortti',
'CreditNote' => 'Luottoluotto',
'Currency' => '',
'Customers' => '',
'Date' => 'Päivämäärä',
'Delivery' => 'Toimitus',
'DeliveryNote' => 'Saapumisilmoitus',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => 'Alennus %',
'Due' => 'Takia',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => 'Rahti',
'General' => '',
'Gross' => 'Ällöttävä',
'Invoice' => 'Lasku',
'Invoices' => 'Laskut',
'Item' => 'Kohde',
'Items' => 'Tuotteet',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'Netto',
'Offer' => 'Tarjous',
'Original' => '',
'Other' => '',
'Payment' => 'Maksu',
'PaymentPlan' => '',
'Postal' => 'Posti-',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => 'Voitto',
'Quantity' => 'Määrä',
'Recipient' => 'Vastaanottaja',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => 'Valitse',
'Shipment' => 'Lähetys',
'Source' => 'Lähde',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => 'Tyyppi',
'Types' => '',
'Upload' => 'Ladata',
'Value' => '',
'Variation' => 'Vaihtelu',
'Zip' => 'Postinumero',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => 'Adresse',
'Addresses' => 'Adresses',
'Africa' => '',
'AlreadyPaid' => 'Déjà payé',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => 'Factures',
'Bonus' => 'Prime',
'CIS' => '',
'Cashback' => 'Remise en argent',
'City' => 'Ville',
'Client' => 'Client',
'ClientID' => 'identité du client',
'ComparisonTime' => '',
'Confirmation' => 'Confirmation',
'Country' => 'Pays',
'CreateBill' => '',
'Created' => 'Établi',
'CreditCard' => 'Carte de crédit',
'CreditNote' => 'Note de crédit',
'Currency' => '',
'Customers' => '',
'Date' => 'Date',
'Delivery' => 'Livraison',
'DeliveryNote' => 'Bon de livraison',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => 'Remise %',
'Due' => 'Dû',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => 'Fret',
'General' => '',
'Gross' => 'Brut',
'Invoice' => 'Facture d\'achat',
'Invoices' => 'Factures',
'Item' => 'Article',
'Items' => 'Articles',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'Rapporter',
'Offer' => 'Offrir',
'Original' => '',
'Other' => '',
'Payment' => 'Paiement',
'PaymentPlan' => '',
'Postal' => 'Postal',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => 'Profit',
'Quantity' => 'Quantité',
'Recipient' => 'Destinataire',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => 'Sélectionner',
'Shipment' => 'Expédition',
'Source' => 'La source',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => 'Taper',
'Types' => '',
'Upload' => 'Télécharger',
'Value' => '',
'Variation' => 'Variation',
'Zip' => 'Zipper',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => 'Cím',
'Addresses' => 'Címek',
'Africa' => '',
'AlreadyPaid' => 'Fizetve',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => 'Számlák',
'Bonus' => 'Bónusz',
'CIS' => '',
'Cashback' => 'Pénzvisszafizetés',
'City' => 'Város',
'Client' => 'Ügyfél',
'ClientID' => 'Ügyfélazonosító',
'ComparisonTime' => '',
'Confirmation' => 'Megerősítés',
'Country' => 'Ország',
'CreateBill' => '',
'Created' => 'Létrehozott',
'CreditCard' => 'Hitelkártya',
'CreditNote' => 'Jóváírás',
'Currency' => '',
'Customers' => '',
'Date' => 'Dátum',
'Delivery' => 'Szállítás',
'DeliveryNote' => 'Fuvarlevél',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => 'Árengedmény%',
'Due' => 'Esedékes',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => 'Fuvardíj',
'General' => '',
'Gross' => 'Bruttó',
'Invoice' => 'Számla',
'Invoices' => 'Számlák',
'Item' => 'Tétel',
'Items' => 'Elemek',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'Háló',
'Offer' => 'Ajánlat',
'Original' => '',
'Other' => '',
'Payment' => 'Fizetés',
'PaymentPlan' => '',
'Postal' => 'Postai',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => 'Nyereség',
'Quantity' => 'Mennyiség',
'Recipient' => 'Befogadó',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => 'Kiválaszt',
'Shipment' => 'Szállítmány',
'Source' => 'Forrás',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => 'típus',
'Types' => '',
'Upload' => 'Feltöltés',
'Value' => '',
'Variation' => 'Variáció',
'Zip' => 'Postai irányítószám',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => 'Indirizzo',
'Addresses' => 'Indirizzi',
'Africa' => '',
'AlreadyPaid' => 'Già pagato',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => 'Fatture',
'Bonus' => 'Bonus.',
'CIS' => '',
'Cashback' => 'Rimborso',
'City' => 'Città',
'Client' => 'Cliente',
'ClientID' => 'Identificativo cliente',
'ComparisonTime' => '',
'Confirmation' => 'Conferma',
'Country' => 'Nazione',
'CreateBill' => '',
'Created' => 'Creato',
'CreditCard' => 'Carta di credito',
'CreditNote' => 'Nota di credito',
'Currency' => '',
'Customers' => '',
'Date' => 'Data',
'Delivery' => 'Consegna',
'DeliveryNote' => 'Bolla d\'accompagnamento',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => 'Sconto%',
'Due' => 'Dovuto',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => 'Liberare',
'General' => '',
'Gross' => 'Schifoso',
'Invoice' => 'Fattura',
'Invoices' => 'Fatture',
'Item' => 'Elemento',
'Items' => 'Elementi',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'Rete',
'Offer' => 'Offerta',
'Original' => '',
'Other' => '',
'Payment' => 'Pagamento',
'PaymentPlan' => '',
'Postal' => 'postale',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => 'Profitto',
'Quantity' => 'Quantità',
'Recipient' => 'Destinatario',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => 'Selezionare',
'Shipment' => 'Spedizione',
'Source' => 'Fonte',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => 'Tipo',
'Types' => '',
'Upload' => 'Caricamento',
'Value' => '',
'Variation' => 'Variazione',
'Zip' => 'Cerniera lampo',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => '住所',
'Addresses' => 'アドレス',
'Africa' => '',
'AlreadyPaid' => '既に支払いました',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => 'bill',
'Bonus' => 'ボーナス',
'CIS' => '',
'Cashback' => 'キャッシュバック',
'City' => '市',
'Client' => 'クライアント',
'ClientID' => 'クライアントID',
'ComparisonTime' => '',
'Confirmation' => '確認',
'Country' => '国',
'CreateBill' => '',
'Created' => '作成した',
'CreditCard' => 'クレジットカード',
'CreditNote' => 'クレジットノート',
'Currency' => '',
'Customers' => '',
'Date' => '日にち',
'Delivery' => '配達',
'DeliveryNote' => '配達メモ',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => '割引 ',
'Due' => '期限',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => 'fre fre',
'General' => '',
'Gross' => 'きもい',
'Invoice' => '請求書',
'Invoices' => '請求書',
'Item' => 'アイテム',
'Items' => 'アイテム',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'ネット',
'Offer' => 'オファー',
'Original' => '',
'Other' => '',
'Payment' => '支払い',
'PaymentPlan' => '',
'Postal' => '郵便',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => '利益',
'Quantity' => '量',
'Recipient' => '受信者',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => '選択する',
'Shipment' => '出荷',
'Source' => 'ソース',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => 'タイプ',
'Types' => '',
'Upload' => 'アップロード',
'Value' => '',
'Variation' => '変化',
'Zip' => 'ジップ',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => '주소',
'Addresses' => '구애',
'Africa' => '',
'AlreadyPaid' => '이미 지불',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => '청구서',
'Bonus' => '보너스',
'CIS' => '',
'Cashback' => '현금',
'City' => '도시',
'Client' => '고객',
'ClientID' => '클라이언트 ID.',
'ComparisonTime' => '',
'Confirmation' => '확인',
'Country' => '국가',
'CreateBill' => '',
'Created' => '만들어진',
'CreditCard' => '신용 카드',
'CreditNote' => '신용 노트',
'Currency' => '',
'Customers' => '',
'Date' => '날짜',
'Delivery' => '배달',
'DeliveryNote' => '배달 메모',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => '할인 %',
'Due' => '로 인한',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => '화물',
'General' => '',
'Gross' => '역겨운',
'Invoice' => '송장',
'Invoices' => '송장',
'Item' => '안건',
'Items' => '항목',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => '그물',
'Offer' => '권하다',
'Original' => '',
'Other' => '',
'Payment' => '지불',
'PaymentPlan' => '',
'Postal' => '우편 엽서',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => '이익',
'Quantity' => '수량',
'Recipient' => '받는 사람',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => '선택하다',
'Shipment' => '선적',
'Source' => '원천',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => '유형',
'Types' => '',
'Upload' => '업로드',
'Value' => '',
'Variation' => '변화',
'Zip' => '지퍼',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => 'Adresse',
'Addresses' => 'Adresser',
'Africa' => '',
'AlreadyPaid' => 'Allerede betalt',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => 'Regninger',
'Bonus' => 'Bonus',
'CIS' => '',
'Cashback' => 'Penger tilbake',
'City' => 'By',
'Client' => 'Klient',
'ClientID' => 'klient-ID',
'ComparisonTime' => '',
'Confirmation' => 'Bekreftelse',
'Country' => 'Land',
'CreateBill' => '',
'Created' => 'Opprettet',
'CreditCard' => 'Kredittkort',
'CreditNote' => 'Kredittnota',
'Currency' => '',
'Customers' => '',
'Date' => 'Dato',
'Delivery' => 'Leveranse',
'DeliveryNote' => 'Leveringsnotat',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => 'Rabatt%',
'Due' => 'På grunn av det',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => 'Frakt',
'General' => '',
'Gross' => 'Ekkelt',
'Invoice' => 'Faktura',
'Invoices' => 'Fakturaer',
'Item' => 'Punkt',
'Items' => 'Elementer',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'Nett',
'Offer' => 'By på',
'Original' => '',
'Other' => '',
'Payment' => 'innbetaling',
'PaymentPlan' => '',
'Postal' => 'Postal.',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => 'Profitt',
'Quantity' => 'Mengde',
'Recipient' => 'Mottaker',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => 'Plukke ut',
'Shipment' => 'Forsendelse',
'Source' => 'Kilde',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => 'Type',
'Types' => '',
'Upload' => 'Laste opp',
'Value' => '',
'Variation' => 'Variasjon',
'Zip' => 'Glidelås',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => 'Adres',
'Addresses' => 'Adresy',
'Africa' => '',
'AlreadyPaid' => 'Już zapłacone',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => 'Rachunki',
'Bonus' => 'Premia',
'CIS' => '',
'Cashback' => 'Zwrot gotówki',
'City' => 'Miasto',
'Client' => 'Klient',
'ClientID' => 'Identyfikator klienta',
'ComparisonTime' => '',
'Confirmation' => 'Potwierdzenie',
'Country' => 'Kraj',
'CreateBill' => '',
'Created' => 'Utworzony',
'CreditCard' => 'Karta kredytowa',
'CreditNote' => 'Uwaga kredytowa',
'Currency' => '',
'Customers' => '',
'Date' => 'Data',
'Delivery' => 'Dostawa',
'DeliveryNote' => 'Dowód dostawy',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => 'Zniżka %',
'Due' => 'Z powodu',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => 'Frachtowanie',
'General' => '',
'Gross' => 'Brutto',
'Invoice' => 'Faktura',
'Invoices' => 'Faktury',
'Item' => 'Przedmiot',
'Items' => 'Przedmiotów',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'Internet',
'Offer' => 'Oferta',
'Original' => '',
'Other' => '',
'Payment' => 'Zapłata',
'PaymentPlan' => '',
'Postal' => 'Pocztowy',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => 'Zysk',
'Quantity' => 'Ilość',
'Recipient' => 'Odbiorca',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => 'Wybierać',
'Shipment' => 'Wysyłka',
'Source' => 'Źródło',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => 'Rodzaj',
'Types' => '',
'Upload' => 'Wgrywać',
'Value' => '',
'Variation' => 'Zmiana',
'Zip' => 'Zamek błyskawiczny',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => 'Endereço',
'Addresses' => 'Endereços',
'Africa' => '',
'AlreadyPaid' => 'Já pago',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => 'Notas',
'Bonus' => 'Bônus',
'CIS' => '',
'Cashback' => 'Dinheiro de volta',
'City' => 'Cidade',
'Client' => 'Cliente',
'ClientID' => 'ID do Cliente',
'ComparisonTime' => '',
'Confirmation' => 'Confirmação',
'Country' => 'País',
'CreateBill' => '',
'Created' => 'Criado',
'CreditCard' => 'Cartão de crédito',
'CreditNote' => 'Nota de crédito',
'Currency' => '',
'Customers' => '',
'Date' => 'Encontro',
'Delivery' => 'Entrega',
'DeliveryNote' => 'Nota de entrega',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => 'Desconto%',
'Due' => 'Vencimento',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => 'Freightage',
'General' => '',
'Gross' => 'Bruto',
'Invoice' => 'Fatura',
'Invoices' => 'Faturas',
'Item' => 'Item',
'Items' => 'Itens',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'Internet',
'Offer' => 'Oferta',
'Original' => '',
'Other' => '',
'Payment' => 'Pagamento',
'PaymentPlan' => '',
'Postal' => 'Postal',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => 'Lucro',
'Quantity' => 'Quantidade',
'Recipient' => 'Destinatário',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => 'Selecione.',
'Shipment' => 'envio',
'Source' => 'Fonte',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => 'Modelo',
'Types' => '',
'Upload' => 'Envio',
'Value' => '',
'Variation' => 'Variação',
'Zip' => 'Fecho eclair',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => 'Адрес',
'Addresses' => 'Адреса',
'Africa' => '',
'AlreadyPaid' => 'Уже оплачено',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => 'Счета',
'Bonus' => 'Бонус',
'CIS' => '',
'Cashback' => 'Возврат наличных',
'City' => 'Город',
'Client' => 'Клиент',
'ClientID' => 'ID клиента',
'ComparisonTime' => '',
'Confirmation' => 'Подтверждение',
'Country' => 'Страна',
'CreateBill' => '',
'Created' => 'Созданный',
'CreditCard' => 'Кредитная карта',
'CreditNote' => 'Кредитная нота',
'Currency' => '',
'Customers' => '',
'Date' => 'Дата',
'Delivery' => 'Доставка',
'DeliveryNote' => 'Накладная',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => 'Скидка %',
'Due' => 'Должное',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => 'Фрахты',
'General' => '',
'Gross' => 'Валовой',
'Invoice' => 'Счет',
'Invoices' => 'Счета',
'Item' => 'Пункт',
'Items' => 'Предметы',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'Сеть',
'Offer' => 'Предложение',
'Original' => '',
'Other' => '',
'Payment' => 'Оплата',
'PaymentPlan' => '',
'Postal' => 'Почтовый',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => 'Выгода',
'Quantity' => 'Количество',
'Recipient' => 'Получатель',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => 'Выбирать',
'Shipment' => 'Отгрузка',
'Source' => 'Источник',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => 'Тип',
'Types' => '',
'Upload' => 'Загрузить',
'Value' => '',
'Variation' => 'Вариация',
'Zip' => 'Zip.',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => 'Adress',
'Addresses' => 'Adresser',
'Africa' => '',
'AlreadyPaid' => 'Redan betalat',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => 'Räkningar',
'Bonus' => 'Bonus',
'CIS' => '',
'Cashback' => 'Pengar tillbaka',
'City' => 'Stad',
'Client' => 'Klient',
'ClientID' => 'Klient ID',
'ComparisonTime' => '',
'Confirmation' => 'Bekräftelse',
'Country' => 'Land',
'CreateBill' => '',
'Created' => 'Skapad',
'CreditCard' => 'Kreditkort',
'CreditNote' => 'Kreditanteckning',
'Currency' => '',
'Customers' => '',
'Date' => 'Datum',
'Delivery' => 'Leverans',
'DeliveryNote' => 'Leveransanteckning',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => 'Rabatt%',
'Due' => 'På grund av',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => 'Frakt',
'General' => '',
'Gross' => 'Äckligt',
'Invoice' => 'Faktura',
'Invoices' => 'Fakturor',
'Item' => 'Artikel',
'Items' => 'Objekt',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'Netto',
'Offer' => 'Erbjudande',
'Original' => '',
'Other' => '',
'Payment' => 'Betalning',
'PaymentPlan' => '',
'Postal' => 'Post',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => 'Vinst',
'Quantity' => 'Kvantitet',
'Recipient' => 'Mottagare',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => 'Välj',
'Shipment' => 'Sändning',
'Source' => 'Källa',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => 'Typ',
'Types' => '',
'Upload' => 'Ladda upp',
'Value' => '',
'Variation' => 'Variation',
'Zip' => 'Blixtlås',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => 'ที่อยู่',
'Addresses' => 'ที่อยู่',
'Africa' => '',
'AlreadyPaid' => 'จ่ายแล้ว',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => 'การเรียกเก็บเงิน',
'Bonus' => 'โบนัส',
'CIS' => '',
'Cashback' => 'เงินคืน',
'City' => 'เมือง',
'Client' => 'ลูกค้า',
'ClientID' => 'รหัสลูกค้า',
'ComparisonTime' => '',
'Confirmation' => 'การยืนยัน',
'Country' => 'ประเทศ',
'CreateBill' => '',
'Created' => 'สร้าง',
'CreditCard' => 'บัตรเครดิต',
'CreditNote' => 'ใบลดหนี้',
'Currency' => '',
'Customers' => '',
'Date' => 'วันที่',
'Delivery' => 'จัดส่ง',
'DeliveryNote' => 'บันทึกการส่งมอบ',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => 'การลดราคา %',
'Due' => 'เนื่องจาก',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => 'การขนส่งสินค้า',
'General' => '',
'Gross' => 'ทั้งหมด',
'Invoice' => 'ใบแจ้งหนี้',
'Invoices' => 'ใบแจ้งหนี้',
'Item' => 'สิ่งของ',
'Items' => 'รายการ',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'สุทธิ',
'Offer' => 'เสนอ',
'Original' => '',
'Other' => '',
'Payment' => 'การชำระเงิน',
'PaymentPlan' => '',
'Postal' => 'เกี่ยวกับการไปรษณีย์',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => 'กำไร',
'Quantity' => 'ปริมาณ',
'Recipient' => 'ผู้รับ',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => 'เลือก',
'Shipment' => 'การจัดส่ง',
'Source' => 'แหล่งที่มา',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => 'พิมพ์',
'Types' => '',
'Upload' => 'ที่อัพโหลด',
'Value' => '',
'Variation' => 'การเปลี่ยนแปลง',
'Zip' => 'ซิป',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => 'Adres',
'Addresses' => 'Adresler',
'Africa' => '',
'AlreadyPaid' => 'Zaten ödendi',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => 'Faturalar',
'Bonus' => 'Bonus',
'CIS' => '',
'Cashback' => 'Nakit para',
'City' => 'Şehir',
'Client' => 'Müşteri',
'ClientID' => 'Müşteri Kimliği',
'ComparisonTime' => '',
'Confirmation' => 'Onayla',
'Country' => 'Ülke',
'CreateBill' => '',
'Created' => 'Yaratılmış',
'CreditCard' => 'Kredi kartı',
'CreditNote' => 'Kredi notu',
'Currency' => '',
'Customers' => '',
'Date' => 'Tarih',
'Delivery' => 'Teslimat',
'DeliveryNote' => 'Teslimat notu',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => 'İndirim %',
'Due' => 'Vadesi dolmuş',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => 'Yük',
'General' => '',
'Gross' => 'Brüt',
'Invoice' => 'Fatura',
'Invoices' => 'Faturalar',
'Item' => 'Kalem',
'Items' => 'Öğeler',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'Ağ',
'Offer' => 'Teklif',
'Original' => '',
'Other' => '',
'Payment' => 'Ödeme',
'PaymentPlan' => '',
'Postal' => 'Posta',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => 'Kâr',
'Quantity' => 'Miktar',
'Recipient' => 'Alıcı',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => 'Seçme',
'Shipment' => 'gönderi',
'Source' => 'Kaynak',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => 'Tip',
'Types' => '',
'Upload' => 'Yüklemek',
'Value' => '',
'Variation' => 'varyasyon',
'Zip' => 'Zip',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => 'Адреса',
'Addresses' => 'Адреси',
'Africa' => '',
'AlreadyPaid' => 'Вже оплачено',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => 'Векселі',
'Bonus' => 'Бонус',
'CIS' => '',
'Cashback' => 'Готівка',
'City' => 'Місто',
'Client' => 'Клієнт',
'ClientID' => 'Ідентифікатор клієнта',
'ComparisonTime' => '',
'Confirmation' => 'Підтвердження',
'Country' => 'Країна',
'CreateBill' => '',
'Created' => 'Створений',
'CreditCard' => 'Кредитна карта',
'CreditNote' => 'Кредитове авізо',
'Currency' => '',
'Customers' => '',
'Date' => 'Дата',
'Delivery' => 'Доставка',
'DeliveryNote' => 'Накладна',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => 'Знижка%',
'Due' => 'Заборгованість',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => 'Фрахт',
'General' => '',
'Gross' => 'Валовий',
'Invoice' => 'Рахунок-фактура',
'Invoices' => 'Рахунки-фактури',
'Item' => 'Елемент',
'Items' => 'Предмети',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => 'Сітка',
'Offer' => 'Пропозиція',
'Original' => '',
'Other' => '',
'Payment' => 'Платіж',
'PaymentPlan' => '',
'Postal' => 'Поштовий',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => 'Прибуток',
'Quantity' => 'Кількість',
'Recipient' => 'Одержувач',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => 'Вибирати',
'Shipment' => 'Відвантаження',
'Source' => 'Джерело',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => 'Тип',
'Types' => '',
'Upload' => 'Завантажувати',
'Value' => '',
'Variation' => 'Зміна',
'Zip' => 'Блиск',
]];

View File

@ -15,33 +15,22 @@ declare(strict_types=1);
return ['Billing' => [
'Address' => '地址',
'Addresses' => '地址',
'Africa' => '',
'AlreadyPaid' => '已付款',
'America' => '',
'Amount' => '',
'Analyse' => '',
'Archive' => '',
'Articles' => '',
'Asia' => '',
'Attribute' => '',
'BaseTime' => '',
'Billing' => '',
'Bills' => '账单',
'Bonus' => '奖金',
'CIS' => '',
'Cashback' => '返现金',
'City' => '城市',
'Client' => '客户',
'ClientID' => '客户ID',
'ComparisonTime' => '',
'Confirmation' => '确认',
'Country' => '国家',
'CreateBill' => '',
'Created' => '创造了',
'CreditCard' => '信用卡',
'CreditNote' => '信用票据',
'Currency' => '',
'Customers' => '',
'Date' => '日期',
'Delivery' => '交货',
'DeliveryNote' => '送货单',
@ -50,13 +39,9 @@ return ['Billing' => [
'DiscountP' => '折扣 ',
'Due' => '到期的',
'Email' => '',
'Europe' => '',
'Filter' => '',
'Freightage' => 'FRIGUTAGE.',
'General' => '',
'Gross' => '总的',
'Invoice' => '发票',
'Invoices' => '发票',
'Item' => '物品',
'Items' => '项目',
'Language' => '',
@ -68,7 +53,6 @@ return ['Billing' => [
'Net' => '网',
'Offer' => '提供',
'Original' => '',
'Other' => '',
'Payment' => '支付',
'PaymentPlan' => '',
'Postal' => '邮政',
@ -78,9 +62,6 @@ return ['Billing' => [
'Profit' => '利润',
'Quantity' => '数量',
'Recipient' => '接受者',
'Region' => '',
'Rep' => '',
'Sales' => '',
'Select' => '选择',
'Shipment' => '运输',
'Source' => '来源',
@ -92,7 +73,5 @@ return ['Billing' => [
'Type' => '类型',
'Types' => '',
'Upload' => '上传',
'Value' => '',
'Variation' => '变化',
'Zip' => '压缩',
]];

View File

@ -44,6 +44,8 @@ $logs = $this->data['logs'] ?? [];
$editable = $bill->id === 0 || \in_array($bill->getStatus(), [BillStatus::DRAFT, BillStatus::UNPARSED]);
$disabled = $editable ? '' : ' disabled';
$isNew = $archive->id === 0;
echo $this->data['nav']->render(); ?>
<div class="tabview tab-2 col-simple">
@ -52,10 +54,10 @@ echo $this->data['nav']->render(); ?>
<li><label for="c-tab-1"><?= $this->getHtml('Invoice'); ?></label>
<li><label for="c-tab-2"><?= $this->getHtml('Items'); ?></label>
<li><label for="c-tab-3"><?= $this->getHtml('Preview'); ?></label>
<li><label for="c-tab-4"><?= $this->getHtml('Archive'); ?></label>
<?php if (!$isNew) : ?><li><label for="c-tab-4"><?= $this->getHtml('Archive'); ?></label><?php endif; ?>
<li><label for="c-tab-5"><?= $this->getHtml('Payment'); ?></label>
<li><label for="c-tab-6"><?= $this->getHtml('Media'); ?></label>
<li><label for="c-tab-7"><?= $this->getHtml('Logs'); ?></label>
<li><label for="c-tab-6"><?= $this->getHtml('Files'); ?></label>
<?php if (!$isNew) : ?><li><label for="c-tab-7"><?= $this->getHtml('Logs'); ?></label><?php endif; ?>
</ul>
</div>
<div class="tab-content col-simple">
@ -267,6 +269,7 @@ echo $this->data['nav']->render(); ?>
<div class="col-xs-12">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Invoice'); ?><i class="g-icon download btn end-xs">download</i></div>
<div class="slider">
<table
id="invoiceElements"
class="default sticky"
@ -279,9 +282,9 @@ echo $this->data['nav']->render(); ?>
<thead>
<tr>
<td>
<td><?= $this->getHtml('Item'); ?>
<td class="wf-100"><?= $this->getHtml('Name'); ?>
<td><?= $this->getHtml('Quantity'); ?>
<td style="min-width:150px"><?= $this->getHtml('Item'); ?>
<td class="wf-100" style="min-width:150px"><?= $this->getHtml('Name'); ?>
<td style="min-width:50px"><?= $this->getHtml('Quantity'); ?>
<td style="min-width:90px"><?= $this->getHtml('Discount'); ?>
<td style="min-width:90px"><?= $this->getHtml('DiscountP'); ?>
<td style="min-width:90px"><?= $this->getHtml('Bonus'); ?>
@ -318,9 +321,9 @@ echo $this->data['nav']->render(); ?>
<i class="g-icon order-down">expand_more</i>
<i class="g-icon btn remove-form">close</i>
<?php endif; ?>
<td><span class="input"><button type="button" formaction=""><i class="g-icon">book</i></button><input name="" type="text" value="<?= $element->itemNumber; ?>" required<?= $disabled; ?>></span>
<td><textarea required<?= $disabled; ?>><?= $element->itemName; ?></textarea>
<td><input name="" type="number" step="any" value="<?= $element->getQuantity(); ?>" required<?= $disabled; ?>>
<td><span class="input"><button type="button" formaction=""><i class="g-icon">book</i></button><input name="" type="text" value="<?= $element->itemNumber; ?>"<?= $disabled; ?>></span>
<td><textarea<?= $disabled; ?>><?= $element->itemName; ?></textarea>
<td><input name="" type="number" step="any" value="<?= $element->getQuantity(); ?>"<?= $disabled; ?>>
<td><input name="" type="number" step="0.01"<?= $disabled; ?>>
<td><input name="" type="number" step="0.01"<?= $disabled; ?>>
<td><input name="" type="number" min="-100" max="100" step="0.01"<?= $disabled; ?>>
@ -344,7 +347,7 @@ echo $this->data['nav']->render(); ?>
<td>
<?php endif; ?>
</table>
</div>
</section>
<?php if ($editable) : ?>
@ -359,7 +362,8 @@ echo $this->data['nav']->render(); ?>
<div class="tab col-simple">
<div>
<div class="col-xs-12 col-sm-3 box">
<select id="iBillPreviewType" name="bill_preview_type">>
<select id="iBillPreviewType" name="bill_preview_type"
data-action='[{"listener": "change", "action": [{"key": 1, "type": "dom.reload", "src": "iPreviewBill"}]}]'>
<?php foreach ($billTypes as $type) : ?>
<option value="<?= $type->id; ?>"><?= $this->printHtml($type->getL11n()); ?>
<?php endforeach; ?>
@ -371,12 +375,14 @@ echo $this->data['nav']->render(); ?>
<div class="col-xs-12 col-simple">
<section id="mediaFile" class="portlet col-simple">
<div class="portlet-body col-simple">
<iframe class="col-simple" id="iHelperFrame" src="" loading="lazy" allowfullscreen></iframe>
<iframe class="col-simple" id="iPreviewBill" data-src="Resources/mozilla/Pdf/web/viewer.html?file=<?= \urlencode(UriFactory::build('{/api}bill/render/preview?bill=' . $bill->id) . '&bill_type='); ?>{#iBillPreviewType}" loading="lazy" allowfullscreen></iframe>
</div>
</section>
</div>
</div>
</div>
<?php if (!$isNew) : ?>
<input type="radio" id="c-tab-4" name="tabular-2">
<div class="tab col-simple">
<div class="col-simple">
@ -389,6 +395,8 @@ echo $this->data['nav']->render(); ?>
</div>
</div>
</div>
<?php endif; ?>
<input type="radio" id="c-tab-5" name="tabular-2">
<div class="tab">
<div class="row">
@ -491,6 +499,8 @@ echo $this->data['nav']->render(); ?>
<div class="tab col-simple">
<?= $this->data['media-upload']->render('bill-file', 'files', '', $media); ?>
</div>
<?php if (!$isNew) : ?>
<input type="radio" id="c-tab-7" name="tabular-2">
<div class="tab">
<div class="row">
@ -501,8 +511,8 @@ echo $this->data['nav']->render(); ?>
<thead>
<tr>
<td><?= $this->getHtml('ID', '0', '0'); ?>
<td><?= $this->getHtml('Trigger', 'Auditor', 'Backend'); ?>
<td><?= $this->getHtml('Action', 'Auditor', 'Backend'); ?>
<td class="wf-100"><?= $this->getHtml('Trigger', 'Auditor', 'Backend'); ?>
<td><?= $this->getHtml('CreatedBy', 'Auditor', 'Backend'); ?>
<td><?= $this->getHtml('CreatedAt', 'Auditor', 'Backend'); ?>
<tbody>
@ -512,12 +522,12 @@ echo $this->data['nav']->render(); ?>
?>
<tr data-href="<?= $url; ?>">
<td><a href="<?= $url; ?>"><?= $audit->id; ?></a>
<td><a href="<?= $url; ?>"><?= $audit->trigger; ?></a>
<td><?php if ($audit->old === null) : echo $this->getHtml('CREATE', 'Auditor', 'Backend'); ?>
<?php elseif ($audit->old !== null && $audit->new !== null) : echo $this->getHtml('UPDATE', 'Auditor', 'Backend'); ?>
<?php elseif ($audit->new === null) : echo $this->getHtml('DELETE', 'Auditor', 'Backend'); ?>
<?php else : echo $this->getHtml('UNKNOWN', 'Auditor', 'Backend'); ?>
<?php endif; ?>
<td><a href="<?= $url; ?>"><?= $audit->trigger; ?></a>
<td><a class="content"
href="<?= UriFactory::build('{/base}/admin/account/settings?id=' . $audit->createdBy->id); ?>"><?= $this->printHtml(
$this->renderUserName('%3$s %2$s %1$s', [$audit->createdBy->name1, $audit->createdBy->name2, $audit->createdBy->name3, $audit->createdBy->login])
@ -529,6 +539,8 @@ echo $this->data['nav']->render(); ?>
</div>
</div>
</div>
<?php endif; ?>
</div>
</div>

View File

@ -0,0 +1,71 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\ItemManagement
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
use phpOMS\Uri\UriFactory;
/** @var \phpOMS\Views\View $this */
$types = $this->data['types'];
echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('PaymentTerms'); ?><i class="g-icon download btn end-xs">download</i></div>
<div class="slider">
<table id="iContractTypeList" class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('ID', '0', '0'); ?>
<label for="iContractTypeList-sort-1">
<input type="radio" name="iContractTypeList-sort" id="iContractTypeList-sort-1">
<i class="sort-asc g-icon">expand_less</i>
</label>
<label for="iContractTypeList-sort-2">
<input type="radio" name="iContractTypeList-sort" id="iContractTypeList-sort-2">
<i class="sort-desc g-icon">expand_more</i>
</label>
<label>
<i class="filter g-icon">filter_alt</i>
</label>
<td class="wf-100"><?= $this->getHtml('Name'); ?>
<label for="iContractTypeList-sort-2">
<input type="radio" name="iContractTypeList-sort" id="iContractTypeList-sort-2">
<i class="sort-asc g-icon">expand_less</i>
</label>
<label for="iContractTypeList-sort-3">
<input type="radio" name="iContractTypeList-sort" id="iContractTypeList-sort-3">
<i class="sort-desc g-icon">expand_more</i>
</label>
<label>
<i class="filter g-icon">filter_alt</i>
</label>
<tbody>
<?php
$count = 0;
foreach ($types as $key => $value) : ++$count;
$url = UriFactory::build('{/base}/bill/payment/view?{?}&id=' . $value->id);
?>
<tr data-href="<?= $url; ?>">
<td><a href="<?= $url; ?>"><?= $value->id; ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getL11n()); ?></a>
<?php endforeach; ?>
<?php if ($count === 0) : ?>
<tr><td colspan="2" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?>
</table>
</div>
</section>
</div>
</div>

View File

@ -0,0 +1,53 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Billing
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
use phpOMS\Uri\UriFactory;
/** @var \phpOMS\Localization\BaseStringL11nType */
$type = $this->data['type'];
/** @var \phpOMS\Views\View $this */
echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12 col-md-6">
<div class="portlet">
<form id="paymentForm" method="POST" action="<?= UriFactory::build('{/api}bill/payment'); ?>"
data-ui-container="#paymentTable tbody"
data-add-form="paymentForm"
data-add-tpl="#paymentTable tbody .oms-add-tpl-payment">
<div class="portlet-head"><?= $this->getHtml('PaymentTerm'); ?></div>
<div class="portlet-body">
<div class="form-group">
<label for="iName"><?= $this->getHtml('Name'); ?></label>
<input type="text" name="code" id="iName" placeholder="" value="<?= $this->printHtml($type->title); ?>">
</div>
</div>
<div class="portlet-foot">
<input type="hidden" name="id" value="<?= $type->id; ?>">
<input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Save', '0', '0'); ?>">
</div>
</form>
</div>
</div>
</div>
<div class="row">
<?= $this->data['l11nView']->render(
$this->data['l11nValues'],
[],
'{/api}bill/payment/l11n'
);
?>
</div>

View File

@ -25,11 +25,10 @@ include __DIR__ . '/../../../Media/Theme/Backend/template-functions.php';
$bill = $this->data['bill'];
$elements = $bill->getElements();
$previewType = $this->data['previewType'];
$billTypes = $this->data['billtypes'] ?? [];
$originalType = $this->data['originalType'];
$billPdf = $bill->getFileByType($previewType);
$original = $bill->getFileByType($originalType);
$media = $bill->files;
$original = $bill->getFileByType($originalType);
/** @var \Modules\Auditor\Models\Audit */
$logs = $this->data['logs'] ?? [];
@ -155,15 +154,15 @@ echo $this->data['nav']->render(); ?>
<thead>
<tr>
<td>
<td><?= $this->getHtml('Item'); ?>
<td class="wf-100"><?= $this->getHtml('Name'); ?>
<td><?= $this->getHtml('Quantity'); ?>
<td><?= $this->getHtml('Price'); ?>
<td><?= $this->getHtml('Discount'); ?>
<td><?= $this->getHtml('DiscountP'); ?>
<td><?= $this->getHtml('Bonus'); ?>
<td><?= $this->getHtml('Tax'); ?>
<td><?= $this->getHtml('Net'); ?>
<td style="min-width:150px"><?= $this->getHtml('Item'); ?>
<td class="wf-100" style="min-width:150px"><?= $this->getHtml('Name'); ?>
<td style="min-width:50px"><?= $this->getHtml('Quantity'); ?>
<td style="min-width:90px"><?= $this->getHtml('Price'); ?>
<td style="min-width:90px"><?= $this->getHtml('Discount'); ?>
<td style="min-width:90px"><?= $this->getHtml('DiscountP'); ?>
<td style="min-width:90px"><?= $this->getHtml('Bonus'); ?>
<td style="min-width:90px"><?= $this->getHtml('Tax'); ?>
<td style="min-width:90px"><?= $this->getHtml('Net'); ?>
<tbody>
<?php foreach ($elements as $element) : ?>
<tr>
@ -171,7 +170,7 @@ echo $this->data['nav']->render(); ?>
<td><span class="input"><button type="button" formaction=""><i class="g-icon">book</i></button><input name="" type="text" value="<?= $element->itemNumber; ?>" required></span>
<td><textarea required><?= $element->itemName; ?></textarea>
<td><input name="" type="number" min="0" value="<?= $element->quantity; ?>" required>
<td><input name="" type="text" value="<?= $this->getCurrency($element->singleSalesPriceNet); ?>">
<td><input name="" type="text" value="<?= $this->getCurrency($element->singleSalesPriceNet, ''); ?>">
<td><input name="" type="number" min="0">
<td><input name="" type="number" min="0" max="100" step="any">
<td><input name="" type="number" min="0" step="any">
@ -201,20 +200,31 @@ echo $this->data['nav']->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-3" name="tabular-2">
<div class="tab col-simple">
<div class="row col-simple">
<div>
<div class="col-xs-12 col-sm-3 box">
<select id="iBillPreviewType" name="bill_preview_type"
data-action='[{"listener": "change", "action": [{"key": 1, "type": "dom.reload", "src": "iPreviewBill"}]}]'>
<?php foreach ($billTypes as $type) : ?>
<option value="<?= $type->id; ?>"><?= $this->printHtml($type->getL11n()); ?>
<?php endforeach; ?>
</select>
</div>
</div>
<div class="col-simple">
<div class="col-xs-12 col-simple">
<section id="mediaFile" class="portlet col-simple">
<div class="portlet-body col-simple">
<?php if ($billPdf->id > 0) : ?>
<iframe class="col-simple" data-form="iUiSettings" data-name="iframeHelper" id="iHelperFrame" src="<?= UriFactory::build('Resources/mozilla/Pdf/web/viewer.html{?}&file=' . \urlencode(($billPdf->isAbsolute ? '' : '/../../../../') . $billPdf->getPath())); ?>" allowfullscreen></iframe>
<?php endif; ?>
<iframe class="col-simple" id="iPreviewBill" data-src="Resources/mozilla/Pdf/web/viewer.html?file=<?= \urlencode(UriFactory::build('{/api}bill/render/preview?bill=' . $bill->id) . '&bill_type='); ?>{#iBillPreviewType}" loading="lazy" allowfullscreen></iframe>
</div>
</section>
</div>
</div>
</div>
<input type="radio" id="c-tab-4" name="tabular-2">
<div class="tab col-simple">
<div class="row col-simple">
@ -229,6 +239,7 @@ echo $this->data['nav']->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-5" name="tabular-2">
<div class="tab">
<div class="row">
@ -268,10 +279,12 @@ echo $this->data['nav']->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-6" name="tabular-2">
<div class="tab col-simple">
<?= $this->data['media-upload']->render('bill-file', 'files', '', $media); ?>
<?= $this->data['media-upload']->render('bill-file', 'files', '', $bill->files); ?>
</div>
<input type="radio" id="c-tab-7" name="tabular-2">
<div class="tab">
<div class="row">

View File

@ -0,0 +1,71 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\ItemManagement
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
use phpOMS\Uri\UriFactory;
/** @var \phpOMS\Views\View $this */
$types = $this->data['types'];
echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('ShippingTerms'); ?><i class="g-icon download btn end-xs">download</i></div>
<div class="slider">
<table id="iContractTypeList" class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('ID', '0', '0'); ?>
<label for="iContractTypeList-sort-1">
<input type="radio" name="iContractTypeList-sort" id="iContractTypeList-sort-1">
<i class="sort-asc g-icon">expand_less</i>
</label>
<label for="iContractTypeList-sort-2">
<input type="radio" name="iContractTypeList-sort" id="iContractTypeList-sort-2">
<i class="sort-desc g-icon">expand_more</i>
</label>
<label>
<i class="filter g-icon">filter_alt</i>
</label>
<td class="wf-100"><?= $this->getHtml('Name'); ?>
<label for="iContractTypeList-sort-2">
<input type="radio" name="iContractTypeList-sort" id="iContractTypeList-sort-2">
<i class="sort-asc g-icon">expand_less</i>
</label>
<label for="iContractTypeList-sort-3">
<input type="radio" name="iContractTypeList-sort" id="iContractTypeList-sort-3">
<i class="sort-desc g-icon">expand_more</i>
</label>
<label>
<i class="filter g-icon">filter_alt</i>
</label>
<tbody>
<?php
$count = 0;
foreach ($types as $key => $value) : ++$count;
$url = UriFactory::build('{/base}/bill/shipping/view?{?}&id=' . $value->id);
?>
<tr data-href="<?= $url; ?>">
<td><a href="<?= $url; ?>"><?= $value->id; ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getL11n()); ?></a>
<?php endforeach; ?>
<?php if ($count === 0) : ?>
<tr><td colspan="2" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?>
</table>
</div>
</section>
</div>
</div>

View File

@ -0,0 +1,53 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Billing
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
use phpOMS\Uri\UriFactory;
/** @var \phpOMS\Localization\BaseStringL11nType */
$type = $this->data['type'];
/** @var \phpOMS\Views\View $this */
echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12 col-md-6">
<div class="portlet">
<form id="shippingForm" method="POST" action="<?= UriFactory::build('{/api}bill/shipping'); ?>"
data-ui-container="#shippingTable tbody"
data-add-form="shippingForm"
data-add-tpl="#shippingTable tbody .oms-add-tpl-shipping">
<div class="portlet-head"><?= $this->getHtml('ShippingTerm'); ?></div>
<div class="portlet-body">
<div class="form-group">
<label for="iName"><?= $this->getHtml('Name'); ?></label>
<input type="text" name="code" id="iName" placeholder="" value="<?= $this->printHtml($type->title); ?>">
</div>
</div>
<div class="portlet-foot">
<input type="hidden" name="id" value="<?= $type->id; ?>">
<input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Save', '0', '0'); ?>">
</div>
</form>
</div>
</div>
</div>
<div class="row">
<?= $this->data['l11nView']->render(
$this->data['l11nValues'],
[],
'{/api}bill/shipping/l11n'
);
?>
</div>