payservedb 8.0.2 → 8.0.4

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.2",
3
+ "version": "8.0.4",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -9,8 +9,7 @@ const invoiceSchema = new mongoose.Schema(
9
9
  },
10
10
  accountNumber: {
11
11
  type: String,
12
- required: true,
13
- unique: true,
12
+ required: true
14
13
  },
15
14
  client: {
16
15
  clientId: {
@@ -123,7 +122,6 @@ const invoiceSchema = new mongoose.Schema(
123
122
  // NEW FIELD 1: Year-Month for easy filtering
124
123
  yearMonth: {
125
124
  type: String,
126
- required: true,
127
125
  match: /^\d{4}-\d{2}$/, // Validates format like "2025-08"
128
126
  index: true
129
127
  },
@@ -11,7 +11,10 @@ const InvoicingScheduleSchema = new mongoose.Schema({
11
11
  },
12
12
  invoiceType: {
13
13
  type: String,
14
- required: true
14
+ required: true,
15
+ unique: true,
16
+ trim: true,
17
+ index: true
15
18
  },
16
19
  createdAt: {
17
20
  type: Date,
@@ -119,7 +119,7 @@ const waterMeterSchema = new mongoose.Schema({
119
119
  },
120
120
  bulkMeterDescription: {
121
121
  type: String,
122
- enum: ['City Council Bulk', 'Borehole Bulk', 'Bulk Inlet', 'Bulk Outlet','Bulk Borehole Outlet'],
122
+ enum: ['City Council Bulk', 'Borehole Bulk', 'Bulk Inlet', 'Bulk Outlet','Bulk Borehole Outlet', 'Common Area'],
123
123
  trim: true
124
124
  }
125
125