fix: always use totalPrice to display roomCharge
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user