payservedb 9.1.9 → 9.2.1

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 CHANGED
@@ -143,6 +143,7 @@ const models = {
143
143
  Expense: require("./src/models/expense"),
144
144
  ExpenseCategory: require("./src/models/expense_category"),
145
145
  InvoiceSettings: require("./src/models/levy_invoice_settings"),
146
+ DepositSchema: require("./src/models/levy_deposits"),
146
147
  Account: require("./src/models/account"),
147
148
  FacilityPaymentDetails: require("./src/models/facility_payment_details"),
148
149
  DefaultPaymentDetails: require("./src/models/default_payment_details"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "9.1.9",
3
+ "version": "9.2.1",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -118,31 +118,19 @@ const LevyContractSchema = new Schema(
118
118
  default: 0,
119
119
  min: [0, 'Upfront amount cannot be negative']
120
120
  },
121
- // How many months of billing the upfront amount covers. Drives
122
- // how many period invoices get generated (combined with the
123
- // contract's paymentFrequency/collectionFrequency).
124
121
  numberOfMonths: {
125
122
  type: Number,
126
123
  min: [1, 'Number of months must be at least 1']
127
124
  },
128
- // The levy's per-month rate, used to compute each period
129
- // invoice's amount (amountPerMonth * monthsInPeriod, with the
130
- // first period prorated by days if the contract starts mid-month).
131
125
  amountPerMonth: {
132
126
  type: Number,
133
127
  min: [0, 'Amount per month cannot be negative']
134
128
  },
135
- // How the upfront amount was derived on the frontend ('auto'
136
- // = amountPerMonth x numberOfMonths, 'custom' = manually entered
137
- // total). Stored for reference/audit only.
138
129
  calculationMode: {
139
130
  type: String,
140
131
  enum: ['auto', 'custom'],
141
132
  default: 'auto'
142
133
  },
143
- // Legacy fields — superseded by numberOfMonths + the date-range
144
- // period builder, but kept in place since other code may still
145
- // reference them.
146
134
  billingPeriods: {
147
135
  type: [String],
148
136
  default: []