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
|
@@ -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: {
|