todos fixed

This commit is contained in:
Dennis Eichhorn 2023-10-12 22:49:20 +00:00
parent dfa38a1b12
commit 80b1e6907a
50 changed files with 231 additions and 151 deletions

View File

@ -260,8 +260,6 @@ foreach ($taxes as $rate => $tax) {
$pdf->Ln();
}
// @todo: add currency
$pdf->setFillColor(255, 162, 7);
$pdf->setTextColor(255);
$pdf->setDrawColor(255, 162, 7);

View File

@ -217,8 +217,8 @@
"pid": "/",
"type": 2,
"subtype": 1,
"name": "Purchase",
"uri": "{/base}/private/purchase/billing/dashboard?{?}",
"name": "InvoiceRecognition",
"uri": "{/base}/private/purchase/recognition/dashboard?{?}",
"target": "self",
"icon": null,
"order": 5,
@ -232,7 +232,7 @@
"type": 3,
"subtype": 1,
"name": "List",
"uri": "{/base}/private/purchase/billing/dashboard?{?}",
"uri": "{/base}/private/purchase/recognition/dashboard?{?}",
"target": "self",
"icon": null,
"order": 1,
@ -248,7 +248,7 @@
"type": 3,
"subtype": 1,
"name": "Upload",
"uri": "{/base}/private/purchase/billing/upload?{?}",
"uri": "{/base}/private/purchase/recognition/upload?{?}",
"target": "self",
"icon": null,
"order": 5,
@ -259,5 +259,53 @@
]
}
]
},
{
"id": 1005110001,
"pid": "/",
"type": 2,
"subtype": 1,
"name": "InvoiceRecognition",
"uri": "{/base}/purchase/recognition/dashboard?{?}",
"target": "self",
"icon": null,
"order": 5,
"from": "Billing",
"permission": { "permission": 2, "category": null, "element": null },
"parent": 1003401001,
"children": [
{
"id": 1005110101,
"pid": "/",
"type": 3,
"subtype": 1,
"name": "List",
"uri": "{/base}/purchase/recognition/dashboard?{?}",
"target": "self",
"icon": null,
"order": 1,
"from": "Billing",
"permission": { "permission": 2, "category": null, "element": null },
"parent": 1005110001,
"children": [
]
},
{
"id": 1005110201,
"pid": "/",
"type": 3,
"subtype": 1,
"name": "Upload",
"uri": "{/base}/purchase/recognition/upload?{?}",
"target": "self",
"icon": null,
"order": 5,
"from": "Billing",
"permission": { "permission": 2, "category": null, "element": null },
"parent": 1005110001,
"children": [
]
}
]
}
]

View File

@ -131,7 +131,7 @@ return [
],
],
'^.*/private/purchase/billing/dashboard.*$' => [
'^.*/private/purchase/recognition/dashboard.*$' => [
[
'dest' => '\Modules\Billing\Controller\BackendController:viewPrivatePurchaseBillDashboard',
'verb' => RouteVerb::GET,
@ -142,7 +142,7 @@ return [
],
],
],
'^.*/private/purchase/billing/upload.*$' => [
'^.*/private/purchase/recognition/upload.*$' => [
[
'dest' => '\Modules\Billing\Controller\BackendController:viewPrivatePurchaseBillUpload',
'verb' => RouteVerb::GET,
@ -153,7 +153,40 @@ return [
],
],
],
'^.*/private/purchase/billing/bill.*$' => [
'^.*/private/purchase/recognition/bill.*$' => [
[
'dest' => '\Modules\Billing\Controller\BackendController:viewPrivateBillingPurchaseInvoice',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionCategory::PRIVATE_DASHBOARD,
],
],
],
'^.*/purchase/recognition/dashboard.*$' => [
[
'dest' => '\Modules\Billing\Controller\BackendController:viewPrivatePurchaseBillDashboard',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionCategory::PRIVATE_DASHBOARD,
],
],
],
'^.*/purchase/recognition/upload.*$' => [
[
'dest' => '\Modules\Billing\Controller\BackendController:viewPrivatePurchaseBillUpload',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionCategory::PRIVATE_BILL_UPLOAD,
],
],
],
'^.*/purchase/recognition/bill.*$' => [
[
'dest' => '\Modules\Billing\Controller\BackendController:viewPrivateBillingPurchaseInvoice',
'verb' => RouteVerb::GET,

View File

@ -61,7 +61,7 @@ final class ApiAttributeController extends Controller
return;
}
$type = BillAttributeTypeMapper::get()->where('id', (int) $request->getData('type'))->execute();
$type = BillAttributeTypeMapper::get()->with('defaults')->where('id', (int) $request->getData('type'))->execute();
$attribute = $this->createAttributeFromRequest($request, $type);
$this->createModel($request->header->account, $attribute, BillAttributeMapper::class, 'attribute', $request->getOrigin());
$this->createStandardCreateResponse($request, $response, $attribute);
@ -359,7 +359,7 @@ final class ApiAttributeController extends Controller
}
/** @var AttributeType $old */
$old = BillAttributeTypeMapper::get()->where('id', (int) $request->getData('id'))->execute();
$old = BillAttributeTypeMapper::get()->with('defaults')->where('id', (int) $request->getData('id'))->execute();
$new = $this->updateAttributeTypeFromRequest($request, clone $old);
$this->updateModel($request->header->account, $old, $new, BillAttributeTypeMapper::class, 'bill_attribute_type', $request->getOrigin());
@ -391,7 +391,7 @@ final class ApiAttributeController extends Controller
}
/** @var AttributeType $billAttributeType */
$billAttributeType = BillAttributeTypeMapper::get()->where('id', (int) $request->getData('id'))->execute();
$billAttributeType = BillAttributeTypeMapper::get()->with('defaults')->where('id', (int) $request->getData('id'))->execute();
$this->deleteModel($request->header->account, $billAttributeType, BillAttributeTypeMapper::class, 'bill_attribute_type', $request->getOrigin());
$this->createStandardDeleteResponse($request, $response, $billAttributeType);
}

