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,