payservedb 9.4.3 → 9.4.5

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": "9.4.3",
3
+ "version": "9.4.5",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -319,40 +319,38 @@ const invoiceSchema = new mongoose.Schema(
319
319
  errorMessage: { type: String, default: null },
320
320
  attempts: { type: Number, default: 0 },
321
321
  },
322
- txsync: {
323
- digitax: {
324
- synced: {
325
- type: Boolean,
326
- default: false
327
- },
328
- syncedAt: Date,
329
- status: {
330
- type: String,
331
- enum: [
332
- "PENDING",
333
- "PROCESSING",
334
- "SUCCESS",
335
- "FAILED"
336
- ],
337
- default: "PENDING"
338
- },
339
- saleId: String,
340
- traderInvoiceNumber: String,
341
- digitaxInvoiceNumber: Number,
342
- receiptNumber: Number,
343
- serialNumber: String,
344
- receiptTypeCode: String,
345
- offlineUrl: String,
346
- saleDetailUrl: String,
347
- etimsUrl: String,
348
- attempts: {
349
- type: Number,
350
- default: 0
351
- },
352
- lastAttemptAt: Date,
353
- lastError: String,
354
- response: mongoose.Schema.Types.Mixed
355
- }
322
+ digitax: {
323
+ synced: {
324
+ type: Boolean,
325
+ default: false
326
+ },
327
+ syncedAt: Date,
328
+ status: {
329
+ type: String,
330
+ enum: [
331
+ "PENDING",
332
+ "PROCESSING",
333
+ "SUCCESS",
334
+ "FAILED"
335
+ ],
336
+ default: "PENDING"
337
+ },
338
+ saleId: String,
339
+ traderInvoiceNumber: String,
340
+ digitaxInvoiceNumber: Number,
341
+ receiptNumber: Number,
342
+ serialNumber: String,
343
+ receiptTypeCode: String,
344
+ offlineUrl: String,
345
+ saleDetailUrl: String,
346
+ etimsUrl: String,
347
+ attempts: {
348
+ type: Number,
349
+ default: 0
350
+ },
351
+ lastAttemptAt: Date,
352
+ lastError: String,
353
+ response: mongoose.Schema.Types.Mixed
356
354
  },
357
355
  // New fields for double entry accounts
358
356
  invoiceDoubleEntryAccount: {
@@ -111,6 +111,29 @@ const leaseAgreementSchema = new mongoose.Schema({
111
111
  ref: 'CountryTaxRate'
112
112
  }
113
113
  ],
114
+ digitax: {
115
+ enabled: {
116
+ type: Boolean,
117
+ default: false
118
+ },
119
+
120
+ itemId: String,
121
+
122
+ itemName: String,
123
+
124
+ taxTypeCode: String,
125
+
126
+ synced: {
127
+ type: Boolean,
128
+ default: false
129
+ },
130
+
131
+ syncedAt: Date,
132
+
133
+ lastAttemptAt: Date,
134
+
135
+ lastError: String
136
+ },
114
137
  penaltyId: {
115
138
  type: mongoose.Schema.Types.ObjectId,
116
139
  ref: 'Penalty'
@@ -236,7 +259,7 @@ const leaseAgreementSchema = new mongoose.Schema({
236
259
  });
237
260
 
238
261
  leaseAgreementSchema.index({ facilityId: 1 });
239
- leaseAgreementSchema.index({ lastInvoiceYearMonth: 1 });
262
+ leaseAgreementSchema.index({ lastInvoiceYearMonth: 1 });
240
263
 
241
264
  const LeaseAgreement = mongoose.model('LeaseAgreement', leaseAgreementSchema);
242
265
 
@@ -52,6 +52,29 @@ 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
+ },
55
78
  paymentFrequency: {
56
79
  type: String,
57
80
  enum: ['Daily', 'Weekly', 'Bi-Weekly', 'Monthly', 'Quarterly', 'Semi-Annually', 'Annually'],