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:
@@ -315,6 +315,13 @@ class ConfiguratorePrezzoTest extends TestCase
|
||||
->assertJsonPath('prezzo', 775)
|
||||
->assertJsonPath('configurazione.profili_extra', 'COPRIFILI SCATOLATI, 50811_GUIDA 34, HO9320_T/M, NP8300_ALL.30')
|
||||
->assertJsonPath('dettaglio.supplementi.1.metri_lineari', 3);
|
||||
|
||||
// I profili extra si calcolano sul serramento con le finiture: uniforme 500 x 1,27 = 635,
|
||||
// coprifili +3% di 635 = 19,05; la cerniera (+100) viene dopo e non entra nel 3%.
|
||||
$this->prezzo('finestra_2_ante', $misura + ['finitura_interna' => '2', 'finitura_esterna' => '2', 'opzioni' => ['profili_extra' => ['coprifili_scatolati'], 'cerniere_a_scomparsa' => 'si']])
|
||||
->assertJsonPath('prezzo', 754.05)
|
||||
->assertJsonPath('dettaglio.subtotali.finitura', 635)
|
||||
->assertJsonPath('dettaglio.subtotali.profili', 654.05);
|
||||
}
|
||||
|
||||
public function test_profili_extra_alternativi_e_per_modello(): void
|
||||
|
||||
Reference in New Issue
Block a user