fix: always use totalPrice to display roomCharge
This commit is contained in:
@@ -17,9 +17,8 @@ import useLang from "@/hooks/useLang"
|
||||
import { formatPrice } from "@/utils/numberFormatting"
|
||||
|
||||
import GuestDetails from "../GuestDetails"
|
||||
import Points from "../Points"
|
||||
import Price from "../Price"
|
||||
import PriceDetails from "../PriceDetails"
|
||||
import PriceType from "../PriceType"
|
||||
import { hasModifiableRate } from "../utils"
|
||||
import ToggleSidePeek from "./ToggleSidePeek"
|
||||
|
||||
@@ -58,16 +57,17 @@ export function SingleRoom({ bedType, image, hotel, user }: RoomProps) {
|
||||
|
||||
const {
|
||||
adults,
|
||||
bookingCode,
|
||||
breakfast,
|
||||
cheques,
|
||||
childrenAges,
|
||||
confirmationNumber,
|
||||
bookingCode,
|
||||
roomPrice,
|
||||
roomPoints,
|
||||
breakfast,
|
||||
packages,
|
||||
rateDefinition,
|
||||
isCancelled,
|
||||
packages,
|
||||
priceType,
|
||||
rateDefinition,
|
||||
roomPoints,
|
||||
totalPrice,
|
||||
vouchers,
|
||||
} = bookedRoom
|
||||
|
||||
@@ -419,26 +419,15 @@ export function SingleRoom({ bedType, image, hotel, user }: RoomProps) {
|
||||
})}
|
||||
</p>
|
||||
</Typography>
|
||||
{priceType === "points" ? (
|
||||
<Points points={roomPoints} variant="Title/Subtitle/lg" />
|
||||
) : priceType === "voucher" ? (
|
||||
<Typography variant="Title/Subtitle/lg">
|
||||
<p>
|
||||
{intl.formatMessage(
|
||||
{
|
||||
defaultMessage: "{count} voucher",
|
||||
},
|
||||
{ count: vouchers }
|
||||
)}
|
||||
</p>
|
||||
</Typography>
|
||||
) : (
|
||||
<Price
|
||||
price={isCancelled ? 0 : roomPrice.perStay.local.price}
|
||||
variant="Title/Subtitle/lg"
|
||||
isMember={rateDefinition.isMemberRate}
|
||||
/>
|
||||
)}
|
||||
<PriceType
|
||||
cheques={cheques}
|
||||
isCancelled={isCancelled}
|
||||
priceType={priceType}
|
||||
rateDefinition={rateDefinition}
|
||||
roomPoints={roomPoints}
|
||||
totalPrice={totalPrice}
|
||||
vouchers={vouchers}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user