payservedb 3.3.0 → 3.3.2

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": "3.3.0",
3
+ "version": "3.3.2",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -14,7 +14,6 @@ const serviceVendorSchema = new mongoose.Schema({
14
14
  },
15
15
  dates: {
16
16
  type: [Date],
17
- required: true,
18
17
  },
19
18
  assignedAssets: [{
20
19
  type: mongoose.Schema.Types.ObjectId,
@@ -31,6 +31,9 @@ const serviceRequestSchema = new mongoose.Schema({
31
31
  type: mongoose.Schema.Types.ObjectId,
32
32
  ref: 'VasVendor'
33
33
  },
34
+ unit: {
35
+ type: String,
36
+ },
34
37
  frequency: {
35
38
  type: String,
36
39
  },
@@ -2,6 +2,11 @@ const mongoose = require('mongoose');
2
2
 
3
3
  // Define the schema for VasInvoices
4
4
  const vasInvoiceSchema = new mongoose.Schema({
5
+ invoiceNumber: {
6
+ type: String,
7
+ required: true,
8
+ unique: true,
9
+ },
5
10
  facilityId: {
6
11
  type: mongoose.Schema.Types.ObjectId,
7
12
  required: true
@@ -14,10 +19,29 @@ const vasInvoiceSchema = new mongoose.Schema({
14
19
  type: mongoose.Schema.Types.ObjectId,
15
20
  required: true
16
21
  },
22
+ dueDate: {
23
+ type: Date,
24
+ required: true,
25
+ },
26
+ invoiceNote: {
27
+ type: String,
28
+ default: null,
29
+ },
17
30
  status: {
18
31
  type: String,
19
32
  required: true,
20
- enum: ['Pending', 'Paid', 'Cancelled', 'Overdue'], // Example of possible statuses, can be adjusted as needed
33
+ enum: ['Pending', 'Paid', 'Cancelled', 'Overdue'],
34
+ },
35
+ unit: {
36
+ type: String,
37
+ required: true
38
+ },
39
+ subTotal: {
40
+ type: Number,
41
+ required: true,
42
+ },
43
+ tax: {
44
+ type: Number,
21
45
  },
22
46
  amount: {
23
47
  type: Number