@vibe-flats/booking-engine-common-server 1.0.45 → 1.0.46
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.
|
@@ -6,7 +6,7 @@ const guestyPrice = (unit, stay) => {
|
|
|
6
6
|
var _a;
|
|
7
7
|
//
|
|
8
8
|
const nights = stay.length;
|
|
9
|
-
const multiplier = nights >=
|
|
9
|
+
const multiplier = nights >= app_1.COMMON_SERVER.priceFactor.monthly ? unit.prices.monthlyPriceFactor : 1;
|
|
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;
|