wip: implement transportation, pickups and parking
This commit is contained in:
@@ -60,6 +60,7 @@ foreach ($bookingDto->getParticipants() as $participant) {
|
||||
**Enhancement**: Service labels include pricing via `formatServiceLabelWithPrice()` method
|
||||
- Zero-priced services display without price suffix (e.g., "Vollpension" instead of "Vollpension (€0,00)")
|
||||
- Priced services show with formatted price (e.g., "Halbpension (€45,00)")
|
||||
- Negative prices display as discounts (e.g., "Frühbucher-Bonus (-15,00€ Rabatt)")
|
||||
- All services consistently show quantity prefix (e.g., "1x", "2x")
|
||||
|
||||
**Service Label Formatting Logic**:
|
||||
@@ -68,21 +69,28 @@ private function formatServiceLabelWithPrice(Service $service): string
|
||||
{
|
||||
$label = $service->label;
|
||||
|
||||
// Add price only if service has a cost
|
||||
if ($service->price > 0) {
|
||||
$label .= sprintf(' (€%.2f)', $service->price);
|
||||
// Handle zero prices (no display)
|
||||
if (null === $service->price || 0.0 === $service->price) {
|
||||
return $label;
|
||||
}
|
||||
|
||||
return $label;
|
||||
// Handle negative prices (discounts)
|
||||
if ($service->price < 0) {
|
||||
return sprintf('%s (-%s€ Rabatt)', $label, number_format(abs($service->price), 2, ',', '.'));
|
||||
}
|
||||
|
||||
// Handle positive prices (costs)
|
||||
return sprintf('%s (€%s)', $label, number_format($service->price, 2, ',', '.'));
|
||||
}
|
||||
```
|
||||
|
||||
**Affected Service Types**:
|
||||
- Courses: `"Skikurs Anfänger (€25,00)"`
|
||||
- Additional Services: `"Versicherung (€15,00)"`
|
||||
- Ski Pass: `"5-Tage Skipass (€120,00)"`
|
||||
- Rentals: `"Ski-Set (€30,00)"`
|
||||
- Board: `"Halbpension (€45,00)"` or `"Vollpension"` (if €0,00)
|
||||
- Courses: `"Skikurs Anfänger (€25,00)"` or `"Frühbucher-Bonus (-15,00€ Rabatt)"`
|
||||
- Additional Services: `"Versicherung (€15,00)"` or `"Stammgast-Vorteil (-5,00€ Rabatt)"`
|
||||
- Ski Pass: `"5-Tage Skipass (€120,00)"` or `"Gruppen-Rabatt (-20,00€ Rabatt)"`
|
||||
- Rentals: `"Ski-Set (€30,00)"` or `"Eigenes Equipment (-30,00€ Rabatt)"`
|
||||
- Board: `"Halbpension (€45,00)"`, `"Vollpension"` (if €0,00), or `"Selbstverpflegung (-25,00€ Rabatt)"`
|
||||
- Pickup Services: `"München Hbf (€15,00)"` or `"Nahverkehr (-5,00€ Rabatt)"`
|
||||
|
||||
### 3. Enhanced Unified Booking Summary ✅ COMPLETED
|
||||
|
||||
|
||||
Reference in New Issue
Block a user