payservedb 8.0.8 → 8.1.0
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
CHANGED
|
@@ -26,10 +26,15 @@ const leaseAgreementSchema = new mongoose.Schema({
|
|
|
26
26
|
ref: 'Customer',
|
|
27
27
|
required: true
|
|
28
28
|
},
|
|
29
|
-
|
|
29
|
+
billerAddressId: {
|
|
30
30
|
type: mongoose.Schema.Types.ObjectId,
|
|
31
31
|
ref: 'BillerAddress'
|
|
32
32
|
},
|
|
33
|
+
// Reference to BankDetails instead of storing bank info directly
|
|
34
|
+
bankDetails: {
|
|
35
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
36
|
+
ref: 'BankDetails'
|
|
37
|
+
},
|
|
33
38
|
// GL Account configurations
|
|
34
39
|
invoiceDoubleEntryAccount: {
|
|
35
40
|
type: mongoose.Schema.Types.ObjectId,
|
|
@@ -78,15 +83,21 @@ const leaseAgreementSchema = new mongoose.Schema({
|
|
|
78
83
|
required: true,
|
|
79
84
|
enum: ['Bank Transfer', 'Cash', 'Cheque']
|
|
80
85
|
},
|
|
86
|
+
// Reference bank details ID instead of storing bank info
|
|
87
|
+
bankDetailsId: {
|
|
88
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
89
|
+
ref: 'BankDetails'
|
|
90
|
+
},
|
|
91
|
+
// Keep other payment method details for non-bank methods
|
|
81
92
|
details: {
|
|
82
|
-
|
|
83
|
-
accountName: String,
|
|
84
|
-
accountNumber: String,
|
|
85
|
-
branch: String,
|
|
86
|
-
swiftCode: String,
|
|
93
|
+
// For non-bank payment methods
|
|
87
94
|
bankToDraft: String,
|
|
88
95
|
chequeAccountNumber: String,
|
|
89
|
-
preferredCashLocation: String
|
|
96
|
+
preferredCashLocation: String,
|
|
97
|
+
// For mobile money
|
|
98
|
+
provider: String,
|
|
99
|
+
phoneNumber: String,
|
|
100
|
+
accountName: String
|
|
90
101
|
},
|
|
91
102
|
isPrimary: { type: Boolean, default: false }
|
|
92
103
|
}],
|
|
@@ -121,6 +132,7 @@ const leaseAgreementSchema = new mongoose.Schema({
|
|
|
121
132
|
}
|
|
122
133
|
}]
|
|
123
134
|
},
|
|
135
|
+
// ... rest of the schema remains the same
|
|
124
136
|
billingCycle: {
|
|
125
137
|
frequency: {
|
|
126
138
|
type: String,
|
|
@@ -208,7 +220,7 @@ const leaseAgreementSchema = new mongoose.Schema({
|
|
|
208
220
|
},
|
|
209
221
|
editedAt: { type: Date, default: Date.now },
|
|
210
222
|
reason: { type: String, required: true },
|
|
211
|
-
changes: { type: Object }
|
|
223
|
+
changes: { type: Object }
|
|
212
224
|
}
|
|
213
225
|
],
|
|
214
226
|
createdBy: {
|