Comments for invoices

This commit is contained in:
2026-05-14 16:16:36 +02:00
parent c60429ad28
commit 775d9158a6
11 changed files with 41 additions and 14 deletions
@@ -43,6 +43,7 @@ class CreateInvoiceCommand {
'passengers' => $this->request->passengers,
'transportation' => $this->request->transportations,
'payment_purpose' => $this->request->paymentPurpose,
'comment' => $this->request->notices,
'document_filename' => $this->request->receiptFile !== null ? $this->request->receiptFile->fullPath : null,
]);
@@ -24,6 +24,7 @@ class CreateInvoiceRequest {
public ?int $userId;
public ?string $travelReason;
public ?string $paymentPurpose;
public ?string $notices;
public function __construct(
@@ -45,6 +46,7 @@ class CreateInvoiceRequest {
?int $transportations,
?string $travelReason = null,
?string $paymentPurpose = null,
?string $notices = null,
) {
$this->costUnit = $costUnit;
@@ -65,6 +67,7 @@ class CreateInvoiceRequest {
$this->userId = $userId;
$this->travelReason = $travelReason;
$this->paymentPurpose = $paymentPurpose;
$this->notices = $notices;
if ($accountIban === 'undefined') {
$this->accountIban = null;
@@ -60,7 +60,6 @@ class CreateInvoiceReceiptCommand {
storage_path('app/private/' .$filename) . '.zip',
ZipArchive::CREATE | ZipArchive::OVERWRITE
);
dd($receipt);
$zip->addFile(storage_path('app/private/' . $tmpFileName ), 'antrag.pdf');
$zip->addFile(storage_path('app/private/' . $receipt), 'beleg.pdf');
@@ -114,6 +113,9 @@ HTML;
<tr><td>Name:</td><td>%3\$s</td></tr>
<tr><td>E-Mail:</td><td>%4\$s</td></tr>
<tr><td>Telefon:</td><td>%5\$s</td></tr>
<tr><td>Anmerkungen:</td><td>%16\$s</td></tr>
<tr><td>Name der Kostenstelle:</td><td>%6\$s</td></tr>
<tr><td>Zahlungsgrund:</td><td>%7\$s</td></tr>
<tr><td>Wird der Betrag gespendet:</td><td>%8\$s</td></tr>
@@ -186,7 +188,8 @@ HTML;
$invoiceReadable['createdAt'],
$invoiceReadable['approvedAt'],
$invoiceReadable['approvedBy'],
$changes
$changes,
$invoiceReadable['comment'],
);
}
@@ -8,13 +8,13 @@ use App\Models\Invoice;
use App\ValueObjects\Amount;
class UpdateInvoiceRequest {
public string $comment;
public ?string $comment;
public InvoiceType $invoiceType;
public CostUnit $costUnit;
public Invoice $invoice;
public Amount $amount;
public function __construct(Invoice $invoice, string $comment, InvoiceType $invoiceType, CostUnit $costUnit, Amount $amount) {
public function __construct(Invoice $invoice, ?string $comment, InvoiceType $invoiceType, CostUnit $costUnit, Amount $amount) {
$this->comment = $comment;
$this->invoiceType = $invoiceType;
$this->costUnit = $costUnit;