fix: summary showed 0 CC for approx value

This commit is contained in:
Simon Emanuelsson
2025-06-30 14:07:58 +02:00
committed by Simon.Emanuelsson
parent 8ec3b6d60e
commit 9eff04f987

View File

@@ -340,6 +340,7 @@ function getRequestedAdditionalPrice(
breakfast: BreakfastPackage | false | undefined,
nights: number,
packages: Packages | null,
cheques: number,
additionalPrice = 0,
additionalPriceCurrency: CurrencyEnum | null | undefined
) {
@@ -350,6 +351,8 @@ function getRequestedAdditionalPrice(
}
}
total.requested.price = add(total.requested.price, cheques)
const breakfastRequestedPrice =
(breakfast ? breakfast.requestedPrice?.price || 0 : 0) * nights * adults
const pkgsSumRequested = sumPackagesRequestedPrice(packages)
@@ -414,6 +417,7 @@ export function getCorporateChequePrice(rooms: TRoom[], nights: number) {
room.breakfast,
nights,
room.roomFeatures,
corporateCheque.requestedPrice.numberOfCheques,
corporateCheque.requestedPrice?.additionalPricePerStay,
corporateCheque.requestedPrice?.currency
)