@vibe-flats/booking-engine-common-server 1.0.76 → 1.0.78
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/build/src/config/app.js
CHANGED
|
@@ -10,7 +10,12 @@ exports.COMMON_SERVER = {
|
|
|
10
10
|
monthly: 30
|
|
11
11
|
},
|
|
12
12
|
guesty: {
|
|
13
|
-
|
|
13
|
+
stripe: {
|
|
14
|
+
paymentProviderId: '664d9dc85fadb20011ee5b04'
|
|
15
|
+
},
|
|
16
|
+
invoiceItems: {
|
|
17
|
+
rent: 'Accommodation fare',
|
|
18
|
+
cleaning: 'Cleaning fee',
|
|
14
19
|
utilities: 'Utilities',
|
|
15
20
|
discountMonthly: 'Discount (Monthly Stay)'
|
|
16
21
|
}
|
|
@@ -10,7 +10,7 @@ const guestyPrice = (unit, stay) => {
|
|
|
10
10
|
// Apply multiplier: Guesty's approach to monthly pricing
|
|
11
11
|
const rent = +(stay.reduce((acc, stay) => acc + stay.price, 0) * multiplier).toFixed(0);
|
|
12
12
|
const cleaning = unit.prices.cleaningFee;
|
|
13
|
-
const utilities = (((_a = unit.fees.find(fee => fee.name.trim() === app_1.COMMON_SERVER.guesty.
|
|
13
|
+
const utilities = (((_a = unit.fees.find(fee => fee.name.trim() === app_1.COMMON_SERVER.guesty.invoiceItems.utilities)) === null || _a === void 0 ? void 0 : _a.value) || 0) * nights;
|
|
14
14
|
const total = rent + utilities + cleaning;
|
|
15
15
|
const discount = nights >= app_1.COMMON_SERVER.priceFactor.monthly && unit.prices.monthlyPriceFactor !== 1
|
|
16
16
|
? total * (1 - unit.prices.monthlyPriceFactor)
|