payservedb 8.0.6 → 8.0.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": "8.0.6",
3
+ "version": "8.0.8",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -28,18 +28,6 @@ const CampaignSchema = new mongoose.Schema({
28
28
  enum: ['immediate', 'scheduled', 'recurring'],
29
29
  default: 'immediate'
30
30
  },
31
- startDate: {
32
- type: Date,
33
- },
34
- endDate: {
35
- type: Date,
36
- validate: {
37
- validator: function (value) {
38
- return this.startDate <= value;
39
- },
40
- message: 'End date must be after or equal to start date'
41
- }
42
- },
43
31
  targetAudience: {
44
32
  type: String,
45
33
  required: true,
@@ -197,7 +197,7 @@ cashPaymentSchema.index({ 'approvalStatus': 1 });
197
197
  cashPaymentSchema.index({ 'isVoided': 1 });
198
198
  cashPaymentSchema.index({ 'client.clientId': 1 });
199
199
  cashPaymentSchema.index({ 'invoice.invoiceId': 1 });
200
- cashPaymentSchema.index({ 'facility.id': 1 });
200
+ cashPaymentSchema.index({ 'facility.id': 1 });
201
201
  cashPaymentSchema.index({ 'reconciliationStatus': 1 });
202
202
  cashPaymentSchema.index({ 'paymentDate': -1 });
203
203
  cashPaymentSchema.index({ 'currency.code': 1 });
@@ -94,6 +94,11 @@ const LevyContractSchema = new Schema(
94
94
  reactivatedBy: {
95
95
  type: mongoose.Schema.Types.ObjectId,
96
96
  ref: 'User'
97
+ },
98
+ lastInvoiceYearMonth: {
99
+ type: String,
100
+ default: null
101
+ // Format: "2025-09", "2025-10", etc.
97
102
  }
98
103
  },
99
104
  {