View File

@ -182,8 +182,10 @@ final class ApiBillController extends Controller
{
$this->createModel($request->header->account, $bill, BillMapper::class, 'bill', $request->getOrigin());
// We ned to get the bill again since the bill has a trigger which is executed on insert
// @todo: consider to remove the trigger and select the latest bill here and add + 1 to the new sequence since we have to tdo an update anyways
// We need to get the bill again since the bill has a trigger which is executed on insert
// Doing this manually would cause concurrency issues because there are times (up to 200ms)
// when the previous element doesn't have a sequence defined.
/** @var Bill $bill */
$tmp = BillMapper::get()
->where('id', $bill->id)
@ -192,7 +194,7 @@ final class ApiBillController extends Controller
$bill->sequence = $tmp->sequence;
$old = clone $bill;
$bill->buildNumber(); // The bill id is part of the number
$bill->buildNumber(); // The bill sequence number is part of the number
$this->updateModel($request->header->account, $old, $bill, BillMapper::class, 'bill', $request->getOrigin());
}
@ -537,7 +539,7 @@ final class ApiBillController extends Controller
->execute();
if (\count($billCollection) !== 1) {
// For some reason there are multiple collections with the same virtual path?
// @todo: For some reason there are multiple collections with the same virtual path?
// @todo: check if this is the correct way to handle it or if we need to make sure that it is a collection
return;
}

View File

