From 51c4055c471af89e65f73135ffce1ceb880d93ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=BCnther?= Date: Sat, 20 Jun 2026 23:20:42 +0200 Subject: [PATCH] Prevent linking invoice to user account if foreign payment --- .../Invoice/Actions/CreateInvoice/CreateInvoiceCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Domains/Invoice/Actions/CreateInvoice/CreateInvoiceCommand.php b/app/Domains/Invoice/Actions/CreateInvoice/CreateInvoiceCommand.php index 8aeac1c..a922629 100644 --- a/app/Domains/Invoice/Actions/CreateInvoice/CreateInvoiceCommand.php +++ b/app/Domains/Invoice/Actions/CreateInvoice/CreateInvoiceCommand.php @@ -30,7 +30,7 @@ class CreateInvoiceCommand { 'type' => $this->request->invoiceType, 'type_other' => $this->request->invoiceTypeExtended, 'donation' => $this->request->isDonation, - 'user_id' => $this->request->userId, + 'user_id' => $this->request->paymentPurpose === null ? $this->request->userId : null, 'contact_name' => $this->request->contactName, 'contact_email' => $this->request->contactEmail, 'contact_phone' => $this->request->contactPhone,