payservedb 10.1.6 → 10.1.8
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/index.js +1 -1
- package/package.json +1 -1
- package/src/models/invoice.js +5 -0
- package/src/models/propertyManagerContract.js +28 -0
package/index.js
CHANGED
|
@@ -303,7 +303,7 @@ const models = {
|
|
|
303
303
|
InvoiceWithholdingTax: require("./src/models/InvoiceWithholdingTax"),
|
|
304
304
|
InvoiceCreditAdjustment: require("./src/models/invoiceCreditAdjustment"),
|
|
305
305
|
//DAMR
|
|
306
|
-
BulkMeter: require("./src/models/damr.
|
|
306
|
+
BulkMeter: require("./src/models/damr.BulkMeter"),
|
|
307
307
|
BulkReading: require("./src/models/damr.BulkReading"),
|
|
308
308
|
Credit: require("./src/models/damr.Credit"),
|
|
309
309
|
DAMRCounter: require("./src/models/damr.DAMRCounter"),
|
package/package.json
CHANGED
package/src/models/invoice.js
CHANGED
|
@@ -154,6 +154,11 @@ const invoiceSchema = new mongoose.Schema(
|
|
|
154
154
|
type: String,
|
|
155
155
|
default: null,
|
|
156
156
|
},
|
|
157
|
+
// Property-management invoice details (fee basis, deductions taken first)
|
|
158
|
+
pmContractDetails: {
|
|
159
|
+
type: mongoose.Schema.Types.Mixed,
|
|
160
|
+
default: undefined,
|
|
161
|
+
},
|
|
157
162
|
balanceBroughtForward: {
|
|
158
163
|
type: Number,
|
|
159
164
|
default: 0,
|
|
@@ -117,6 +117,34 @@ const PropertyManagerContractSchema = new Schema(
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
|
+
// Optional deductions taken off the gross rental income BEFORE the
|
|
121
|
+
// management fee is calculated (e.g. repairs, caretaker, levies).
|
|
122
|
+
// Only applied when `enabled` is true. Percentage deductions are
|
|
123
|
+
// taken from the gross rental income; fixed amounts are subtracted
|
|
124
|
+
// as-is. Management fee is then computed on the net figure.
|
|
125
|
+
deductions: {
|
|
126
|
+
enabled: {
|
|
127
|
+
type: Boolean,
|
|
128
|
+
default: false
|
|
129
|
+
},
|
|
130
|
+
items: [{
|
|
131
|
+
name: {
|
|
132
|
+
type: String,
|
|
133
|
+
required: true,
|
|
134
|
+
trim: true
|
|
135
|
+
},
|
|
136
|
+
type: {
|
|
137
|
+
type: String,
|
|
138
|
+
enum: ['percentage', 'amount'],
|
|
139
|
+
required: true
|
|
140
|
+
},
|
|
141
|
+
value: {
|
|
142
|
+
type: Number,
|
|
143
|
+
required: true,
|
|
144
|
+
min: [0, 'Deduction value cannot be negative']
|
|
145
|
+
}
|
|
146
|
+
}]
|
|
147
|
+
},
|
|
120
148
|
// Per-contract lease commission override — when set (value present)
|
|
121
149
|
// it takes precedence over the facility-wide
|
|
122
150
|
// PropertyManagementSettings default. Lease commission is the
|