tripstorekrabi-shared 1.13.44 → 1.13.45
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 +9 -1
package/package.json
CHANGED
package/price.js
CHANGED
|
@@ -220,7 +220,15 @@ function getExtraPaymentPrice(item, options) {
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
export function
|
|
223
|
+
export function calculateTotalExtraPaymentsSellingPrice(booking) {
|
|
224
|
+
return calculateExtraPayments(booking, { mode: SELLING_MODE });
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export function calculateTotalExtraPaymentsOperatorPrice(booking) {
|
|
228
|
+
return calculateExtraPayments(booking, { mode: OPERATOR_MODE });
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function calculateExtraPayments(booking, options = { mode: SELLING_MODE }) {
|
|
224
232
|
let filter = options.filter ?? ((item) => !item.disabled);
|
|
225
233
|
let getPrice = options.getPrice ?? getExtraPaymentPrice;
|
|
226
234
|
|