tripstorekrabi-shared 1.13.39 → 1.13.40

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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/price.js +1 -1
  3. package/product.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tripstorekrabi-shared",
3
- "version": "1.13.39",
3
+ "version": "1.13.40",
4
4
  "description": "Shared library for Trip Store Krabi",
5
5
  "author": "Stefan Sommer <tonprince@gmail.com>",
6
6
  "repository": {
package/price.js CHANGED
@@ -33,7 +33,7 @@ export function calculateProductOperatorPrice(booking, pricing) {
33
33
  return calculateProductPrice(booking, pricing, { paymentMode: OPERATOR_PAYMENT_MODE });
34
34
  }
35
35
 
36
- export function calculateProductPrice(booking, pricing, options = { paymentMode: SELLING_PAYMENT_MODE }) {
36
+ function calculateProductPrice(booking, pricing, options = { paymentMode: SELLING_PAYMENT_MODE }) {
37
37
  function calculateRetailPrice(commissionRate, price) {
38
38
  return Math.floor(
39
39
  (price * 100) /
package/product.js CHANGED
@@ -1,4 +1,4 @@
1
- import { calculateProductPrice, countMinPeople } from "./price.js";
1
+ import { calculateProductSellingPrice, countMinPeople } from "./price.js";
2
2
 
3
3
  const MATCH_HTML_REGEXP = /(<([^>]+)>)/ig;
4
4
 
@@ -12,7 +12,7 @@ export function buildIndex(id, product) {
12
12
  heroPhoto: product.heroPhoto,
13
13
  operator: product.operator.default.name,
14
14
  url: product.url,
15
- price: calculateProductPrice({ adults: countMinPeople(product.pricing), children: 0, infants: 0 }, product.pricing) / countMinPeople(product.pricing),
15
+ price: calculateProductSellingPrice({ adults: countMinPeople(product.pricing), children: 0, infants: 0 }, product.pricing) / countMinPeople(product.pricing),
16
16
  priceType: product.pricing.type,
17
17
  availability: product.availability
18
18
  };