payservedb 9.8.6 → 9.8.8
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
package/src/models/invoice.js
CHANGED
|
@@ -329,11 +329,45 @@ const invoiceSchema = new mongoose.Schema(
|
|
|
329
329
|
attempts: { type: Number, default: 0 },
|
|
330
330
|
},
|
|
331
331
|
digitax: {
|
|
332
|
+
// DigiTax configuration
|
|
333
|
+
enabled: {
|
|
334
|
+
type: Boolean,
|
|
335
|
+
default: false
|
|
336
|
+
},
|
|
337
|
+
|
|
338
|
+
profileId: {
|
|
339
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
340
|
+
default: null
|
|
341
|
+
},
|
|
342
|
+
|
|
343
|
+
itemId: {
|
|
344
|
+
type: String,
|
|
345
|
+
default: null
|
|
346
|
+
},
|
|
347
|
+
|
|
348
|
+
itemName: {
|
|
349
|
+
type: String,
|
|
350
|
+
default: null
|
|
351
|
+
},
|
|
352
|
+
|
|
353
|
+
itemClassCode: {
|
|
354
|
+
type: String,
|
|
355
|
+
default: null
|
|
356
|
+
},
|
|
357
|
+
|
|
358
|
+
taxTypeCode: {
|
|
359
|
+
type: String,
|
|
360
|
+
default: null
|
|
361
|
+
},
|
|
362
|
+
|
|
363
|
+
// DigiTax sync information
|
|
332
364
|
synced: {
|
|
333
365
|
type: Boolean,
|
|
334
366
|
default: false
|
|
335
367
|
},
|
|
368
|
+
|
|
336
369
|
syncedAt: Date,
|
|
370
|
+
|
|
337
371
|
status: {
|
|
338
372
|
type: String,
|
|
339
373
|
enum: [
|
|
@@ -344,24 +378,37 @@ const invoiceSchema = new mongoose.Schema(
|
|
|
344
378
|
],
|
|
345
379
|
default: "PENDING"
|
|
346
380
|
},
|
|
381
|
+
|
|
347
382
|
saleId: String,
|
|
383
|
+
|
|
348
384
|
traderInvoiceNumber: String,
|
|
385
|
+
|
|
349
386
|
digitaxInvoiceNumber: Number,
|
|
387
|
+
|
|
350
388
|
receiptNumber: Number,
|
|
389
|
+
|
|
351
390
|
serialNumber: String,
|
|
391
|
+
|
|
352
392
|
receiptTypeCode: String,
|
|
393
|
+
|
|
353
394
|
offlineUrl: String,
|
|
395
|
+
|
|
354
396
|
saleDetailUrl: String,
|
|
397
|
+
|
|
355
398
|
etimsUrl: String,
|
|
399
|
+
|
|
356
400
|
attempts: {
|
|
357
401
|
type: Number,
|
|
358
402
|
default: 0
|
|
359
403
|
},
|
|
404
|
+
|
|
360
405
|
lastAttemptAt: Date,
|
|
406
|
+
|
|
361
407
|
lastError: String,
|
|
408
|
+
|
|
362
409
|
response: mongoose.Schema.Types.Mixed,
|
|
363
|
-
creditNote: {
|
|
364
410
|
|
|
411
|
+
creditNote: {
|
|
365
412
|
synced: {
|
|
366
413
|
type: Boolean,
|
|
367
414
|
default: false
|
|
@@ -387,7 +434,6 @@ const invoiceSchema = new mongoose.Schema(
|
|
|
387
434
|
errorMessage: String,
|
|
388
435
|
|
|
389
436
|
response: mongoose.Schema.Types.Mixed
|
|
390
|
-
|
|
391
437
|
}
|
|
392
438
|
},
|
|
393
439
|
// Zoho Books sync tracking
|
|
@@ -34,9 +34,11 @@ const ContractPaymentReceiptSchema = new Schema(
|
|
|
34
34
|
type: String,
|
|
35
35
|
trim: true
|
|
36
36
|
},
|
|
37
|
+
// NOT required: a receipt can be created without payment
|
|
38
|
+
|
|
37
39
|
datePaid: {
|
|
38
40
|
type: Date,
|
|
39
|
-
|
|
41
|
+
default: null
|
|
40
42
|
},
|
|
41
43
|
paymentMethod: {
|
|
42
44
|
type: String,
|