feat: replace custom discount with absolute value in favor of percentage

This commit is contained in:
2026-09-08 17:11:00 +02:00
parent d6c2cfaf1c
commit f8ff4b82a3
15 changed files with 105 additions and 50 deletions
@@ -73,9 +73,9 @@ final readonly class AccommodationBookingApiResponse
#[Groups(['api:single'])]
public ?int $additionalServicesDiscount;
/** Applies to the total after the three section discounts above, not to the gross total. */
/** An absolute amount in minor units, subtracted after the three section discounts above. */
#[Groups(['api:single'])]
public ?int $totalDiscount;
public ?int $totalDiscountAmount;
#[Groups(['api:single'])]
public ?string $totalDiscountLabel;
@@ -122,7 +122,7 @@ final readonly class AccommodationBookingApiResponse
$this->accommodationDiscount = $booking->getAccommodationDiscount();
$this->boardServiceDiscount = $booking->getBoardServiceDiscount();
$this->additionalServicesDiscount = $booking->getAdditionalServicesDiscount();
$this->totalDiscount = $booking->getTotalDiscount();
$this->totalDiscountAmount = $booking->getTotalDiscountAmount();
$this->totalDiscountLabel = $booking->getTotalDiscountLabel();
$this->totalPrice = $booking->getTotalPrice();
$this->pricingCurrency = $booking->getPricingCurrency();