@dhyasama/totem-models 9.37.0 → 9.39.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/lib/LimitedPartner.js +2 -28
- package/package.json +1 -1
package/lib/LimitedPartner.js
CHANGED
|
@@ -43,6 +43,7 @@ module.exports = function(mongoose, config) {
|
|
|
43
43
|
amount: { type: Number, default: 0 },
|
|
44
44
|
date: { type: Date, default: null },
|
|
45
45
|
description: { type: String, default: '' },
|
|
46
|
+
entity: { type: String, enum: ['gp', 'lp'] }
|
|
46
47
|
}],
|
|
47
48
|
|
|
48
49
|
contact: {
|
|
@@ -191,39 +192,12 @@ module.exports = function(mongoose, config) {
|
|
|
191
192
|
_id: transaction.fund._id,
|
|
192
193
|
name: transaction.fund.name,
|
|
193
194
|
shortName: transaction.fund.shortName,
|
|
194
|
-
abbreviation: transaction.fund.abbreviation
|
|
195
|
-
commitment: 0,
|
|
196
|
-
contribution: 0,
|
|
197
|
-
distribution: 0,
|
|
198
|
-
fee: 0,
|
|
199
|
-
expense: 0,
|
|
200
|
-
carry: 0,
|
|
201
|
-
income: 0,
|
|
202
|
-
realized: 0,
|
|
203
|
-
unrealized: 0
|
|
195
|
+
abbreviation: transaction.fund.abbreviation
|
|
204
196
|
});
|
|
205
|
-
fundMatch = _.last(fundsInvested);
|
|
206
197
|
}
|
|
207
198
|
|
|
208
|
-
// and increment the transaction type by the transaction amount
|
|
209
|
-
fundMatch[transaction.type] += transaction.amount;
|
|
210
|
-
|
|
211
199
|
});
|
|
212
200
|
|
|
213
|
-
// and then make all the values absolute
|
|
214
|
-
_.each(fundsInvested, function(fund) {
|
|
215
|
-
fund.commitment = Math.abs(fund.commitment);
|
|
216
|
-
fund.contribution = Math.abs(fund.contribution);
|
|
217
|
-
fund.distribution = Math.abs(fund.distribution);
|
|
218
|
-
fund.fee = Math.abs(fund.fee);
|
|
219
|
-
fund.expense = Math.abs(fund.expense);
|
|
220
|
-
fund.carry = Math.abs(fund.carry);
|
|
221
|
-
fund.income = Math.abs(fund.income);
|
|
222
|
-
fund.realized = Math.abs(fund.realized);
|
|
223
|
-
fund.unrealized = Math.abs(fund.unrealized);
|
|
224
|
-
fund.balance = Math.abs(fund.balance);
|
|
225
|
-
});
|
|
226
|
-
|
|
227
201
|
return fundsInvested;
|
|
228
202
|
|
|
229
203
|
});
|