@vibe-flats/booking-engine-common-server 1.0.151 → 1.0.153
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/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -20,3 +20,4 @@ __exportStar(require("./src/utils/vibe-price"), exports);
|
|
|
20
20
|
__exportStar(require("./src/utils/monthly-diff"), exports);
|
|
21
21
|
__exportStar(require("./src/utils/purge-unit-cache"), exports);
|
|
22
22
|
__exportStar(require("./src/utils/cache"), exports);
|
|
23
|
+
__exportStar(require("./src/utils/guesty-total"), exports);
|
|
@@ -88,6 +88,7 @@ const schema = new mongoose_1.default.Schema({
|
|
|
88
88
|
baseMonthlyRate: { type: Number, required: false },
|
|
89
89
|
cleaningFee: { type: Number, required: true },
|
|
90
90
|
utilities: { type: Number, required: true },
|
|
91
|
+
excludeUtilities: { type: Boolean, required: false },
|
|
91
92
|
monthly: [{ month: { type: String, required: true }, price: { type: Number, required: true }, _id: false }]
|
|
92
93
|
}),
|
|
93
94
|
required: true,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates the true Guesty reservation total including taxes.
|
|
3
|
+
* Guesty's `subTotalPrice` excludes taxes, so this adds `totalTaxes` to get the full amount.
|
|
4
|
+
*/
|
|
5
|
+
export declare const guestyTotal: (money: {
|
|
6
|
+
subTotalPrice: number;
|
|
7
|
+
totalTaxes: number;
|
|
8
|
+
}) => number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.guestyTotal = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Calculates the true Guesty reservation total including taxes.
|
|
6
|
+
* Guesty's `subTotalPrice` excludes taxes, so this adds `totalTaxes` to get the full amount.
|
|
7
|
+
*/
|
|
8
|
+
const guestyTotal = (money) => {
|
|
9
|
+
return money.subTotalPrice + money.totalTaxes;
|
|
10
|
+
};
|
|
11
|
+
exports.guestyTotal = guestyTotal;
|