Warenwirtschaft: F-10 — Versandabschluss nur mit Zahlungsfreigabe
Board-Statuswechsel auf „versendet“ prüft serverseitig isReadyToShip() (Rechnung/API weiterhin erlaubt); Button im Board ohne Freigabe deaktiviert. Konfektionieren bleibt vor Zahlungseingang möglich. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
db27f040e6
commit
f93b16c8f7
3 changed files with 47 additions and 1 deletions
|
|
@ -92,6 +92,15 @@ class OrderFulfillmentController extends Controller
|
|||
return redirect()->route('admin.inventory.orders.index');
|
||||
}
|
||||
|
||||
// Prüfung 08.09.2026 F-10: „versendet“ (Bestandsabzug) nur für versandfertige
|
||||
// Bestellungen — Zahlung eingegangen bzw. Rechnung/API (Kundenentscheid 16.07.2026,
|
||||
// isReadyToShip). Konfektionieren bleibt auch vor Zahlungseingang möglich.
|
||||
if ((int) $request->input('shipped') === 2 && ! $order->isReadyToShip()) {
|
||||
session()->flash('alert-error', __('Bestellung #:id wartet auf Zahlung und kann noch nicht als versendet gebucht werden.', ['id' => $id]));
|
||||
|
||||
return redirect()->route('admin.inventory.orders.index', array_filter(['filter' => $request->input('back_filter')]));
|
||||
}
|
||||
|
||||
app(OrderStatusService::class)->setShipped($id, (int) $request->input('shipped'), auth()->id(), lockStatus: true);
|
||||
|
||||
session()->flash('alert-success', (int) $request->input('shipped') === 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue