payservedb 3.8.8 → 3.8.9

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.8.8",
3
+ "version": "3.8.9",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -14,11 +14,6 @@ const levySchema = new mongoose.Schema(
14
14
  ref: "LevyType",
15
15
  required: true,
16
16
  },
17
- //Commented out Name field
18
- // levyTypeName: {
19
- // type: String,
20
- // required: true,
21
- // },
22
17
  amount: {
23
18
  type: Number,
24
19
  required: true,
@@ -42,6 +37,21 @@ const levySchema = new mongoose.Schema(
42
37
  type: String,
43
38
  required: true,
44
39
  },
40
+ // New fields added from levy contract
41
+ currency: {
42
+ type: mongoose.Schema.Types.ObjectId,
43
+ ref: "Currency",
44
+ required: false,
45
+ },
46
+ mobilePayment: {
47
+ type: Boolean,
48
+ default: false,
49
+ required: false,
50
+ },
51
+ paymentMethodId: {
52
+ type: mongoose.Schema.Types.ObjectId,
53
+ required: false,
54
+ },
45
55
  disabled: {
46
56
  type: Boolean,
47
57
  required: false,
@@ -40,20 +40,13 @@ const levyContractSchema = new mongoose.Schema({
40
40
  required: true,
41
41
  enum: ['Active', 'Inactive']
42
42
  },
43
+ // We keep paymentFrequency in the schema for backward compatibility
44
+ // But it will now be populated from the levy's collectionFrequency
43
45
  paymentFrequency: {
44
46
  type: String,
45
47
  required: true,
46
48
  trim: true
47
49
  },
48
- currency: {
49
- type: mongoose.Schema.Types.ObjectId,
50
- ref: 'Currency',
51
- required: true
52
- },
53
- paymentMethodId: {
54
- type: mongoose.Schema.Types.ObjectId,
55
- required: false
56
- },
57
50
  facilityId: {
58
51
  type: mongoose.Schema.Types.ObjectId,
59
52
  ref: 'Facility',
@@ -41,7 +41,7 @@ const meterSchema = new mongoose.Schema({
41
41
  valveType: {
42
42
  type: String,
43
43
  enum: ['automatic', 'manual'],
44
- default: 'manual'
44
+ default: 'automatic'
45
45
  },
46
46
  isInstalled: {
47
47
  type: Boolean,