tripstorekrabi-shared 1.14.9 → 1.15.1
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 +2 -2
- package/utils.js +8 -3
package/package.json
CHANGED
package/price.js
CHANGED
|
@@ -269,9 +269,9 @@ export function getExtraPaymentsPaidWithPartner(booking, product) {
|
|
|
269
269
|
category: ADD_ON_EXTRA_PAYMENT,
|
|
270
270
|
description: addOnDef.title,
|
|
271
271
|
price: addOn.adults * addOnDef.pricing.adult.sellingPrice +
|
|
272
|
-
(addOn.children ?? 0) * addOnDef.pricing.child
|
|
272
|
+
(addOn.children ?? 0) * (addOnDef.pricing.child?.sellingPrice ?? 0),
|
|
273
273
|
operatorPrice: addOn.adults * addOnDef.pricing.adult.operatorNetPrice +
|
|
274
|
-
(addOn.children ?? 0) * addOnDef.pricing.child
|
|
274
|
+
(addOn.children ?? 0) * (addOnDef.pricing.child?.operatorNetPrice ?? 0)
|
|
275
275
|
}
|
|
276
276
|
});
|
|
277
277
|
|
package/utils.js
CHANGED
|
@@ -341,6 +341,11 @@ export function getBookingSummary(booking, options = {}) {
|
|
|
341
341
|
if (options.includeVersion && booking.version) {
|
|
342
342
|
summary += ', Version: ' + booking.version;
|
|
343
343
|
}
|
|
344
|
+
|
|
345
|
+
if (options.includeExpediaVouchers && booking.expediaVoucherNumbers) {
|
|
346
|
+
summary += ', Vouchers: ' + booking.expediaVoucherNumbers.join(", ");
|
|
347
|
+
}
|
|
348
|
+
|
|
344
349
|
summary += ': ';
|
|
345
350
|
}
|
|
346
351
|
|
|
@@ -580,12 +585,12 @@ function checkTime(pickupTimeValue, departureTimeValue, context) {
|
|
|
580
585
|
return pickupTime.isSameOrBefore(departureTime)
|
|
581
586
|
? true
|
|
582
587
|
: context
|
|
583
|
-
|
|
588
|
+
? context.createError({
|
|
584
589
|
message: 'Pickup time should be before or equals departure time',
|
|
585
590
|
path: context.path,
|
|
586
591
|
params: { status: 'warning' },
|
|
587
592
|
})
|
|
588
|
-
|
|
593
|
+
: false;
|
|
589
594
|
} catch (e) {
|
|
590
595
|
return false;
|
|
591
596
|
}
|
|
@@ -626,7 +631,7 @@ export function createVoucherRequest(booking, product) {
|
|
|
626
631
|
pickupTime: booking.pickupTime,
|
|
627
632
|
mobileVoucher: product
|
|
628
633
|
? product.operator.mobileVoucher ??
|
|
629
|
-
|
|
634
|
+
product.operator.default.mobileVoucher
|
|
630
635
|
: true,
|
|
631
636
|
},
|
|
632
637
|
};
|