payservedb 4.1.3 → 4.1.5
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/index.js +5 -2
- package/package.json +1 -1
- package/src/models/service_charge_invoice_upload.js +43 -0
- package/src/models/service_charge_payments.js +28 -0
- package/src/models/vas_invoices_upload.js +51 -0
- package/src/models/vas_payments.js +25 -0
- package/src/models/water_invoice.js +5 -1
- package/src/models/water_meter_settings.js +17 -0
package/index.js
CHANGED
|
@@ -128,8 +128,11 @@ const models = {
|
|
|
128
128
|
DefaultPaymentDetails: require('./src/models/default_payment_details'),
|
|
129
129
|
Currency: require('./src/models/currency_settings'),
|
|
130
130
|
UserAccount: require('./src/models/user_account'),
|
|
131
|
-
CashPayment: require('./src/models/cashpayment')
|
|
132
|
-
|
|
131
|
+
CashPayment: require('./src/models/cashpayment'),
|
|
132
|
+
VasPayment: require('./src/models/vas_payment'),
|
|
133
|
+
VasInvoicesUpdate: require('./src/models/vas_invoices_upload'),
|
|
134
|
+
ServiceChargePayment: require('./src/models/service_charge_payments'),
|
|
135
|
+
ServiceChargeInvoiceUpload: require('./src/models/service_charge_invoice_upload')
|
|
133
136
|
|
|
134
137
|
};
|
|
135
138
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const mongoose = require("mongoose")
|
|
2
|
+
|
|
3
|
+
const ServiceChargeInvoiceUploadSchema = new mongoose.Schema({
|
|
4
|
+
facilityId: {
|
|
5
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
+
ref: 'Facility',
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
customerId: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
item: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
description: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
quantity: {
|
|
22
|
+
type: Number,
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
rate: {
|
|
26
|
+
type: Number,
|
|
27
|
+
required: true,
|
|
28
|
+
},
|
|
29
|
+
vat: {
|
|
30
|
+
type: Number,
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
account: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: true,
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
const ServiceChargeInvoiceUpload = mongoose.model(
|
|
40
|
+
"ServiceChargeInvoiceUpload",
|
|
41
|
+
ServiceChargeInvoiceUploadSchema
|
|
42
|
+
)
|
|
43
|
+
module.exports = ServiceChargeInvoiceUpload
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const mongoose = require("mongoose");
|
|
2
|
+
|
|
3
|
+
const ServiceChargePaymentSchema = new mongoose.Schema({
|
|
4
|
+
facilityId: {
|
|
5
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
+
ref: 'Facility',
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
customerId: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
amount: {
|
|
14
|
+
type: Number,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
account: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const ServiceChargePayment = mongoose.model(
|
|
24
|
+
"ServiceChargePayment",
|
|
25
|
+
ServiceChargePaymentSchema
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
module.exports = ServiceChargePayment;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
|
|
3
|
+
const VasInvoicesUpdateSchema = new mongoose.Schema({
|
|
4
|
+
facilityId: {
|
|
5
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
+
ref: 'Facility',
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
customerId: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
item: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
description: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
quantity: {
|
|
22
|
+
type: Number,
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
rate: {
|
|
26
|
+
type: Number,
|
|
27
|
+
required: true,
|
|
28
|
+
},
|
|
29
|
+
ammount: {
|
|
30
|
+
type: Number,
|
|
31
|
+
required: true
|
|
32
|
+
},
|
|
33
|
+
vat: {
|
|
34
|
+
type: Number,
|
|
35
|
+
required: true,
|
|
36
|
+
},
|
|
37
|
+
account: {
|
|
38
|
+
type: String,
|
|
39
|
+
required: true,
|
|
40
|
+
},
|
|
41
|
+
class: {
|
|
42
|
+
type: String,
|
|
43
|
+
required: true
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
const VasInvoicesUpdate = mongoose.model(
|
|
48
|
+
'VasInvoicesUpdate',
|
|
49
|
+
VasInvoicesUpdateSchema
|
|
50
|
+
);
|
|
51
|
+
module.exports = VasInvoicesUpdate
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const mongoose = require("mongoose");
|
|
2
|
+
|
|
3
|
+
const VasPaymentSchema = new mongoose.Schema({
|
|
4
|
+
facilityId: {
|
|
5
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
+
ref: 'Facility',
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
customerId: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
amount: {
|
|
14
|
+
type: Number,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
account: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const VasPayment = mongoose.model("VasPayment", VasPaymentSchema);
|
|
24
|
+
|
|
25
|
+
module.exports = VasPayment;
|
|
@@ -50,6 +50,10 @@ const waterMeterSettingsSchema = new mongoose.Schema({
|
|
|
50
50
|
required: true,
|
|
51
51
|
default: 0
|
|
52
52
|
},
|
|
53
|
+
tariffAmountSmart: {
|
|
54
|
+
type: Number,
|
|
55
|
+
default: 0
|
|
56
|
+
},
|
|
53
57
|
fixedTariffAmount: {
|
|
54
58
|
type: Number,
|
|
55
59
|
required: true,
|
|
@@ -58,6 +62,19 @@ const waterMeterSettingsSchema = new mongoose.Schema({
|
|
|
58
62
|
notifications: {
|
|
59
63
|
type: Boolean,
|
|
60
64
|
default: false
|
|
65
|
+
},
|
|
66
|
+
// New fields for notification periods
|
|
67
|
+
dailyNotifications: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: false
|
|
70
|
+
},
|
|
71
|
+
weeklyNotifications: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: false
|
|
74
|
+
},
|
|
75
|
+
allNotifications: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: false
|
|
61
78
|
}
|
|
62
79
|
}, {
|
|
63
80
|
timestamps: true
|