tripstorekrabi-shared 1.13.36 → 1.13.37
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 +5 -1
package/package.json
CHANGED
package/price.js
CHANGED
|
@@ -164,6 +164,10 @@ export function calculatePartnerNetPrice(booking, product) {
|
|
|
164
164
|
);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
+
export function calculateTotalSellingPrice(booking, product) {
|
|
168
|
+
return calculateTotalPrice(booking, product, options = { paymentMode: SELLING_PAYMENT_MODE });
|
|
169
|
+
}
|
|
170
|
+
|
|
167
171
|
export function calculateTotalOperatorPrice(booking, product) {
|
|
168
172
|
return calculateTotalPrice(booking, product, options = { paymentMode: OPERATOR_PAYMENT_MODE });
|
|
169
173
|
}
|
|
@@ -172,7 +176,7 @@ export function calculateTotalPartnerNetPrice(booking, product) {
|
|
|
172
176
|
return calculateTotalPrice(booking, product, options = { paymentMode: PARTNER_PAYMENT_MODE });
|
|
173
177
|
}
|
|
174
178
|
|
|
175
|
-
|
|
179
|
+
function calculateTotalPrice(booking, product, options = { paymentMode: SELLING_PAYMENT_MODE }) {
|
|
176
180
|
let total = calculateProductPrice(booking, product.pricing, options);
|
|
177
181
|
total += calculateStartEndPointPrice(booking, findStartingPoint(product, booking.startingPointId, false), options);
|
|
178
182
|
total += calculateStartEndPointPrice(booking, findEndPoint(product, booking.endPointId, false), options);
|