tripstorekrabi-shared 1.11.8 → 1.11.9

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 (2) hide show
  1. package/package.json +1 -1
  2. package/price.js +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tripstorekrabi-shared",
3
- "version": "1.11.8",
3
+ "version": "1.11.9",
4
4
  "description": "Shared library for Trip Store Krabi",
5
5
  "author": "Stefan Sommer <tonprince@gmail.com>",
6
6
  "repository": {
package/price.js CHANGED
@@ -11,7 +11,8 @@ export function calculateProductPrice(booking, pricing, mode = "retail") {
11
11
  case "person": {
12
12
  let volume = findVolume(booking, pricing);
13
13
  if (!volume) {
14
- throw new Error(`No volume price found for the total amount of ${booking.adults + booking.children} people`);
14
+ console.error(`No volume price found for the total amount of ${booking.adults + booking.children} people`);
15
+ return undefined;
15
16
  } else {
16
17
  let bookingType = getBookingType(booking.referenceNumber);
17
18
 
@@ -45,7 +46,8 @@ export function calculateProductPrice(booking, pricing, mode = "retail") {
45
46
  case "group": {
46
47
  let volume = findVolume(booking, pricing);
47
48
  if (!volume) {
48
- throw new Error(`No volume price found for the total amount of ${booking.adults + booking.children} people`);
49
+ console.error(`No volume price found for the total amount of ${booking.adults + booking.children} people`);
50
+ return undefined;
49
51
  } else {
50
52
  let bookingType = getBookingType(booking.referenceNumber);
51
53