Merged in feat/SW-1356-reward-night-booking-2- (pull request #1559)
feat: SW-1356 Reward night bookingflow * feat: SW-1356 Reward night bookingflow * feat: SW-1356 Removed extra param booking call * feat: SW-1356 Optimized as review comments * feat: SW-1356 Schema validation updates * feat: SW-1356 Fix after rebase * feat: SW-1356 Optimised price.redemptions check * feat: SW-1356 Updated Props naming Approved-by: Arvid Norlin
This commit is contained in:
@@ -22,3 +22,19 @@ export function formatPrice(intl: IntlShape, price: number, currency: string) {
|
||||
})
|
||||
return `${localizedPrice} ${currency}`
|
||||
}
|
||||
|
||||
// This will handle redemption and bonus cheque (corporate cheque) scneario with partial payments
|
||||
export function formatPriceWithAdditionalPrice(
|
||||
intl: IntlShape,
|
||||
points: number,
|
||||
pointsCurrency: string,
|
||||
additionalPrice?: number,
|
||||
additionalPriceCurrency?: string
|
||||
) {
|
||||
const formattedAdditionalPrice =
|
||||
additionalPrice && additionalPriceCurrency
|
||||
? `+ ${formatPrice(intl, additionalPrice, additionalPriceCurrency)}`
|
||||
: ""
|
||||
|
||||
return `${formatPrice(intl, points, pointsCurrency)} ${formattedAdditionalPrice}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user