diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index 0f76e61..234e57b 100755 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -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": [] } ] }, diff --git a/Admin/Install/db.json b/Admin/Install/db.json index 7e9fa21..4b6a523 100755 --- a/Admin/Install/db.json +++ b/Admin/Install/db.json @@ -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", diff --git a/Admin/Install/paymentterms.json b/Admin/Install/paymentterms.json new file mode 100644 index 0000000..394d4ef --- /dev/null +++ b/Admin/Install/paymentterms.json @@ -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" + } + } +] \ No newline at end of file diff --git a/Admin/Install/shippingterms.json b/Admin/Install/shippingterms.json new file mode 100644 index 0000000..7c11ace --- /dev/null +++ b/Admin/Install/shippingterms.json @@ -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" + } + } +] \ No newline at end of file diff --git a/Admin/Install/types.json b/Admin/Install/types.json index 165483c..df385e9 100755 --- a/Admin/Install/types.json +++ b/Admin/Install/types.json @@ -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, diff --git a/Admin/Installer.php b/Admin/Installer.php index 77f6f41..5d2b2c3 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -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 $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 $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; + } } diff --git a/Admin/Routes/Web/Api.php b/Admin/Routes/Web/Api.php index f20525d..ebe8ff4 100755 --- a/Admin/Routes/Web/Api.php +++ b/Admin/Routes/Web/Api.php @@ -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, + ], + ], + ], ]; diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index 082061c..48fcc96 100755 --- a/Admin/Routes/Web/Backend.php +++ b/Admin/Routes/Web/Backend.php @@ -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, + ], + ], + ], ]; diff --git a/Controller/ApiAttributeController.php b/Controller/ApiAttributeController.php index 6725f1d..e493871 100755 --- a/Controller/ApiAttributeController.php +++ b/Controller/ApiAttributeController.php @@ -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); diff --git a/Controller/ApiBillController.php b/Controller/ApiBillController.php index 1160161..dce666e 100755 --- a/Controller/ApiBillController.php +++ b/Controller/ApiBillController.php @@ -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); diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 0103c26..ad39f58 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -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 + * + * @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 + * + * @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 + * + * @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 + * + * @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; + } } diff --git a/Controller/ApiPriceController.php b/Controller/ApiPriceController.php index 5239aea..4945162 100755 --- a/Controller/ApiPriceController.php +++ b/Controller/ApiPriceController.php @@ -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; diff --git a/Controller/ApiTaxController.php b/Controller/ApiTaxController.php index 9702732..54d5f7f 100755 --- a/Controller/ApiTaxController.php +++ b/Controller/ApiTaxController.php @@ -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 diff --git a/Controller/BackendController.php b/Controller/BackendController.php index e9d735e..9dadae6 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -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; + } } diff --git a/Controller/CliController.php b/Controller/CliController.php index e44f4d0..9818ab8 100755 --- a/Controller/CliController.php +++ b/Controller/CliController.php @@ -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); diff --git a/Models/Attribute/BillAttributeTypeMapper.php b/Models/Attribute/BillAttributeTypeMapper.php index d41769b..77422d9 100755 --- a/Models/Attribute/BillAttributeTypeMapper.php +++ b/Models/Attribute/BillAttributeTypeMapper.php @@ -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'], ]; diff --git a/Models/Attribute/BillAttributeValueMapper.php b/Models/Attribute/BillAttributeValueMapper.php index 22323b6..8b99fd9 100755 --- a/Models/Attribute/BillAttributeValueMapper.php +++ b/Models/Attribute/BillAttributeValueMapper.php @@ -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, ], ]; diff --git a/Models/Bill.php b/Models/Bill.php index 61a0c63..e556fea 100755 --- a/Models/Bill.php +++ b/Models/Bill.php @@ -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 ); diff --git a/Models/BillElement.php b/Models/BillElement.php index 4a13bff..98f917a 100755 --- a/Models/BillElement.php +++ b/Models/BillElement.php @@ -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, diff --git a/Models/BillElementMapper.php b/Models/BillElementMapper.php index f397608..19ade53 100755 --- a/Models/BillElementMapper.php +++ b/Models/BillElementMapper.php @@ -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', + ], ]; /** diff --git a/Models/BillMapper.php b/Models/BillMapper.php index 5fd58f3..2ce5b9b 100755 --- a/Models/BillMapper.php +++ b/Models/BillMapper.php @@ -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'], ]; /** diff --git a/Models/BillTransferType.php b/Models/BillTransferType.php index c47b4a8..9b7bd59 100755 --- a/Models/BillTransferType.php +++ b/Models/BillTransferType.php @@ -30,5 +30,7 @@ abstract class BillTransferType extends Enum public const PURCHASE = 2; + public const PRODUCTION = 3; + public const STOCK = 4; } diff --git a/Models/PaymentTermL11nMapper.php b/Models/PaymentTermL11nMapper.php new file mode 100644 index 0000000..5513e02 --- /dev/null +++ b/Models/PaymentTermL11nMapper.php @@ -0,0 +1,69 @@ + + */ +final class PaymentTermL11nMapper extends DataMapperFactory +{ + /** + * Columns. + * + * @var 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 + * @since 1.0.0 + */ + public const MODEL = BaseStringL11n::class; +} diff --git a/Models/PaymentTermMapper.php b/Models/PaymentTermMapper.php new file mode 100644 index 0000000..53aa26a --- /dev/null +++ b/Models/PaymentTermMapper.php @@ -0,0 +1,83 @@ + + */ +final class PaymentTermMapper extends DataMapperFactory +{ + /** + * Columns. + * + * @var 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 + * @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 + * @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'; +} diff --git a/Models/PermissionCategory.php b/Models/PermissionCategory.php index 1987ca4..ffe47a6 100755 --- a/Models/PermissionCategory.php +++ b/Models/PermissionCategory.php @@ -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; } diff --git a/Models/Price/Price.php b/Models/Price/Price.php index 94f97b7..9a61c01 100755 --- a/Models/Price/Price.php +++ b/Models/Price/Price.php @@ -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(); diff --git a/Models/Price/PriceMapper.php b/Models/Price/PriceMapper.php index 4008edd..5108e5e 100755 --- a/Models/Price/PriceMapper.php +++ b/Models/Price/PriceMapper.php @@ -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, diff --git a/Models/SalesBillMapper.php b/Models/SalesBillMapper.php index a1d858e..4ee9589 100755 --- a/Models/SalesBillMapper.php +++ b/Models/SalesBillMapper.php @@ -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(); } /** diff --git a/Models/ShippingTermL11nMapper.php b/Models/ShippingTermL11nMapper.php new file mode 100644 index 0000000..be630b4 --- /dev/null +++ b/Models/ShippingTermL11nMapper.php @@ -0,0 +1,69 @@ + + */ +final class ShippingTermL11nMapper extends DataMapperFactory +{ + /** + * Columns. + * + * @var 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 + * @since 1.0.0 + */ + public const MODEL = BaseStringL11n::class; +} diff --git a/Models/ShippingTermMapper.php b/Models/ShippingTermMapper.php new file mode 100644 index 0000000..791027b --- /dev/null +++ b/Models/ShippingTermMapper.php @@ -0,0 +1,83 @@ + + */ +final class ShippingTermMapper extends DataMapperFactory +{ + /** + * Columns. + * + * @var 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 + * @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 + * @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'; +} diff --git a/Models/billIdentifier.json b/Models/billIdentifier.json deleted file mode 100755 index dd133c9..0000000 --- a/Models/billIdentifier.json +++ /dev/null @@ -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|,|:|\\.|#)+(?.*?)( |$)/i", - "/(#)(?.*?)( |$)/i" - ], - "de": [ - "/(rechnungsn.*?|beleg.*?)(?.*?)( |$)/i" - ] - }, - "bill_date": { - "en": [ - "/(inv.*?)(date.*?)(\\s|,|:|\\.)+(?.*?)( |$)/i", - "/(date.*?)(\\s|,|:|\\.)+(?.*?)( |$)/i" - ], - "de": [ - "/(rechnungsdat.*?|belegdat.*?)(\\s|,|:|\\.)+(?.*?)( |$)/i" - ] - }, - "bill_due": { - "en": [ - "/(due date.*?)(\\s|,|:|\\.)+(?.*?)( |$)/i", - "/(due.*?)(\\s|,|:|\\.)+(?.*?)( |$)/i" - ], - "de": [ - "/(fällig.*?)(\\s|,|:|\\.)+(?.*?)( |$)/i" - ] - }, - "total_gross": { - "en": [ - "/(total.*?|gross.*?)(?([0-9]+,*\\.*)+)/i" - ], - "de": [ - "/(betrag.*?|gesamt.*?|brutto.*?)(?([0-9]+,*\\.*)+)/i" - ] - } -} \ No newline at end of file diff --git a/Models/bill_identifier.json b/Models/bill_identifier.json new file mode 100644 index 0000000..fe912d5 --- /dev/null +++ b/Models/bill_identifier.json @@ -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|,|:|\\.|#)+(?.*?)( |$)/i", + "/(#)(?.*?)( |$)/i" + ], + "de": [ + "/(rechnungsn.*?|beleg.*?)(?.*?)( |$)/i" + ] + }, + "bill_date": { + "en": [ + "/(inv.*?)(date.*?)(\\s|,|:|\\.)+(?.*?)( |$)/i", + "/(date.*?)(\\s|,|:|\\.)+(?.*?)( |$)/i" + ], + "de": [ + "/(rechnungsdat.*?|belegdat.*?)(\\s|,|:|\\.)+(?.*?)( |$)/i" + ] + }, + "bill_due": { + "en": [ + "/(due date.*?)(\\s|,|:|\\.)+(?.*?)( |$)/i", + "/(due.*?)(\\s|,|:|\\.)+(?.*?)( |$)/i" + ], + "de": [ + "/(fällig.*?)(\\s|,|:|\\.)+(?.*?)( |$)/i" + ] + }, + "total_net": { + "en": [ + "/(subtotal.*?|net.*?)(?([0-9]+,*\\.*)+)/i" + ], + "de": [ + "/(netto.*?|zwischensumme.*?)(?([0-9]+,*\\.*)+)/i" + ] + }, + "total_tax": { + "en": [ + "/(tax.*?)(?([0-9]+,*\\.*)+)/i" + ], + "de": [ + "/(USt.*?|Mwst.*?|Umsatzsteuer.*?|Mehrwehrtsteuer.*?)(?([0-9]+,*\\.*)+)/i" + ] + }, + "total_gross": { + "en": [ + "/(total.*?|gross.*?)(?([0-9]+,*\\.*)+)/i" + ], + "de": [ + "/(betrag.*?|gesamt.*?|brutto|rechnungsbetrag.*?|summe.*?)(?([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+)" + } + } + } +} \ No newline at end of file diff --git a/Models/itemcategoryidentifier.json b/Models/item_category_identifier.json similarity index 50% rename from Models/itemcategoryidentifier.json rename to Models/item_category_identifier.json index d2b3eaf..2216771 100644 --- a/Models/itemcategoryidentifier.json +++ b/Models/item_category_identifier.json @@ -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" + ] } } \ No newline at end of file diff --git a/Theme/Backend/Lang/Navigation.en.lang.php b/Theme/Backend/Lang/Navigation.en.lang.php index f446247..35023be 100755 --- a/Theme/Backend/Lang/Navigation.en.lang.php +++ b/Theme/Backend/Lang/Navigation.en.lang.php @@ -19,4 +19,6 @@ return ['Navigation' => [ 'InvoiceRecognition' => 'Invoice Recognition', 'Open' => 'Open', 'Upload' => 'Upload', + 'PaymentTerms' => 'Payment Terms', + 'ShippingTerms' => 'Shipping Terms', ]]; diff --git a/Theme/Backend/Lang/ar.lang.php b/Theme/Backend/Lang/ar.lang.php index 1f81fe3..7e12b2b 100755 --- a/Theme/Backend/Lang/ar.lang.php +++ b/Theme/Backend/Lang/ar.lang.php @@ -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' => 'أزيز', ]]; diff --git a/Theme/Backend/Lang/cs.lang.php b/Theme/Backend/Lang/cs.lang.php index 0c5f3bd..e38fbb0 100755 --- a/Theme/Backend/Lang/cs.lang.php +++ b/Theme/Backend/Lang/cs.lang.php @@ -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', ]]; diff --git a/Theme/Backend/Lang/da.lang.php b/Theme/Backend/Lang/da.lang.php index 3495b7f..3aaa037 100755 --- a/Theme/Backend/Lang/da.lang.php +++ b/Theme/Backend/Lang/da.lang.php @@ -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.', ]]; diff --git a/Theme/Backend/Lang/de.lang.php b/Theme/Backend/Lang/de.lang.php index 876e11e..b90f441 100755 --- a/Theme/Backend/Lang/de.lang.php +++ b/Theme/Backend/Lang/de.lang.php @@ -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', ]]; diff --git a/Theme/Backend/Lang/el.lang.php b/Theme/Backend/Lang/el.lang.php index f79d7b5..8bedd08 100755 --- a/Theme/Backend/Lang/el.lang.php +++ b/Theme/Backend/Lang/el.lang.php @@ -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' => 'Φερμουάρ', ]]; diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index 5aa7212..4288b03 100755 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -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', ]]; diff --git a/Theme/Backend/Lang/es.lang.php b/Theme/Backend/Lang/es.lang.php index 4338aa8..42e0a37 100755 --- a/Theme/Backend/Lang/es.lang.php +++ b/Theme/Backend/Lang/es.lang.php @@ -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', ]]; diff --git a/Theme/Backend/Lang/fi.lang.php b/Theme/Backend/Lang/fi.lang.php index f026bb7..bc65818 100755 --- a/Theme/Backend/Lang/fi.lang.php +++ b/Theme/Backend/Lang/fi.lang.php @@ -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', ]]; diff --git a/Theme/Backend/Lang/fr.lang.php b/Theme/Backend/Lang/fr.lang.php index bfeff4d..87caaf1 100755 --- a/Theme/Backend/Lang/fr.lang.php +++ b/Theme/Backend/Lang/fr.lang.php @@ -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', ]]; diff --git a/Theme/Backend/Lang/hu.lang.php b/Theme/Backend/Lang/hu.lang.php index f27a41b..67b5a86 100755 --- a/Theme/Backend/Lang/hu.lang.php +++ b/Theme/Backend/Lang/hu.lang.php @@ -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', ]]; diff --git a/Theme/Backend/Lang/it.lang.php b/Theme/Backend/Lang/it.lang.php index a4f4b6b..072baed 100755 --- a/Theme/Backend/Lang/it.lang.php +++ b/Theme/Backend/Lang/it.lang.php @@ -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', ]]; diff --git a/Theme/Backend/Lang/ja.lang.php b/Theme/Backend/Lang/ja.lang.php index 301905e..33b1d1f 100755 --- a/Theme/Backend/Lang/ja.lang.php +++ b/Theme/Backend/Lang/ja.lang.php @@ -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' => 'ジップ', ]]; diff --git a/Theme/Backend/Lang/ko.lang.php b/Theme/Backend/Lang/ko.lang.php index f168827..afb184a 100755 --- a/Theme/Backend/Lang/ko.lang.php +++ b/Theme/Backend/Lang/ko.lang.php @@ -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' => '지퍼', ]]; diff --git a/Theme/Backend/Lang/no.lang.php b/Theme/Backend/Lang/no.lang.php index 5211e39..e337c9d 100755 --- a/Theme/Backend/Lang/no.lang.php +++ b/Theme/Backend/Lang/no.lang.php @@ -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', ]]; diff --git a/Theme/Backend/Lang/pl.lang.php b/Theme/Backend/Lang/pl.lang.php index 90fcfa8..8fa2223 100755 --- a/Theme/Backend/Lang/pl.lang.php +++ b/Theme/Backend/Lang/pl.lang.php @@ -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', ]]; diff --git a/Theme/Backend/Lang/pt.lang.php b/Theme/Backend/Lang/pt.lang.php index b411655..7fd6f35 100755 --- a/Theme/Backend/Lang/pt.lang.php +++ b/Theme/Backend/Lang/pt.lang.php @@ -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', ]]; diff --git a/Theme/Backend/Lang/ru.lang.php b/Theme/Backend/Lang/ru.lang.php index 385b0a8..a71b5b5 100755 --- a/Theme/Backend/Lang/ru.lang.php +++ b/Theme/Backend/Lang/ru.lang.php @@ -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.', ]]; diff --git a/Theme/Backend/Lang/sv.lang.php b/Theme/Backend/Lang/sv.lang.php index 22c7ea2..1a0d370 100755 --- a/Theme/Backend/Lang/sv.lang.php +++ b/Theme/Backend/Lang/sv.lang.php @@ -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', ]]; diff --git a/Theme/Backend/Lang/th.lang.php b/Theme/Backend/Lang/th.lang.php index 82955dc..076704f 100755 --- a/Theme/Backend/Lang/th.lang.php +++ b/Theme/Backend/Lang/th.lang.php @@ -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' => 'ซิป', ]]; diff --git a/Theme/Backend/Lang/tr.lang.php b/Theme/Backend/Lang/tr.lang.php index 7d4a468..7782978 100755 --- a/Theme/Backend/Lang/tr.lang.php +++ b/Theme/Backend/Lang/tr.lang.php @@ -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', ]]; diff --git a/Theme/Backend/Lang/uk.lang.php b/Theme/Backend/Lang/uk.lang.php index bd1dafd..f543a17 100755 --- a/Theme/Backend/Lang/uk.lang.php +++ b/Theme/Backend/Lang/uk.lang.php @@ -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' => 'Блиск', ]]; diff --git a/Theme/Backend/Lang/zh.lang.php b/Theme/Backend/Lang/zh.lang.php index 57a23db..96506e9 100755 --- a/Theme/Backend/Lang/zh.lang.php +++ b/Theme/Backend/Lang/zh.lang.php @@ -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' => '压缩', ]]; diff --git a/Theme/Backend/bill-create.tpl.php b/Theme/Backend/bill-create.tpl.php index 30f10c0..65295d2 100755 --- a/Theme/Backend/bill-create.tpl.php +++ b/Theme/Backend/bill-create.tpl.php @@ -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(); ?>
@@ -52,10 +54,10 @@ echo $this->data['nav']->render(); ?>
  • -
  • +
  • -
  • -
  • +
  • +
  • @@ -267,6 +269,7 @@ echo $this->data['nav']->render(); ?>
    getHtml('Invoice'); ?>download
    +
    data['nav']->render(); ?>
    - getHtml('Item'); ?> - getHtml('Name'); ?> - getHtml('Quantity'); ?> + getHtml('Item'); ?> + getHtml('Name'); ?> + getHtml('Quantity'); ?> getHtml('Discount'); ?> getHtml('DiscountP'); ?> getHtml('Bonus'); ?> @@ -318,9 +321,9 @@ echo $this->data['nav']->render(); ?> expand_more close - > - - > + > + >itemName; ?> + > > > > @@ -344,7 +347,7 @@ echo $this->data['nav']->render(); ?>
    - +
    @@ -359,7 +362,8 @@ echo $this->data['nav']->render(); ?>
    -
    + +
    @@ -389,6 +395,8 @@ echo $this->data['nav']->render(); ?>
    + +
    @@ -491,6 +499,8 @@ echo $this->data['nav']->render(); ?>
    data['media-upload']->render('bill-file', 'files', '', $media); ?>
    + +
    @@ -501,8 +511,8 @@ echo $this->data['nav']->render(); ?> getHtml('ID', '0', '0'); ?> - getHtml('Trigger', 'Auditor', 'Backend'); ?> getHtml('Action', 'Auditor', 'Backend'); ?> + getHtml('Trigger', 'Auditor', 'Backend'); ?> getHtml('CreatedBy', 'Auditor', 'Backend'); ?> getHtml('CreatedAt', 'Auditor', 'Backend'); ?> @@ -512,12 +522,12 @@ echo $this->data['nav']->render(); ?> ?> id; ?> - trigger; ?> old === null) : echo $this->getHtml('CREATE', 'Auditor', 'Backend'); ?> old !== null && $audit->new !== null) : echo $this->getHtml('UPDATE', 'Auditor', 'Backend'); ?> new === null) : echo $this->getHtml('DELETE', 'Auditor', 'Backend'); ?> getHtml('UNKNOWN', 'Auditor', 'Backend'); ?> + trigger; ?> 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(); ?>
    + +
    diff --git a/Theme/Backend/payment-type-list.tpl.php b/Theme/Backend/payment-type-list.tpl.php new file mode 100644 index 0000000..d36f6d8 --- /dev/null +++ b/Theme/Backend/payment-type-list.tpl.php @@ -0,0 +1,71 @@ +data['types']; + +echo $this->data['nav']->render(); ?> + +
    +
    +
    +
    getHtml('PaymentTerms'); ?>download
    +
    + + + + + $value) : ++$count; + $url = UriFactory::build('{/base}/bill/payment/view?{?}&id=' . $value->id); + ?> + +
    getHtml('ID', '0', '0'); ?> + + + + getHtml('Name'); ?> + + + +
    id; ?> + printHtml($value->getL11n()); ?> + + +
    getHtml('Empty', '0', '0'); ?> + +
    +
    +
    +
    +
    diff --git a/Theme/Backend/payment-view.tpl.php b/Theme/Backend/payment-view.tpl.php new file mode 100644 index 0000000..6453683 --- /dev/null +++ b/Theme/Backend/payment-view.tpl.php @@ -0,0 +1,53 @@ +data['type']; + +/** @var \phpOMS\Views\View $this */ +echo $this->data['nav']->render(); ?> +
    +
    +
    +
    +
    getHtml('PaymentTerm'); ?>
    +
    +
    + + +
    +
    + +
    + + +
    +
    +
    +
    +
    + +
    + data['l11nView']->render( + $this->data['l11nValues'], + [], + '{/api}bill/payment/l11n' + ); + ?> +
    \ No newline at end of file diff --git a/Theme/Backend/purchase-bill.tpl.php b/Theme/Backend/purchase-bill.tpl.php index 46fb14f..04bea9a 100755 --- a/Theme/Backend/purchase-bill.tpl.php +++ b/Theme/Backend/purchase-bill.tpl.php @@ -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(); ?> - getHtml('Item'); ?> - getHtml('Name'); ?> - getHtml('Quantity'); ?> - getHtml('Price'); ?> - getHtml('Discount'); ?> - getHtml('DiscountP'); ?> - getHtml('Bonus'); ?> - getHtml('Tax'); ?> - getHtml('Net'); ?> + getHtml('Item'); ?> + getHtml('Name'); ?> + getHtml('Quantity'); ?> + getHtml('Price'); ?> + getHtml('Discount'); ?> + getHtml('DiscountP'); ?> + getHtml('Bonus'); ?> + getHtml('Tax'); ?> + getHtml('Net'); ?> @@ -171,7 +170,7 @@ echo $this->data['nav']->render(); ?> - + @@ -201,20 +200,31 @@ echo $this->data['nav']->render(); ?>
    +
    -
    +
    +
    + +
    +
    + +
    - id > 0) : ?> - - +
    +
    @@ -229,6 +239,7 @@ echo $this->data['nav']->render(); ?>
    +
    @@ -268,10 +279,12 @@ echo $this->data['nav']->render(); ?>
    +
    - data['media-upload']->render('bill-file', 'files', '', $media); ?> + data['media-upload']->render('bill-file', 'files', '', $bill->files); ?>
    +
    diff --git a/Theme/Backend/shipping-type-list.tpl.php b/Theme/Backend/shipping-type-list.tpl.php new file mode 100644 index 0000000..7db9527 --- /dev/null +++ b/Theme/Backend/shipping-type-list.tpl.php @@ -0,0 +1,71 @@ +data['types']; + +echo $this->data['nav']->render(); ?> + +
    +
    +
    +
    getHtml('ShippingTerms'); ?>download
    +
    + + + + + $value) : ++$count; + $url = UriFactory::build('{/base}/bill/shipping/view?{?}&id=' . $value->id); + ?> + +
    getHtml('ID', '0', '0'); ?> + + + + getHtml('Name'); ?> + + + +
    id; ?> + printHtml($value->getL11n()); ?> + + +
    getHtml('Empty', '0', '0'); ?> + +
    +
    +
    +
    +
    diff --git a/Theme/Backend/shipping-view.tpl.php b/Theme/Backend/shipping-view.tpl.php new file mode 100644 index 0000000..025dd38 --- /dev/null +++ b/Theme/Backend/shipping-view.tpl.php @@ -0,0 +1,53 @@ +data['type']; + +/** @var \phpOMS\Views\View $this */ +echo $this->data['nav']->render(); ?> +
    +
    +
    +
    +
    getHtml('ShippingTerm'); ?>
    +
    +
    + + +
    +
    + +
    + + +
    +
    +
    +
    +
    + +
    + data['l11nView']->render( + $this->data['l11nValues'], + [], + '{/api}bill/shipping/l11n' + ); + ?> +
    \ No newline at end of file