@ -106,7 +106,6 @@ final class ApiPriceController extends Controller
}
// Get all relevant prices
// @todo: allow to define NOT IN somehow (e.g. not in France -> simple solution to define export prices etc.)
$queryMapper = PriceMapper::getAll();
if ($request->hasData('price_name')) {

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'أرشيف',
'Bill' => 'فاتورة',
'Billing' => 'الفواتير',
'Open' => '',
'Upload' => '',
'Archive' => 'أرشيف',
'Bill' => 'فاتورة',
'Billing' => 'الفواتير',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'Archiv',
'Bill' => 'Účtovat',
'Billing' => 'Fakturační',
'Open' => '',
'Upload' => '',
'Archive' => 'Archiv',
'Bill' => 'Účtovat',
'Billing' => 'Fakturační',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'Arkiv',
'Bill' => 'Regning',
'Billing' => 'Fakturering',
'Open' => '',
'Upload' => '',
'Archive' => 'Arkiv',
'Bill' => 'Regning',
'Billing' => 'Fakturering',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'Archiv',
'Bill' => 'Rechnung',
'Billing' => 'Billing',
'Open' => '',
'Upload' => '',
'Archive' => 'Archiv',
'Bill' => 'Rechnung',
'Billing' => 'Billing',
'InvoiceRecognition' => 'Rechnungserkennung',
'Open' => 'Offen',
'Upload' => 'Hochladen',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'Αρχειοθέτηση',
'Bill' => 'Νομοσχέδιο',
'Billing' => 'Χρέωση',
'Open' => '',
'Upload' => '',
'Archive' => 'Αρχειοθέτηση',
'Bill' => 'Νομοσχέδιο',
'Billing' => 'Χρέωση',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'Archive',
'Bill' => 'Bill',
'Billing' => 'Billing',
'Open' => 'Open',
'Upload' => 'Upload',
'Archive' => 'Archive',
'Bill' => 'Bill',
'Billing' => 'Billing',
'InvoiceRecognition' => 'Invoice Recognition',
'Open' => 'Open',
'Upload' => 'Upload',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'Archivo',
'Bill' => 'Factura',
'Billing' => 'Facturación',
'Open' => '',
'Upload' => '',
'Archive' => 'Archivo',
'Bill' => 'Factura',
'Billing' => 'Facturación',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'Arkisto',
'Bill' => 'Laskuttaa',
'Billing' => 'Laskutus',
'Open' => '',
'Upload' => '',
'Archive' => 'Arkisto',
'Bill' => 'Laskuttaa',
'Billing' => 'Laskutus',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'Archiver',
'Bill' => 'Facture',
'Billing' => 'Facturation',
'Open' => '',
'Upload' => '',
'Archive' => 'Archiver',
'Bill' => 'Facture',
'Billing' => 'Facturation',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'Archívum',
'Bill' => 'Számla',
'Billing' => 'Számlázás',
'Open' => '',
'Upload' => '',
'Archive' => 'Archívum',
'Bill' => 'Számla',
'Billing' => 'Számlázás',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'Archivio',
'Bill' => 'Conto',
'Billing' => 'Fatturazione',
'Open' => '',
'Upload' => '',
'Archive' => 'Archivio',
'Bill' => 'Conto',
'Billing' => 'Fatturazione',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'アーカイブ',
'Bill' => '明細書',
'Billing' => '請求する',
'Open' => '',
'Upload' => '',
'Archive' => 'アーカイブ',
'Bill' => '明細書',
'Billing' => '請求する',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => '보관소',
'Bill' => '청구서',
'Billing' => '청구자',
'Open' => '',
'Upload' => '',
'Archive' => '보관소',
'Bill' => '청구서',
'Billing' => '청구자',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'Arkivet',
'Bill' => 'Regning',
'Billing' => 'Fakturering',
'Open' => '',
'Upload' => '',
'Archive' => 'Arkivet',
'Bill' => 'Regning',
'Billing' => 'Fakturering',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'Archiwum.',
'Bill' => 'Rachunek',
'Billing' => 'Dane do faktury',
'Open' => '',
'Upload' => '',
'Archive' => 'Archiwum.',
'Bill' => 'Rachunek',
'Billing' => 'Dane do faktury',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'Arquivo',
'Bill' => 'Conta',
'Billing' => 'Cobrança',
'Open' => '',
'Upload' => '',
'Archive' => 'Arquivo',
'Bill' => 'Conta',
'Billing' => 'Cobrança',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'Архив',
'Bill' => 'Счет',
'Billing' => 'Биллинг',
'Open' => '',
'Upload' => '',
'Archive' => 'Архив',
'Bill' => 'Счет',
'Billing' => 'Биллинг',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'Arkiv',
'Bill' => 'Räkningen',
'Billing' => 'Fakturering',
'Open' => '',
'Upload' => '',
'Archive' => 'Arkiv',
'Bill' => 'Räkningen',
'Billing' => 'Fakturering',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'คลังเก็บเอกสารสำคัญ',
'Bill' => 'ใบแจ้งหนี้',
'Billing' => 'การเรียกเก็บเงิน',
'Open' => '',
'Upload' => '',
'Archive' => 'คลังเก็บเอกสารสำคัญ',
'Bill' => 'ใบแจ้งหนี้',
'Billing' => 'การเรียกเก็บเงิน',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'Arşiv',
'Bill' => 'Fatura',
'Billing' => 'Fatura',
'Open' => '',
'Upload' => '',
'Archive' => 'Arşiv',
'Bill' => 'Fatura',
'Billing' => 'Fatura',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => 'Архів',
'Bill' => 'Вексель',
'Billing' => 'Платіж',
'Open' => '',
'Upload' => '',
'Archive' => 'Архів',
'Bill' => 'Вексель',
'Billing' => 'Платіж',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -13,9 +13,10 @@
declare(strict_types=1);
return ['Navigation' => [
'Archive' => '档案',
'Bill' => '账单',
'Billing' => '结算',
'Open' => '',
'Upload' => '',
'Archive' => '档案',
'Bill' => '账单',
'Billing' => '结算',
'InvoiceRecognition' => '',
'Open' => '',
'Upload' => '',
]];

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => 'دفع',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => 'بريدي',
'Prepaid' => 'مسبقة الدفع',
'Preview' => 'معاينة',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => 'Způsob platby',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => 'Poštovní',
'Prepaid' => 'Předplacený',
'Preview' => 'Náhled',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => 'Betaling',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => 'Postal.',
'Prepaid' => 'Forudbetalt',
'Preview' => 'Preview.',

View File

@ -31,7 +31,7 @@ return ['Billing' => [
'CIS' => 'CIS',
'Cashback' => 'Kennzeichnen',
'City' => 'Stadt',
'Client' => 'Klient',
'Client' => 'Kunde',
'ClientID' => 'Kunden ID',
'ComparisonTime' => 'Vergleichszeit',
'Confirmation' => 'Bestätigung',
@ -70,8 +70,7 @@ return ['Billing' => [
'Original' => 'Original',
'Other' => 'Sonstige',
'Payment' => 'Zahlung',
'PaymentPlan' => '',
'PazmentPlan' => 'Zahlplan',
'PaymentPlan' => 'Zahlungsplan',
'Postal' => 'Post',
'Prepaid' => 'Vorausbezahlt',
'Preview' => 'Vorschau',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => 'Πληρωμή',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => 'Ταχυδρομικός',
'Prepaid' => 'Προπληρωμένος',
'Preview' => 'Προεπισκόπηση',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => 'Other',
'Payment' => 'Payment',
'PaymentPlan' => 'Payment Plan',
'PazmentPlan' => '',
'Postal' => 'Postal',
'Prepaid' => 'Prepaid',
'Preview' => 'Preview',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => 'Pago',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => 'Postal',
'Prepaid' => 'Pagado por adelantado',
'Preview' => 'Avance',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => 'Maksu',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => 'Posti-',
'Prepaid' => 'Prepaid',
'Preview' => 'Esikatselu',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => 'Paiement',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => 'Postal',
'Prepaid' => 'Prépayé',
'Preview' => 'Aperçu',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => 'Fizetés',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => 'Postai',
'Prepaid' => 'Előre kifizetett',
'Preview' => 'Előnézet',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => 'Pagamento',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => 'postale',
'Prepaid' => 'Prepagato',
'Preview' => 'Anteprima',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => '支払い',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => '郵便',
'Prepaid' => '前払い',
'Preview' => 'プレビュー',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => '지불',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => '우편 엽서',
'Prepaid' => '선불',
'Preview' => '시사',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => 'innbetaling',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => 'Postal.',
'Prepaid' => 'Forhåndsbetalt',
'Preview' => 'Forhåndsvisning',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => 'Zapłata',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => 'Pocztowy',
'Prepaid' => 'Opłacony z góry',
'Preview' => 'Zapowiedź',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => 'Pagamento',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => 'Postal',
'Prepaid' => 'Pré-pago',
'Preview' => 'Pré-visualização',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => 'Оплата',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => 'Почтовый',
'Prepaid' => 'Предоплаты',
'Preview' => 'Превью',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => 'Betalning',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => 'Post',
'Prepaid' => 'Förbetalt',
'Preview' => 'Förhandsvisning',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => 'การชำระเงิน',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => 'เกี่ยวกับการไปรษณีย์',
'Prepaid' => 'ชำระล่วงหน้า',
'Preview' => 'ดูตัวอย่าง',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => 'Ödeme',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => 'Posta',
'Prepaid' => 'Ön ödemeli',
'Preview' => 'Ön izleme',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => 'Платіж',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => 'Поштовий',
'Prepaid' => 'Передплачений',
'Preview' => 'Попередній перегляд',

View File

@ -71,7 +71,6 @@ return ['Billing' => [
'Other' => '',
'Payment' => '支付',
'PaymentPlan' => '',
'PazmentPlan' => '',
'Postal' => '邮政',
'Prepaid' => '预付款',
'Preview' => '预览',