@dhyasama/totem-models 9.18.0 → 9.19.1

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.
Files changed (2) hide show
  1. package/lib/Financials.js +13 -0
  2. package/package.json +1 -1
package/lib/Financials.js CHANGED
@@ -745,6 +745,19 @@ module.exports = function(mongoose, config) {
745
745
 
746
746
  };
747
747
 
748
+ Financials.statics.getPassivelyOverdue = function getPassivelyOverdue(cb) {
749
+
750
+ const self = this;
751
+
752
+ const query = self.find({
753
+ 'snapshots.status': { $nin: ['Completed', 'Archived'] },
754
+ 'snapshots.dueOn': { $lte: new Date() }
755
+ });
756
+
757
+ query.exec(cb);
758
+
759
+ };
760
+
748
761
  Financials.statics.removeCustomerFinancials = function removeCustomerFinancials(customerId, cb) {
749
762
 
750
763
  // this is only used to wipe out financials created by the google sheet import process
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "9.18.0",
3
+ "version": "9.19.1",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",