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
package/src/models/invoice.js
CHANGED
|
@@ -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
|
},
|
|
@@ -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
|
|