Merged in fix/SW-933-incorrect-ratecode (pull request #947)

Fix/SW-933 incorrect ratecode when creating booking as a member

* fix(SW-933): Added check if member to select correct rate code in create booking

* fix(SW-933): set member price in summary when "join" is true

* fix(SW-933): change "price" -> "amount" and fix bool expression

* fix(SW-933): added check for membership number in summary


Approved-by: Christel Westerberg
This commit is contained in:
Tobias Johansson
2024-11-21 09:00:06 +00:00
parent 8b66c16e17
commit 7221e77fa0
11 changed files with 100 additions and 68 deletions

View File

@@ -51,6 +51,7 @@ function isPaymentMethodEnum(value: string): value is PaymentMethodEnum {
}
export default function Payment({
user,
roomPrice,
otherPaymentOptions,
savedCreditCards,
@@ -185,7 +186,8 @@ export default function Payment({
age: child.age,
bedType: bedTypeMap[parseInt(child.bed.toString())],
})),
rateCode: room.rateCode,
rateCode:
user || join || membershipNo ? room.counterRateCode : room.rateCode,
roomTypeCode: bedType!.roomTypeCode, // A selection has been made in order to get to this step.
guest: {
title: "",