Merged in feat/SW-1308-booking-codes-track-b (pull request #1607)

Feat/SW-1308 booking codes track b

* feat: SW-1308 Booking codes track b

* feat: SW-1308 Booking codes Track B implementation

* feat: SW-1308 Optimized after rebase


Approved-by: Arvid Norlin
This commit is contained in:
Hrishikesh Vaipurkar
2025-03-24 11:23:11 +00:00
parent 5643bcc62a
commit b0674d07f5
66 changed files with 1612 additions and 285 deletions

View File

@@ -16,11 +16,17 @@ export function getSingleDecimal(n: Number | string) {
* @param currency - currency code
* @returns localized and formatted number in string type with currency
*/
export function formatPrice(intl: IntlShape, price: number, currency: string) {
export function formatPrice(
intl: IntlShape,
price: number,
currency: string,
additionalPrice?: number,
additionalPriceCurrency?: string
) {
const localizedPrice = intl.formatNumber(price, {
minimumFractionDigits: 0,
})
return `${localizedPrice} ${currency}`
return `${localizedPrice} ${currency} ${additionalPrice ? "+ " + additionalPrice + " " + additionalPriceCurrency : ""}`
}
// This will handle redemption and bonus cheque (corporate cheque) scneario with partial payments