feat: additional custom discount applied to total price

This commit is contained in:
2026-09-08 15:29:00 +02:00
parent dea7a3dc97
commit 8443dae5ad
14 changed files with 287 additions and 23 deletions
@@ -73,6 +73,13 @@ 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. */
#[Groups(['api:single'])]
public ?int $totalDiscount;
#[Groups(['api:single'])]
public ?string $totalDiscountLabel;
#[Groups(['api:single'])]
public ?int $totalPrice;
@@ -115,6 +122,8 @@ final readonly class AccommodationBookingApiResponse
$this->accommodationDiscount = $booking->getAccommodationDiscount();
$this->boardServiceDiscount = $booking->getBoardServiceDiscount();
$this->additionalServicesDiscount = $booking->getAdditionalServicesDiscount();
$this->totalDiscount = $booking->getTotalDiscount();
$this->totalDiscountLabel = $booking->getTotalDiscountLabel();
$this->totalPrice = $booking->getTotalPrice();
$this->pricingCurrency = $booking->getPricingCurrency();
$this->pricingVersion = $booking->getPricingVersion();