payservedb 3.4.7 → 3.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "3.4.7",
3
+ "version": "3.4.8",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -69,7 +69,15 @@ const leaseAgreementSchema = new mongoose.Schema({
69
69
  billingCycle: {
70
70
  frequency: { type: String, enum: ['Monthly', 'Quarterly', 'Annually'], required: true },
71
71
  nextInvoiceDate: { type: Date },
72
- autoSend: { type: Boolean, default: false }
72
+ autoSend: { type: Boolean, default: false },
73
+ overdue: {
74
+ reminderDays: {
75
+ type: Number,
76
+ default: 7,
77
+ min: 0,
78
+ max: 30 // Reasonable limit for overdue reminders
79
+ }
80
+ }
73
81
  },
74
82
  invoices: [
75
83
  { type: mongoose.Schema.Types.ObjectId, ref: 'Invoice' }
@@ -101,11 +109,11 @@ const leaseAgreementSchema = new mongoose.Schema({
101
109
  payments: [
102
110
  {
103
111
  invoiceId: { type: mongoose.Schema.Types.ObjectId, ref: 'Invoice', required: true },
104
- method: {
105
- type: {
106
- type: String,
107
- enum: ['Bank Transfer', 'Mobile Money', 'Cash', 'Cheque'],
108
- required: true
112
+ method: {
113
+ type: {
114
+ type: String,
115
+ enum: ['Bank Transfer', 'Mobile Money', 'Cash', 'Cheque'],
116
+ required: true
109
117
  },
110
118
  details: {
111
119
  // Capture specific details of the payment method used