From eb45e6b294ffa27875cf062bb782c6a016c0a643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20J=C3=A4derberg?= Date: Tue, 3 Feb 2026 13:51:45 +0000 Subject: [PATCH] Merged in fix/LOY-606 (pull request #3535) fix(LOY-606): breakfast price now considers number of nights in MyStay/ChangeDates * fix(LOY-606): breakfast price now considers number of nights in MyStay/ChangeDates Approved-by: Linus Flood --- .../ManageStay/Actions/ChangeDates/Steps/index.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/Upcoming/ManageStay/Actions/ChangeDates/Steps/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/Upcoming/ManageStay/Actions/ChangeDates/Steps/index.tsx index cc2f3ac53..019370258 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/Upcoming/ManageStay/Actions/ChangeDates/Steps/index.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/Upcoming/ManageStay/Actions/ChangeDates/Steps/index.tsx @@ -4,6 +4,7 @@ import { useIntl } from "react-intl" import { sumPackages } from "@scandic-hotels/booking-flow/utils/SelectRate" import { CurrencyEnum } from "@scandic-hotels/common/constants/currency" +import { dt } from "@scandic-hotels/common/dt" import { formatPrice } from "@scandic-hotels/common/utils/numberFormatting" import { trpc } from "@scandic-hotels/trpc/client" @@ -66,9 +67,14 @@ export default function Steps({ closeModal }: ChangeDatesStepsProps) { setDates({ fromDate, toDate }) + const numberOfNights = dt(toDate).diff(dt(fromDate), "days") + const pkgsSum = sumPackages(packages) - const extraPrice = - pkgsSum.price + ((breakfast && breakfast.localPrice.totalPrice) || 0) + const breakfastPrice = !!breakfast + ? breakfast.localPrice.price * numberOfNights + : 0 + + const extraPrice = pkgsSum.price + breakfastPrice if (isLoggedIn && "member" in data.product && data.product.member) { const { currency, pricePerStay } = data.product.member.localPrice setNewPrice(formatPrice(intl, pricePerStay + extraPrice, currency))