@dhyasama/totem-models 7.54.0 → 7.55.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
@@ -295,7 +295,8 @@ module.exports = function(mongoose, config) {
295
295
  $elemMatch: {
296
296
  'notifications.company.sendTo': { $gt: [] },
297
297
  'notifications.company.reminders.sendOn': { $lte: now },
298
- 'notifications.company.reminders.sentOn': null
298
+ 'notifications.company.reminders.sentOn': null,
299
+ 'submittedOn': null
299
300
  }
300
301
  }
301
302
  });
@@ -317,8 +318,9 @@ module.exports = function(mongoose, config) {
317
318
  var hasRecipients = snapshot.notifications.company.sendTo.length > 0;
318
319
  var hasSendOnLessThanNow = sendOnLessThanNow;
319
320
  var hasNotBeenSentTo = sendOnLessThanNow && !sendOnLessThanNow.sentOn;
321
+ var hasNotBeenSubmitted = snapshot.submittedOn;
320
322
 
321
- return hasRecipients && hasSendOnLessThanNow && hasNotBeenSentTo;
323
+ return hasRecipients && hasSendOnLessThanNow && hasNotBeenSentTo && hasNotBeenSubmitted;
322
324
 
323
325
  });
324
326
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "7.54.0",
3
+ "version": "7.55.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",