Warenwirtschaft: Logistik-Mail regeneriert auch fehlende Rechnungs-PDF

Nachtrag zum Lieferschein-Fix (7d77314): Fehlte die Rechnungs-PDF auf der
Platte (Altdaten), brach MailLogistic::build() still ab — die Mail ging ohne
Anhänge bzw. gar nicht raus, obwohl das UI Erfolg meldete. Jetzt wird die
Rechnung wie der Lieferschein mit bestehender Rechnungsnummer regeneriert.
Hinweise-Doku und Plan-Protokoll fortgeschrieben.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-07-16 13:19:12 +00:00
parent 6051aa6ea1
commit a1f94ea427
4 changed files with 33 additions and 2 deletions

View file

@ -52,6 +52,10 @@ class MailLogistic extends Mailable
$filename = Invoice::getFilename($this->shopping_order);
$path = Invoice::getDownloadPath($this->shopping_order);
if (! Storage::disk('public')->exists($path)) {
// Datei fehlt auf der Platte (Altdaten) — mit bestehender Nummer neu erzeugen
(new InvoiceRepository($this->shopping_order))->update([]);
}
if (! Storage::disk('public')->exists($path)) {
return;
}