payservedb 8.9.4 → 8.9.6

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": "8.9.4",
3
+ "version": "8.9.6",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -289,6 +289,22 @@ const invoiceSchema = new mongoose.Schema(
289
289
  default: null,
290
290
  },
291
291
  },
292
+ creditNote: {
293
+ status: {
294
+ type: String,
295
+ enum: ["pending", "synced", "failed"],
296
+ default: undefined, // absent until a void triggers one
297
+ },
298
+ creditNoteTraderNo: { type: String, default: null },
299
+ etimsCreditNoteNo: { type: String, default: null },
300
+ sdcId: { type: String, default: null },
301
+ receiptNo: { type: String, default: null },
302
+ verificationUrl: { type: String, default: null },
303
+ syncedAt: { type: Date, default: null },
304
+ lastAttemptAt: { type: Date, default: null },
305
+ errorMessage: { type: String, default: null },
306
+ attempts: { type: Number, default: 0 },
307
+ },
292
308
  // New fields for double entry accounts
293
309
  invoiceDoubleEntryAccount: {
294
310
  type: mongoose.Schema.Types.ObjectId,
@@ -46,8 +46,7 @@ const LevyContractSchema = new Schema(
46
46
  default: 0
47
47
  },
48
48
  taxEnabled: {
49
- type: Boolean,
50
- default: true
49
+ type: Boolean
51
50
  },
52
51
  enabledTaxes: [
53
52
  {