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 +1 -1
- package/src/models/invoice.js +32 -34
- package/src/models/leaseagreement.js +24 -1
- package/src/models/levycontract.js +23 -0
package/package.json
CHANGED
package/src/models/invoice.js
CHANGED
|
@@ -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
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
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'],
|