payservedb 10.1.10 → 10.2.0
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
|
@@ -79,7 +79,7 @@ const powerMeterPowerChargeSchema = new mongoose.Schema({
|
|
|
79
79
|
timestamps: true
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
-
powerMeterPowerChargeSchema.index({ facilityId: 1, yearMonth: 1
|
|
82
|
+
powerMeterPowerChargeSchema.index({ facilityId: 1, yearMonth: 1 }, { unique: true });
|
|
83
83
|
|
|
84
84
|
const PowerMeterPowerCharge = mongoose.model('PowerMeterPowerCharge', powerMeterPowerChargeSchema);
|
|
85
85
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
// Lease security deposit <->
|
|
1
|
+
// Lease security deposit <-> QuickBooks invoice line.
|
|
2
2
|
// Lease deposits have no Deposit document (they are a "Security Deposit" line
|
|
3
|
-
// on the tenant's lease invoice), so this collection records each one
|
|
4
|
-
// separately from levy deposits (quickbooks_deposit_mapping). The
|
|
5
|
-
//
|
|
6
|
-
// qbInvoiceId is the DEPOSIT invoice; the rent invoice stays in
|
|
7
|
-
// quickbooks_invoice_mapping.
|
|
3
|
+
// on the tenant's first lease invoice), so this collection records each one
|
|
4
|
+
// separately from levy deposits (quickbooks_deposit_mapping). The line posts
|
|
5
|
+
// to the "security_deposit_lease" Item, which must be a Liability.
|
|
8
6
|
const mongoose = require("mongoose");
|
|
9
7
|
|
|
10
8
|
const quickBooksLeaseDepositMappingSchema = new mongoose.Schema(
|
|
@@ -16,7 +14,6 @@ const quickBooksLeaseDepositMappingSchema = new mongoose.Schema(
|
|
|
16
14
|
invoiceNumber: { type: String, default: null },
|
|
17
15
|
customerId: { type: mongoose.Schema.Types.ObjectId, ref: "Customer", default: null },
|
|
18
16
|
depositAmount: { type: Number, default: 0 },
|
|
19
|
-
// The deposit invoice in QuickBooks (not the rent invoice).
|
|
20
17
|
qbInvoiceId: { type: String, trim: true, default: null },
|
|
21
18
|
// Item the deposit line was posted with (security_deposit_lease mapping).
|
|
22
19
|
qbItemId: { type: String, trim: true, default: null },
|