payservedb 6.4.5 → 6.4.6
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/src/models/leaseagreement.js +31 -1
package/package.json
CHANGED
|
@@ -26,6 +26,13 @@ const leaseAgreementSchema = new mongoose.Schema({
|
|
|
26
26
|
ref: 'Customer',
|
|
27
27
|
required: true
|
|
28
28
|
},
|
|
29
|
+
|
|
30
|
+
// *** NEW FIELD: Add billing address support ***
|
|
31
|
+
billerAddressId: {
|
|
32
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
33
|
+
ref: 'BillerAddress'
|
|
34
|
+
},
|
|
35
|
+
|
|
29
36
|
// GL Account configurations
|
|
30
37
|
invoiceDoubleEntryAccount: {
|
|
31
38
|
type: mongoose.Schema.Types.ObjectId,
|
|
@@ -92,6 +99,28 @@ const leaseAgreementSchema = new mongoose.Schema({
|
|
|
92
99
|
type: mongoose.Schema.Types.ObjectId,
|
|
93
100
|
ref: 'Penalty'
|
|
94
101
|
},
|
|
102
|
+
|
|
103
|
+
// *** ENHANCED: Add payment configuration flags ***
|
|
104
|
+
bankPayment: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
default: false
|
|
107
|
+
},
|
|
108
|
+
mobilePayment: {
|
|
109
|
+
type: Boolean,
|
|
110
|
+
default: false
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
// *** ENHANCED: Add structured payment method references ***
|
|
114
|
+
bankAccountId: {
|
|
115
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
116
|
+
ref: 'BankAccount'
|
|
117
|
+
},
|
|
118
|
+
paymentMethodId: {
|
|
119
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
120
|
+
ref: 'PaymentMethod'
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
// Existing M-Pesa fields (keep for backward compatibility)
|
|
95
124
|
mpesaEnabled: {
|
|
96
125
|
type: Boolean,
|
|
97
126
|
default: false
|
|
@@ -101,6 +130,7 @@ const leaseAgreementSchema = new mongoose.Schema({
|
|
|
101
130
|
accountNumber: String,
|
|
102
131
|
phoneNumber: String
|
|
103
132
|
},
|
|
133
|
+
|
|
104
134
|
escalations: [{
|
|
105
135
|
_id: { type: mongoose.Schema.Types.ObjectId, auto: true },
|
|
106
136
|
effectiveDate: { type: Date, required: true },
|
|
@@ -219,4 +249,4 @@ leaseAgreementSchema.index({ facilityId: 1 });
|
|
|
219
249
|
|
|
220
250
|
const LeaseAgreement = mongoose.model('LeaseAgreement', leaseAgreementSchema);
|
|
221
251
|
|
|
222
|
-
module.exports = LeaseAgreement;
|
|
252
|
+
module.exports = LeaseAgreement;
|