feat: implement discount and transport features in the quote system

- Added maximum discount settings configurable by the administrator.
- Implemented discount calculations in the quote confirmation process.
- Introduced transport options with associated costs, including handling for exceeding maximum piece limits.
- Updated frontend to display discounts and transport information in the quote summary.
- Created new database migrations for storing discount and transport settings.
- Developed a new Filament page for managing global discount settings.
- Enhanced email templates to include discount and transport details.
- Added tests to ensure proper functionality of discounts and transport calculations.
This commit is contained in:
2026-10-20 17:45:50 +02:00
parent 06617a985a
commit 8bef57b64b
27 changed files with 875 additions and 26 deletions
+7
View File
@@ -10,6 +10,13 @@ use Illuminate\Support\Facades\Route;
// frontend non deve indovinare la porta su cui gira Vite (può cambiare se 5174 è occupata).
Route::get('config', fn () => response()->json([
'frontend_cliente_url' => config('preventivi.frontend_cliente_url'),
// Opzioni del contributo trasporto al checkout (importo per pezzo, null = da quantificare).
'trasporto' => collect(config('preventivi.trasporto.zone'))
->map(fn (array $zona, string $valore) => ['valore' => $valore] + $zona)
->values(),
'trasporto_nota' => config('preventivi.trasporto.nota_da_quantificare'),
'trasporto_max_pezzi' => config('preventivi.trasporto.max_pezzi'),
'trasporto_etichetta_oltre_max' => config('preventivi.trasporto.etichetta_oltre_max'),
]));
// Catalogo prodotti (sistemi e modelli con icone) per il configuratore.