fix: always use totalPrice to display roomCharge
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import type { PriceType } from "@/types/components/hotelReservation/myStay/myStay"
|
||||
import { PriceTypeEnum } from "@/types/components/hotelReservation/myStay/myStay"
|
||||
|
||||
export function getPriceType(
|
||||
cheques: number,
|
||||
points: number,
|
||||
vouchers: number
|
||||
): PriceType {
|
||||
if (points > 0) return "points"
|
||||
if (vouchers > 0) return "voucher"
|
||||
if (cheques > 0) return "cheque"
|
||||
return "money"
|
||||
): PriceTypeEnum {
|
||||
if (points > 0) return PriceTypeEnum.points
|
||||
if (vouchers > 0) return PriceTypeEnum.voucher
|
||||
if (cheques > 0) return PriceTypeEnum.cheque
|
||||
return PriceTypeEnum.money
|
||||
}
|
||||
|
||||
@@ -153,6 +153,9 @@ export function mapRoomDetails({
|
||||
requested: undefined,
|
||||
},
|
||||
},
|
||||
totalPriceExVat: booking.totalPriceExVat,
|
||||
totalPrice: booking.totalPrice,
|
||||
vatAmount: booking.vatAmount,
|
||||
breakfast,
|
||||
priceType,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user