payservedb 9.1.5 → 9.1.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": "9.1.5",
3
+ "version": "9.1.6",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -46,6 +46,18 @@ const powerInvoiceSchema = new mongoose.Schema(
46
46
  // Positive = arrears carried forward; Negative = credit from overpayment
47
47
  },
48
48
 
49
+ withholdingTaxes: [
50
+ {
51
+ name: { type: String, required: true }, // e.g. "withholding"
52
+ percentage: { type: Number, required: true }, // e.g. 5
53
+ amount: { type: Number, required: true }, // e.g. 50 (subTotal * percentage / 100)
54
+ },
55
+ ],
56
+ totalWithholdingTax: {
57
+ type: Number,
58
+ default: 0,
59
+ },
60
+
49
61
  // ── Biller Address ─────────────────────────────────────────────────────────
50
62
  // Reference to the BillerAddress document configured in PowerMeterSettings.
51
63
  // The sub-document below is a denormalised snapshot captured at invoice time.
@@ -70,6 +70,17 @@ const waterInvoiceSchema = new mongoose.Schema(
70
70
  enum: ['mobile', 'bank', 'cash', 'mixed'],
71
71
  default: null
72
72
  },
73
+ withholdingTaxes: [
74
+ {
75
+ name: { type: String, required: true }, // e.g. "withholding"
76
+ percentage: { type: Number, required: true }, // e.g. 5
77
+ amount: { type: Number, required: true }, // e.g. 50 (subTotal * percentage / 100)
78
+ },
79
+ ],
80
+ totalWithholdingTax: {
81
+ type: Number,
82
+ default: 0,
83
+ },
73
84
 
74
85
  // Biller Address Information
75
86
  billerAddress: {
@@ -151,6 +151,12 @@ const waterMeterSettingsSchema = new mongoose.Schema({
151
151
  max: 100,
152
152
  default: 0
153
153
  },
154
+ withholdingTaxPercentage: {
155
+ type: Number,
156
+ min: 0,
157
+ max: 100,
158
+ default: 0
159
+ },
154
160
 
155
161
  // Payment methods
156
162
  paymentMethods: {