payservedb 9.4.5 → 9.4.7

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/index.js CHANGED
@@ -93,6 +93,7 @@ const models = {
93
93
  Settings: require("./src/models/settings"),
94
94
  Levy: require("./src/models/levy"),
95
95
  LevyType: require("./src/models/levytype"),
96
+ ContractPaymentReceipt: require("./src/models/levy_payment_receipt"),
96
97
  LevyContract: require("./src/models/levycontract"),
97
98
  DepositSchema: require("./src/models/levy_deposits"),
98
99
  Invoice: require("./src/models/invoice"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "9.4.5",
3
+ "version": "9.4.7",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -45,6 +45,23 @@ const levySchema = new mongoose.Schema(
45
45
  enum: ['VAT', 'Withholding', 'ServiceTax', 'Custom'],
46
46
  default: 'VAT'
47
47
  },
48
+ digitax: {
49
+
50
+ enabled: Boolean,
51
+
52
+ itemId: String,
53
+
54
+ itemName: String,
55
+
56
+ taxTypeCode: String,
57
+
58
+ synced: Boolean,
59
+
60
+ syncedAt: Date,
61
+
62
+ lastError: String
63
+
64
+ },
48
65
  collectionFrequency: {
49
66
  type: String,
50
67
  required: true,
@@ -119,7 +119,22 @@ DepositSchema.pre('save', function (next) {
119
119
  next();
120
120
  });
121
121
 
122
+ const ReceiptCounterSchema = new Schema({
123
+ _id: {
124
+ type: String,
125
+ required: true // fixed value: 'ContractPaymentReceipt'
126
+ },
127
+ seq: {
128
+ type: Number,
129
+ default: 0
130
+ }
131
+ });
132
+
122
133
  module.exports = {
123
134
  schema: DepositSchema,
124
- name: 'Deposit'
135
+ name: 'Deposit',
136
+ ReceiptCounterSchema: {
137
+ schema: ReceiptCounterSchema,
138
+ name: 'ReceiptCounter'
139
+ }
125
140
  };
@@ -52,29 +52,6 @@ const LevyContractSchema = new Schema(
52
52
  ref: 'CountryTaxRate'
53
53
  }
54
54
  ],
55
- digitax: {
56
- enabled: {
57
- type: Boolean,
58
- default: false
59
- },
60
-
61
- itemId: String,
62
-
63
- itemName: String,
64
-
65
- taxTypeCode: String,
66
-
67
- synced: {
68
- type: Boolean,
69
- default: false
70
- },
71
-
72
- syncedAt: Date,
73
-
74
- lastAttemptAt: Date,
75
-
76
- lastError: String
77
- },
78
55
  paymentFrequency: {
79
56
  type: String,
80
57
  enum: ['Daily', 'Weekly', 'Bi-Weekly', 'Monthly', 'Quarterly', 'Semi-Annually', 'Annually'],