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))