tripstorekrabi-shared 1.20.3 → 1.20.4
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/package.json
CHANGED
package/price.js
CHANGED
|
@@ -384,9 +384,9 @@ function calculateStartEndPointPrice(people, startEndPoint, options = { mode: SE
|
|
|
384
384
|
let isSelling = options.mode in [SELLING_MODE, PARTNER_MODE];
|
|
385
385
|
if (pricing) {
|
|
386
386
|
if (pricing.type === "group") {
|
|
387
|
-
return (isSelling ? pricing.sellingPrice : pricing.operatorNetPrice) * Math.ceil((people.adults + people.children) / pricing.max);
|
|
387
|
+
return (isSelling ? (pricing.sellingPrice ?? pricing.amount) : pricing.operatorNetPrice) * Math.ceil((people.adults + people.children) / pricing.max);
|
|
388
388
|
} else if (pricing.type === "person") {
|
|
389
|
-
return (isSelling ? pricing.sellingPrice : pricing.operatorNetPrice) * (people.adults + people.children);
|
|
389
|
+
return (isSelling ? (pricing.sellingPrice ?? pricing.amount) : pricing.operatorNetPrice) * (people.adults + people.children);
|
|
390
390
|
} else {
|
|
391
391
|
return 0;
|
|
392
392
|
}
|