@dhyasama/totem-models 10.63.1 → 10.65.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/Financials.js CHANGED
@@ -477,7 +477,8 @@ module.exports = function(mongoose, config) {
477
477
  $project: {
478
478
  _id: 1,
479
479
  snapshot: '$snapshots',
480
- document: '$snapshots.documents'
480
+ document: '$snapshots.documents',
481
+ organization: '$organization',
481
482
  }
482
483
  }
483
484
  ]).exec(function(err, result) {
@@ -1475,6 +1475,10 @@ module.exports = function(mongoose, config) {
1475
1475
 
1476
1476
  };
1477
1477
 
1478
+ Organization.statics.findByDocument = function findByDocument(id, cb) {
1479
+ this.findOne({ 'documents': id }).exec(cb);
1480
+ };
1481
+
1478
1482
  Organization.statics.findByTotemUrl = function findByTotemUrl(url, cb) {
1479
1483
  this.findOne({ 'customer.totemUrl': url }).exec(cb);
1480
1484
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "10.63.1",
3
+ "version": "10.65.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",