fix: make sure calculations in booking flow are correct

This commit is contained in:
Simon Emanuelsson
2025-04-02 15:49:59 +02:00
committed by Michael Zetterberg
parent 3e0f503314
commit a222ecfc5c
28 changed files with 309 additions and 276 deletions

View File

@@ -163,21 +163,23 @@ export default function ReceiptRoom({
</Body>
</div>
) : null}
<div className={styles.entry}>
<Body>{intl.formatMessage({ id: "Breakfast buffet" })}</Body>
{(room.rateDefinition.breakfastIncluded ?? room.breakfastIncluded) ? (
<Body color="red">{intl.formatMessage({ id: "Included" })}</Body>
) : null}
{room.breakfast ? (
<Body color="uiTextHighContrast">
{formatPrice(
intl,
room.breakfast.totalPrice * room.adults,
room.breakfast.currency
)}
</Body>
) : null}
</div>
{room.breakfast || room.breakfastIncluded ? (
<div className={styles.entry}>
<Body>{intl.formatMessage({ id: "Breakfast buffet" })}</Body>
{(room.rateDefinition.breakfastIncluded ?? room.breakfastIncluded) ? (
<Body color="red">{intl.formatMessage({ id: "Included" })}</Body>
) : null}
{room.breakfast ? (
<Body color="uiTextHighContrast">
{formatPrice(
intl,
room.breakfast.totalPrice,
room.breakfast.currency
)}
</Body>
) : null}
</div>
) : null}
</article>
)
}