diff --git a/app/Mail/OrderConfirmation.php b/app/Mail/OrderConfirmation.php new file mode 100644 index 0000000..fbc86bf --- /dev/null +++ b/app/Mail/OrderConfirmation.php @@ -0,0 +1,54 @@ + + */ + public function attachments(): array + { + return []; + } +} diff --git a/resources/views/mail/reminder.blade.php b/resources/views/mail/invoices/reminder.blade.php similarity index 96% rename from resources/views/mail/reminder.blade.php rename to resources/views/mail/invoices/reminder.blade.php index 770ba75..a8728f5 100644 --- a/resources/views/mail/reminder.blade.php +++ b/resources/views/mail/invoices/reminder.blade.php @@ -19,7 +19,7 @@ p { font-size: 16px; - line-height: 20px; + line-height: 24px; font-weight: 400; } @@ -148,7 +148,7 @@ @@ -197,7 +197,7 @@ - + @@ -255,44 +255,44 @@
- Tooloop {{ $invoice['nr'] }}
BeteffBetreff {{ $invoice['title'] }}
-

+

+49 821 65079983, - www.tooloop.de, info@tooloop.de

-

Tooloop +

Tooloop Multimedia Daniel Stock, Rehmstraße 4, 86161 Augsburg

Threema Matrix Github LinkedIn Xing Xing Xing

diff --git a/resources/views/mail/offers/confirmation.blade.php b/resources/views/mail/offers/confirmation.blade.php new file mode 100644 index 0000000..df3e372 --- /dev/null +++ b/resources/views/mail/offers/confirmation.blade.php @@ -0,0 +1,351 @@ +@php +$fmt = new \IntlDateFormatter('de_DE', NULL, NULL); +$fmt->setPattern('d. MMMM yyyy'); +@endphp + + + + + + + + + Auftragsbestätigung + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + +
 
+ + + + + +
+ Tooloop +
+ +
 
+ + + + + + + + + + + + + + + + + +
 
+ + + + + + + + + + + + + + + + + + + + + + + +
+

Hallo {{ $offer['contact']['salutation'] ?? '' }} {{ + $offer['contact']['lastName'] }},

+

wir bedanken uns herzlich für Ihren Auftrag und bestätigen Ihnen hiermit + den Eingang und die Annahme Ihres Auftrags vom {{ + $fmt->format(strtotime($offer['orderDate'])) }}.

+
 
+ + + + + + + + + + + + + + + + + @if($offer['paymentTerms']['isFixed']) + + @else + + @endif + +
Betreff{{ + $offer['title'] }}
Unser Angebot + vom{{ + $fmt->format(strtotime($offer['offerDate'])) }}
Gesamtbetrag + + @toCurrency(round($offer['totalAmount'] * 1.19, 2))
Zahlungsziel + {{ + $offer['paymentTerms']['description'] }}{{ + $offer['paymentTerms']['days'] }} Tage
+
 
+

Falls Sie Fragen haben oder Änderungen am Auftrag vornehmen möchten, + stehen wir Ihnen gerne zur Verfügung. Wir freuen uns auf eine + erfolgreiche Zusammenarbeit.

+
 
+

Es gelten + unsere allgemeinen Geschäftsbedingungen, die Sie jederzeit unter www.tooloop.de/agb einsehen + können.

+

Dieses + Dokument dient als Auftragsbestätigung und ist nicht als + umsatzsteuerlich gültiges Dokument zu verstehen. Es berechtigt nicht zum + Vorsteuerabzug. Die + Rechnung + zu Ihrem Auftrag wird Ihnen in einer separaten Mail zugesendet. +

+
+ +
 
+ + + + + + + + + + + +
 
+ + + + + + + + + + + + +
 
+ + + + + +
+

+ +49 821 + 65079983, + www.tooloop.de, + info@tooloop.de +

+

Tooloop + Multimedia Daniel + Stock, Rehmstraße 4, 86161 Augsburg

+

+ Threema + Matrix + Github + LinkedIn + Xing + Xing + Xing +

+
+ +
 
+ +
+
+ + + \ No newline at end of file diff --git a/routes/api.php b/routes/api.php index e4ae8c2..9209845 100644 --- a/routes/api.php +++ b/routes/api.php @@ -8,15 +8,18 @@ use App\Models\Invoice; use App\Http\Controllers\PaymentTermsController; use App\Http\Controllers\SettingController; +use App\Mail\OrderConfirmation; use App\Support\ApiDataTransformer; +use Illuminate\Support\Facades\Mail; +Route::get('customers/{id}', [CustomerController::class, 'single']); Route::get('customers', [CustomerController::class, 'index']); // ->middleware('auth:sanctum'); + // Route::apiResource('invoices', InvoiceController::class); // ->middleware('auth:sanctum'); - Route::get('/invoices', [InvoiceController::class, 'index']); Route::post('/invoices', [InvoiceController::class, 'store']); Route::get('/invoices/{id}', [InvoiceController::class, 'single']); @@ -25,7 +28,52 @@ Route::get('/invoices/{id}/remind', function ($id) { $invoice = InvoiceController::single($id); - return new Reminder($invoice); + Mail::to('daniel@vollstock.de')->send(new Reminder($invoice)); + // return new Reminder($invoice); +}); + +Route::get('/offers/{id}/confirmation', function ($id) { + // $offer = offerController::single($id); + $offer = [ + 'nr' => 0, + 'offerDate' => '2025-10-01', + 'orderDate' => '2025-10-28', + 'customerId' => 0, + 'customer' => [ + 'companyName' => '', + 'vatId' => '', + 'billingAddress' => [ + 'lineOne' => '', + 'lineTwo' => '', + 'city' => '', + 'postalCode' => '', + 'countryCode' => 'DE', + ] + ], + 'contact' => [ + 'salutation' => 'Frau', + 'firstName' => '', + 'lastName' => '', + 'email' => '', + 'phone' => '', + 'position' => null, + 'isPrimary' => false, + 'avatar' => null, + ], + 'totalAmount' => '13575.88', + 'title' => "", + 'text' => '', + 'items' => [], + 'paymentTerms' => [ + 'name' => 'onReceipt', + 'description' => 'Bei Rechnungserhalt', + 'isFixed' => true, + 'days' => null, + ] + ]; + + // Mail::to('')->cc([''])->send(new OrderConfirmation($offer)); + return new OrderConfirmation($offer); }); Route::get('/paymentterms', [PaymentTermsController::class, 'index']);