tripstorekrabi-shared 1.24.7 → 1.24.8
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/booking.js +5 -2
- package/package.json +2 -2
package/booking.js
CHANGED
|
@@ -113,7 +113,6 @@ export function addBookingFromInvoice(
|
|
|
113
113
|
|
|
114
114
|
if (item.startingPointId) data.startingPointId = item.startingPointId;
|
|
115
115
|
if (item.dropoffHotel && item.dropoffHotel.length > 0) data.dropoffHotel = item.dropoffHotel;
|
|
116
|
-
if (i > 0) data.partnerNetPrice = 0;
|
|
117
116
|
if (item.nationalParkFee) data.nationalParkFee = item.nationalParkFee;
|
|
118
117
|
if (item.tourGuideLanguage) data.tourGuideLanguage = item.tourGuideLanguage;
|
|
119
118
|
|
|
@@ -126,13 +125,17 @@ export function addBookingFromInvoice(
|
|
|
126
125
|
}
|
|
127
126
|
if (endPointId) data.endPointId = endPointId;
|
|
128
127
|
|
|
128
|
+
data = { ...data, ...paymentData };
|
|
129
|
+
|
|
129
130
|
if (productSnapshot) {
|
|
130
131
|
data.operatorNetPrice = calculateTotalOperatorPrice(data, productSnapshot.data());
|
|
131
132
|
} else {
|
|
132
133
|
data.operatorNetPrice = 0;
|
|
133
134
|
}
|
|
134
135
|
|
|
135
|
-
|
|
136
|
+
if (i > 0) {
|
|
137
|
+
data.partnerNetPrice = 0;
|
|
138
|
+
}
|
|
136
139
|
|
|
137
140
|
let doc = firestore.collection('bookings').doc();
|
|
138
141
|
transaction.set(doc, data);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tripstorekrabi-shared",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.8",
|
|
4
4
|
"description": "Shared library for Trip Store Krabi",
|
|
5
5
|
"author": "Stefan Sommer <tonprince@gmail.com>",
|
|
6
6
|
"repository": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"dayjs": "^1.11.21",
|
|
21
21
|
"libphonenumber-js": "^1.13.10",
|
|
22
|
-
"nanoid": "^6.0.
|
|
22
|
+
"nanoid": "^6.0.1",
|
|
23
23
|
"firebase-admin": "^14.2.0"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|