diff --git a/app/Domains/Invoice/Views/Partials/myInvoiceDetails/ListInvoices.vue b/app/Domains/Invoice/Views/Partials/myInvoiceDetails/ListInvoices.vue
index 281f5d1..43c3481 100644
--- a/app/Domains/Invoice/Views/Partials/myInvoiceDetails/ListInvoices.vue
+++ b/app/Domains/Invoice/Views/Partials/myInvoiceDetails/ListInvoices.vue
@@ -56,7 +56,7 @@
|
-
+
|
{{invoice.contactName}}
diff --git a/app/Domains/Invoice/Views/Partials/newInvoice/direct-payment.vue b/app/Domains/Invoice/Views/Partials/newInvoice/direct-payment.vue
new file mode 100644
index 0000000..9505d73
--- /dev/null
+++ b/app/Domains/Invoice/Views/Partials/newInvoice/direct-payment.vue
@@ -0,0 +1,126 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/Domains/Invoice/Views/Partials/newInvoice/payment-data.vue b/app/Domains/Invoice/Views/Partials/newInvoice/payment-data.vue
new file mode 100644
index 0000000..27abaab
--- /dev/null
+++ b/app/Domains/Invoice/Views/Partials/newInvoice/payment-data.vue
@@ -0,0 +1,161 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/Domains/Invoice/Views/Partials/newInvoice/refund-data.vue b/app/Domains/Invoice/Views/Partials/newInvoice/refund-data.vue
index d80a994..a9531b9 100644
--- a/app/Domains/Invoice/Views/Partials/newInvoice/refund-data.vue
+++ b/app/Domains/Invoice/Views/Partials/newInvoice/refund-data.vue
@@ -6,6 +6,7 @@ import {useAjax} from "../../../../../../resources/js/components/ajaxHandler.js"
import TextResource from "../../../../../Views/Components/TextResource.vue";
import {invoiceCheckContactName} from "../../../../../../resources/js/components/InvoiceUploadChecks.js";
import {toast} from "vue3-toastify";
+import ErrorText from "../../../../../Views/Components/ErrorText.vue";
const { request } = useAjax();
@@ -39,7 +40,7 @@ const success = ref(false)
const decision = ref('')
const errorMsg = ref('')
const confirmation = ref(null)
-
+const receiptError = ref('')
async function sendData() {
if (!userName.value) return
@@ -75,6 +76,8 @@ async function sendData() {
if (response.status === 'success') {
window.location.href = '/';
+ } else {
+ receiptError.value = response.message;
}
} catch (err) {
toast.error(result.message);
@@ -87,7 +90,7 @@ async function sendData() {
-
+
@@ -143,7 +146,7 @@ async function sendData() {
IBAN:
-
+
diff --git a/app/Enumerations/InvoiceType.php b/app/Enumerations/InvoiceType.php
index ccca2a8..9fd0b44 100644
--- a/app/Enumerations/InvoiceType.php
+++ b/app/Enumerations/InvoiceType.php
@@ -15,6 +15,11 @@ class InvoiceType extends CommonModel {
public const INVOICE_TYPE_CATERING = 'catering';
+ public const INVOICE_TYPE_LOGSTIC = 'logistic';
+
+ public const INVOICE_TYPE_TECHNICAL = 'technical';
+
+ public const INVOICE_TYPE_MANAGEMENT = 'management';
protected $fillable = [
'slug',
diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php
index 77d356a..2639720 100644
--- a/app/Models/Invoice.php
+++ b/app/Models/Invoice.php
@@ -52,6 +52,7 @@ class Invoice extends InstancedModel
'contact_phone',
'contact_bank_owner',
'contact_bank_iban',
+ 'payment_purpose',
'amount',
'donation',
'distance',
diff --git a/app/Providers/GlobalDataProvider.php b/app/Providers/GlobalDataProvider.php
index 103c676..df39737 100644
--- a/app/Providers/GlobalDataProvider.php
+++ b/app/Providers/GlobalDataProvider.php
@@ -25,12 +25,13 @@ class GlobalDataProvider {
'navbar' => $this->generateNavbar(),
'tenant' => app('tenant'),
'activeUsers' => $this->getActiveUsers(),
+ 'version' => config('app.version'),
]);
}
public function getAllInvoiceTypes() : JsonResponse {
$invoiceTypes = [];
- foreach (InvoiceType::all() as $invoiceType) {
+ foreach (InvoiceType::orderBy('sort_order')->get() as $invoiceType) {
if (
$invoiceType->slug === InvoiceType::INVOICE_TYPE_OTHER
) {
@@ -52,10 +53,9 @@ class GlobalDataProvider {
public function getInvoiceTypes() : JsonResponse {
$invoiceTypes = [];
- foreach (InvoiceType::all() as $invoiceType) {
+ foreach (InvoiceType::orderBy('sort_order')->get() as $invoiceType) {
if (
- $invoiceType->slug === InvoiceType::INVOICE_TYPE_TRAVELLING ||
- $invoiceType->slug === InvoiceType::INVOICE_TYPE_OTHER
+ $invoiceType->slug === InvoiceType::INVOICE_TYPE_TRAVELLING
) {
continue;
}
@@ -66,8 +66,6 @@ class GlobalDataProvider {
];
}
- $invoiceTypes[] = ['slug' => InvoiceType::INVOICE_TYPE_OTHER, 'name' => 'Sonstige Kosten'];
-
return response()->json([
'invoiceTypes' => $invoiceTypes
]);
@@ -110,6 +108,7 @@ class GlobalDataProvider {
'common' => [],
'costunits' => [],
'events' => [],
+ 'eventControl' => [],
];
$navigation['personal'][] = ['url' => '/', 'display' => 'Home'];
@@ -129,7 +128,8 @@ class GlobalDataProvider {
$navigation['events'][] = ['url' => '/event/details/' . $event->identifier, 'display' => $event->name];
}
- $navigation['events'][] = ['url' => '/create-event', 'display' => 'Neue Veranstaltung'];
+ $navigation['eventControl'][] = ['url' => '/archived-events', 'display' => 'Archivierte Veranstaltungen'];
+ $navigation['eventControl'][] = ['url' => '/create-event', 'display' => 'Neue Veranstaltung'];
}
}
diff --git a/app/Providers/InvoiceCsvFileProvider.php b/app/Providers/InvoiceCsvFileProvider.php
index 1ba246c..7d7449f 100644
--- a/app/Providers/InvoiceCsvFileProvider.php
+++ b/app/Providers/InvoiceCsvFileProvider.php
@@ -25,7 +25,7 @@ class InvoiceCsvFileProvider {
'"Kontoinhaber*in"',
'"Betrag"',
'"Spende"',
- '"Beleg ohne Auszahlung"',
+ '"Buchungstext"'
]);
foreach ($this->invoices as $invoice) {
@@ -38,7 +38,7 @@ class InvoiceCsvFileProvider {
'"' . $invoiceReadable['accountOwner'] . '"',
'"' . $invoiceReadable['amountPlain'] . '"',
'"' . $invoiceReadable['donation'] . '"',
- '"' . $invoiceReadable['alreadyPaid'] . '"'
+ '"' . $invoiceReadable['paymentPurpose'] . '"'
]);
$csvArray[] = $csvLine;
diff --git a/app/Providers/PainFileProvider.php b/app/Providers/PainFileProvider.php
index b170ee2..567b978 100644
--- a/app/Providers/PainFileProvider.php
+++ b/app/Providers/PainFileProvider.php
@@ -3,8 +3,10 @@
namespace App\Providers;
use App\Models\Invoice;
+use App\Resources\InvoiceResource;
use DOMDocument;
use Exception;
+use Illuminate\Http\Request;
class PainFileProvider {
public string $senderIban;
@@ -89,6 +91,8 @@ class PainFileProvider {
$pmt_inf->appendChild($dbtr_agt);
foreach ($this->invoices as $index => $invoice) {
+ $invoiceResource = new InvoiceResource($invoice)->toArray(new Request());
+
$cdt_trf_tx_inf = $doc->createElement('CdtTrfTxInf');
$pmt_id = $doc->createElement('PmtId');
@@ -112,7 +116,7 @@ class PainFileProvider {
$cdt_trf_tx_inf->appendChild($cdtr_acct);
$rmt_inf = $doc->createElement('RmtInf');
- $rmt_inf->appendChild($doc->createElement('Ustrd', 'Auslagenerstattung Rechnungsnummer ' . $invoice['invoice_number']));
+ $rmt_inf->appendChild($doc->createElement('Ustrd', $invoiceResource['paymentPurpose']));
$cdt_trf_tx_inf->appendChild($rmt_inf);
$pmt_inf->appendChild($cdt_trf_tx_inf);
diff --git a/app/Repositories/EventParticipantRepository.php b/app/Repositories/EventParticipantRepository.php
index 4032c8f..467d93f 100644
--- a/app/Repositories/EventParticipantRepository.php
+++ b/app/Repositories/EventParticipantRepository.php
@@ -88,7 +88,7 @@ class EventParticipantRepository {
public function getParticipantsWithIntolerances(Event $event, Request $request) : array {
$participants = [];
- foreach ($event->participants()->whereNotNull('intolerances')->whereNot('intolerances' , '=', '')->get() as $participant) {
+ foreach ($event->participants()->orderBy('lastname')->orderBy('firstname')->whereNotNull('intolerances')->whereNot('intolerances' , '=', '')->get() as $participant) {
$participants[] = $participant->toResource()->toArray($request);
};
@@ -97,7 +97,7 @@ class EventParticipantRepository {
public function getKitchenOverview(Event $event) : array {
$data = [];
- $participants = $event->participants()->get();
+ $participants = $event->participants()->orderBy('lastname')->orderBy('firstname')->get();
for ($cur_date = $event->start_date; $cur_date <= $event->end_date; $cur_date->modify('+1 day')) {
diff --git a/app/Repositories/EventRepository.php b/app/Repositories/EventRepository.php
index 4d479ea..5f38447 100644
--- a/app/Repositories/EventRepository.php
+++ b/app/Repositories/EventRepository.php
@@ -90,7 +90,7 @@ class EventRepository {
$visibleEvents = [];
/** @var Event $event */
- foreach (Event::where($criteria)->get() as $event) {
+ foreach (Event::where($criteria)->orderBy('start_date')->get() as $event) {
if ($canSeeAll || !$accessCheck || $event->eventManagers()->where('user_id', $user->id)->exists()) {
$visibleEvents[] = $event;
diff --git a/app/Resources/CostUnitResource.php b/app/Resources/CostUnitResource.php
index 8acfb5c..1799798 100644
--- a/app/Resources/CostUnitResource.php
+++ b/app/Resources/CostUnitResource.php
@@ -31,7 +31,7 @@ class CostUnitResource {
$amounts = [];
$overAllAmount = new Amount(0, 'Euro');
- foreach (InvoiceType::all() as $invoiceType) {
+ foreach (InvoiceType::orderBy('sort_order')->get() as $invoiceType) {
$overAllAmount->addAmount($costUnitRepository->sumupByInvoiceType($this->costUnit, $invoiceType));
$amounts[$invoiceType->slug]['string'] = $costUnitRepository->sumupByInvoiceType($this->costUnit, $invoiceType)->toString();
$amounts[$invoiceType->slug]['name'] = $invoiceType->name;
diff --git a/app/Resources/EventResource.php b/app/Resources/EventResource.php
index 7e14295..14bb4cf 100644
--- a/app/Resources/EventResource.php
+++ b/app/Resources/EventResource.php
@@ -32,11 +32,10 @@ class EventResource extends JsonResource{
'email' => $this->event->email,
'accountOwner' => $this->event->account_owner,
'accountIban' => $this->event->account_iban,
- 'accountOwner' => $this->event->account_owner,
- 'accountIban' => $this->event->account_iban,
'alcoholicsAge' => $this->event->alcoholics_age,
'sendWeeklyReports' => $this->event->send_weekly_report,
'registrationAllowed' => $this->event->registration_allowed,
+ 'archived' => $this->event->archived,
'earlyBirdEnd' => ['internal' => $this->event->early_bird_end->format('Y-m-d'), 'formatted' => $this->event->early_bird_end->format('d.m.Y')],
'registrationFinalEnd' => ['internal' => $this->event->registration_final_end->format('Y-m-d'), 'formatted' => $this->event->registration_final_end->format('d.m.Y')],
'refundAfterEarlyBirdEnd' => 100 - $this->event->early_bird_end_amount_increase,
diff --git a/app/Resources/InvoiceResource.php b/app/Resources/InvoiceResource.php
index 478a40f..14b46a1 100644
--- a/app/Resources/InvoiceResource.php
+++ b/app/Resources/InvoiceResource.php
@@ -38,7 +38,8 @@ class InvoiceResource {
$returnData['amount'] = Amount::fromString($this->invoice->amount, ' Euro')->toString();
$returnData['id'] = $this->invoice->id;
$returnData['donation'] = $this->invoice->donation;
- $returnData['alreadyPaid'] = !$this->invoice->donation && null === $this->invoice->contact_bank_iban;
+ $returnData['externalPayment'] = null !== $this->invoice->payment_purpose;
+ $returnData['paymentPurpose'] = $this->invoice->payment_purpose ?? 'Auslagenerstattung Rechnungsnummer ' . $returnData['invoiceNumber'];
$returnData['accountOwner'] = $this->invoice->contact_bank_owner ?? '--';
$returnData['accountIban'] = $this->invoice->contact_bank_iban ?? '--';
$returnData['status'] = $this->invoice->status;
@@ -67,7 +68,7 @@ class InvoiceResource {
$returnData['approvedBy'] = $this->invoice->approvedBy()->first()->username ?? '--';
}
- $returnData['alreadyPaid'] = $returnData['alreadyPaid'] == '' ? 0 : 1;
+ $returnData['externalPayment'] = $returnData['externalPayment'] == '' ? 0 : 1;
return $returnData;
}
diff --git a/config/app.php b/config/app.php
index 6fad0ed..99d08ae 100644
--- a/config/app.php
+++ b/config/app.php
@@ -123,4 +123,5 @@ return [
'store' => env('APP_MAINTENANCE_STORE', 'database'),
],
+ 'version' => trim(file_get_contents(base_path('version'))),
];
diff --git a/database/migrations/2026_05_12_140001_update_invoice_types.php b/database/migrations/2026_05_12_140001_update_invoice_types.php
new file mode 100644
index 0000000..1adc4b1
--- /dev/null
+++ b/database/migrations/2026_05_12_140001_update_invoice_types.php
@@ -0,0 +1,21 @@
+integer('sort_order')->default(1)->after('name');
+ });
+ }
+
+ public function down(): void
+ {
+
+ }
+};
diff --git a/database/migrations/2026_05_12_140002_update_invoices.php b/database/migrations/2026_05_12_140002_update_invoices.php
new file mode 100644
index 0000000..9e1293a
--- /dev/null
+++ b/database/migrations/2026_05_12_140002_update_invoices.php
@@ -0,0 +1,21 @@
+string('payment_purpose')->nullable()->default(null)->after('contact_bank_iban');
+ });
+ }
+
+ public function down(): void
+ {
+
+ }
+};
diff --git a/public/css/invoices.css b/public/css/invoices.css
index 5b245ad..ea1f7cc 100644
--- a/public/css/invoices.css
+++ b/public/css/invoices.css
@@ -4,7 +4,7 @@
padding: 20px;
}
-.invoice-main-flexbox div {
+.invoice-type-layer {
flex: 1;
padding: 10px;
border: 1px solid #ccc;
@@ -15,7 +15,7 @@
cursor: pointer;
}
-.invoice-main-flexbox div:hover {
+.invoice-type-layer:hover {
background-color: #FAE39C;
}
diff --git a/resources/js/layouts/AppLayout.vue b/resources/js/layouts/AppLayout.vue
index da74f28..cc523e2 100644
--- a/resources/js/layouts/AppLayout.vue
+++ b/resources/js/layouts/AppLayout.vue
@@ -51,6 +51,8 @@ const props = defineProps({
title: { type: String, default: 'App' },
flash: { type: Object, default: () => ({}) }
});
+
+console.log(globalProps)
@@ -101,6 +103,16 @@ const props = defineProps({
+
+
+
@@ -145,7 +157,7 @@ const props = defineProps({
|