@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 +2 -1
- package/lib/Organization.js +4 -0
- package/package.json +1 -1
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) {
|
package/lib/Organization.js
CHANGED
|
@@ -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
|
};
|