tripstorekrabi-shared 1.13.52 → 1.13.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/price.js +6 -1
package/package.json
CHANGED
package/price.js
CHANGED
|
@@ -145,7 +145,8 @@ export function countMaxPeople(pricing) {
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
export function getTotalAmountToBeReceived(booking, options = {}) {
|
|
148
|
-
|
|
148
|
+
let filter = (item) => (!options.filter || options.filter(item)) && !item.disabled && item.paymentMethod !== PAY_ON_TOUR;
|
|
149
|
+
return booking.customerPaymentStatus === "Refunded" ? 0 : booking.partnerNetPrice + calculateExtraPayments(booking, { ...options, mode: SELLING_MODE, filter })
|
|
149
150
|
}
|
|
150
151
|
|
|
151
152
|
export function calculatePartnerNetPrice(booking, product) {
|
|
@@ -358,4 +359,8 @@ export function findAddOn(id, addOns) {
|
|
|
358
359
|
return addOns.find((item) =>
|
|
359
360
|
item.id === id
|
|
360
361
|
);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
export function inRange(expected, actual, boundary = 10) {
|
|
365
|
+
return ((expected - boundary) <= actual) && ((expected + boundary) >= actual);
|
|
361
366
|
}
|