fix: always use totalPrice to display roomCharge

This commit is contained in:
Simon Emanuelsson
2025-04-16 12:41:37 +02:00
parent 1f94c581ae
commit 722d4505ba
18 changed files with 312 additions and 864 deletions

View File

@@ -36,10 +36,6 @@ export default function PriceDetails() {
return total
}
const pkgsSum =
room.roomFeatures?.reduce((total, pkg) => total + pkg.totalPrice, 0) ??
0
if (room.cheques) {
// CorporateCheque Booking
total.local.currency = CurrencyEnum.CC
@@ -54,7 +50,7 @@ export default function PriceDetails() {
total.local.price = total.local.price + room.vouchers
} else {
// Price Booking
total.local.price = total.local.price + room.roomPrice + pkgsSum
total.local.price = total.local.price + room.totalPrice
}
if (
@@ -62,7 +58,7 @@ export default function PriceDetails() {
room.roomPrice
) {
total.local.additionalPrice =
(total.local.additionalPrice || 0) + room.roomPrice + pkgsSum
(total.local.additionalPrice || 0) + room.totalPrice
total.local.additionalPriceCurrency = currency
}