Make use of some settings #136

This commit is contained in:
2025-12-05 09:52:11 +01:00
parent b7a880d66a
commit 8315383958
5 changed files with 26 additions and 17 deletions
+5 -10
View File
@@ -1,8 +1,4 @@
<?php
// TODO: finish XML creation
// TODO: adapt models, views and company settings accordingly
// TODO: define routes export <-> download, format = xml | pdf
namespace App\Http\Controllers;
use Inertia\Inertia;
@@ -192,7 +188,9 @@ public function preview($id)
'isPDF' => false,
'fontPath' => '/storage/fonts',
'giroCode' => $giroCode,
'totalPages' => 1
'totalPages' => 1,
'companyName' => Setting::get('company.name'),
'companyAddress' => Setting::get('company.address')
]);
}
@@ -665,8 +663,6 @@ public function remind(Request $request, int $id)
$to = $request->query('to');
$cc = $request->query('cc');
// TODO: get from settings
$bcc = 'buchhaltung@tooloop.de';
if (empty($to) || !filter_var($to, FILTER_VALIDATE_EMAIL)) {
return response()->json([
@@ -679,10 +675,9 @@ public function remind(Request $request, int $id)
'error' => 'Keine gültige E_Mail-Adresse ' . $cc
], 400);
}
Mail::to($to)
->cc($cc)
->bcc($cc)
->bcc(Setting::get('company.email'))
->send(new Reminder($invoice));
// return new Reminder($invoice);
}
@@ -738,7 +733,7 @@ protected function generateInvoiceNumber()
// Setze neue Nummer ins Format (bei Bedarf Padding hier ergänzen)
return str_replace('{number}', (string)$newNumber, $format);
}
/**
* Generate a GiroCode for the invoice