payservedb 9.4.1 → 9.4.3
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/customer.js +17 -0
- package/src/models/invoice.js +35 -0
package/package.json
CHANGED
package/src/models/customer.js
CHANGED
|
@@ -34,6 +34,23 @@ const CustomerSchema = new mongoose.Schema({
|
|
|
34
34
|
default: null,
|
|
35
35
|
description: "KRA PIN for tax identification (eTims integration)",
|
|
36
36
|
},
|
|
37
|
+
digitax: {
|
|
38
|
+
customerId: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: null
|
|
41
|
+
},
|
|
42
|
+
synced: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false
|
|
45
|
+
},
|
|
46
|
+
syncedAt: Date,
|
|
47
|
+
errorMessage: String,
|
|
48
|
+
attempts: {
|
|
49
|
+
type: Number,
|
|
50
|
+
default: 0
|
|
51
|
+
},
|
|
52
|
+
lastAttemptAt: Date
|
|
53
|
+
},
|
|
37
54
|
nextOfKin: [
|
|
38
55
|
{
|
|
39
56
|
name: {
|
package/src/models/invoice.js
CHANGED
|
@@ -319,6 +319,41 @@ 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
|
+
}
|
|
356
|
+
},
|
|
322
357
|
// New fields for double entry accounts
|
|
323
358
|
invoiceDoubleEntryAccount: {
|
|
324
359
|
type: mongoose.Schema.Types.ObjectId,
|