@dhyasama/totem-models 8.91.0 → 8.93.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/Account.js CHANGED
@@ -216,6 +216,20 @@ module.exports = function(mongoose, config) {
216
216
 
217
217
  };
218
218
 
219
+ Account.statics.getAccountsByCustomer = function (cb) {
220
+
221
+ const self = this;
222
+
223
+ if (!cb) { throw new Error('cb is required'); }
224
+
225
+ self
226
+ .find({'active': true})
227
+ .populate('person')
228
+ .populate('org')
229
+ .exec(cb);
230
+
231
+ };
232
+
219
233
  Account.statics.listAllAccounts = function (options, cb) {
220
234
 
221
235
  // This is only for worker
package/lib/Financials.js CHANGED
@@ -131,8 +131,7 @@ module.exports = function(mongoose, config) {
131
131
  company: {
132
132
 
133
133
  email: {
134
- subject: { type: String, trim: true },
135
- body: { type: String, trim: true }
134
+ subject: { type: String, trim: true }
136
135
  },
137
136
 
138
137
  sendTo: [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "8.91.0",
3
+ "version": "8.93.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",