payservedb 4.5.3 → 4.5.4

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": "4.5.3",
3
+ "version": "4.5.4",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -24,50 +24,30 @@ const supplierSchema = new mongoose.Schema({
24
24
  required: true,
25
25
  trim: true
26
26
  },
27
- address: {
28
- street: String,
29
- city: String,
30
- state: String,
31
- country: String,
32
- postalCode: String
33
- },
34
27
  contactPerson: {
35
28
  name: String,
36
- email: String,
37
- phone: String,
38
- position: String
39
- },
40
- taxIdentificationNumber: {
41
- type: String,
42
29
  trim: true
43
30
  },
44
- supplierType: {
45
- type: String,
46
- enum: ['product', 'service', 'both'],
47
- default: 'both'
48
- },
49
- preferredCurrency: {
50
- type: String,
51
- default: 'KES'
31
+ department: {
32
+ name: String,
33
+ trim: true
52
34
  },
53
- paymentTerms: {
35
+ taxIdentificationNumber: {
54
36
  type: String,
55
- default: 'net30'
56
- },
57
- bankDetails: {
58
- bankName: String,
59
- accountName: String,
60
- accountNumber: String,
61
- branchCode: String,
62
- swiftCode: String
37
+ trim: true
63
38
  },
64
39
  documents: [{
65
- name: String,
66
- fileUrl: String,
67
- fileType: String,
68
- uploadDate: {
69
- type: Date,
70
- default: Date.now
40
+ documentName: {
41
+ type: String,
42
+ required: true
43
+ },
44
+ documentType: {
45
+ type: String,
46
+ required: true
47
+ },
48
+ document: {
49
+ type: String,
50
+ required: true
71
51
  }
72
52
  }],
73
53
  status: {
@@ -76,28 +56,6 @@ const supplierSchema = new mongoose.Schema({
76
56
  default: 'active',
77
57
  index: true
78
58
  },
79
- rating: {
80
- type: Number,
81
- min: 0,
82
- max: 5,
83
- default: 0
84
- },
85
- categories: [{
86
- type: mongoose.Schema.Types.ObjectId,
87
- ref: 'SupplierCategory'
88
- }],
89
- notes: String,
90
- purchaseHistory: [{
91
- poNumber: String,
92
- poDate: Date,
93
- amount: Number,
94
- currency: String,
95
- status: {
96
- type: String,
97
- enum: ['pending', 'completed', 'cancelled'],
98
- default: 'pending'
99
- }
100
- }]
101
59
  }, {
102
60
  timestamps: true
103
61
  });