@dhyasama/totem-models 10.14.1 → 10.16.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/Investment.js CHANGED
@@ -32,7 +32,6 @@ module.exports = function(mongoose, config) {
32
32
  raised: { type: Number, required: false },
33
33
  premoney: { type: Number, required: false },
34
34
  postmoney: { type: Number, required: false },
35
- pricePerShare: { type: Number, required: false },
36
35
  documents: { type: String, trim: true, required: false },
37
36
 
38
37
  // Catch-all for customer specific key-value pairs from sheet that aren't supported by our schema
@@ -115,8 +115,7 @@ module.exports = function(mongoose, config) {
115
115
  },
116
116
  private: [{
117
117
  customer: { type: Schema.ObjectId, ref: 'Organization' },
118
- closedOn: { type: Date, default: null },
119
- hasZeroUnrealizedValue: { type: Boolean, default: false }
118
+ closedOn: { type: Date, default: null }
120
119
  }]
121
120
  },
122
121
 
@@ -829,21 +828,6 @@ module.exports = function(mongoose, config) {
829
828
 
830
829
  });
831
830
 
832
- Organization.virtual('operating.closed.hasZeroUnrealizedValue').get(function () {
833
-
834
- const self = this;
835
- const publicData = self.operating.closed.public || {};
836
- const privateData = self.operating.closed.private || [];
837
-
838
- if (publicData.closedOn) return false;
839
- else if (privateData.length >= 1) {
840
- if (privateData[0].hasZeroUnrealizedValue) return privateData[0].hasZeroUnrealizedValue;
841
- else return null;
842
- }
843
- else return null;
844
-
845
- });
846
-
847
831
  Organization.virtual('operating.acquired.amount').get(function () {
848
832
 
849
833
  const self = this;
@@ -926,8 +910,7 @@ module.exports = function(mongoose, config) {
926
910
  if (self.ipo && self.ipo.ticker) return 'IPO';
927
911
  else if (self.operating && self.operating.acquired && (self.operating.acquired.by || self.operating.acquired.on)) return 'Acquired';
928
912
  else if (self.operating && self.operating.merged && (self.operating.merged.with || self.operating.merged.on)) return 'Merged';
929
- else if (self.operating && self.operating.closed && (self.operating.closed.on && !self.operating.closed.hasZeroUnrealizedValue)) return 'Shutdown';
930
- else if (self.operating && self.operating.closed && (!self.operating.closed.on && self.operating.closed.hasZeroUnrealizedValue)) return 'Inactive';
913
+ else if (self.operating && self.operating.closed && (self.operating.closed.on)) return 'Shutdown';
931
914
  else return 'Active';
932
915
 
933
916
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "10.14.1",
3
+ "version": "10.16.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",