@dhyasama/totem-models 8.60.0 → 8.62.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 -27
- package/package.json +1 -1
package/lib/Financials.js
CHANGED
|
@@ -24,6 +24,8 @@ module.exports = function(mongoose, config) {
|
|
|
24
24
|
|
|
25
25
|
currency: { type: String, required: true, default: 'USD' },
|
|
26
26
|
|
|
27
|
+
fiscalMonthOffset: { type: Number, default: 0 },
|
|
28
|
+
|
|
27
29
|
snapshots: [{
|
|
28
30
|
|
|
29
31
|
uuid: { type: String },
|
|
@@ -600,18 +602,6 @@ module.exports = function(mongoose, config) {
|
|
|
600
602
|
|
|
601
603
|
};
|
|
602
604
|
|
|
603
|
-
Financials.statics.getForCustomer = function getForCustomer(customerId, cb) {
|
|
604
|
-
|
|
605
|
-
var self = this;
|
|
606
|
-
|
|
607
|
-
var query = self.find({
|
|
608
|
-
'customer': customerId
|
|
609
|
-
});
|
|
610
|
-
|
|
611
|
-
query.exec(cb);
|
|
612
|
-
|
|
613
|
-
};
|
|
614
|
-
|
|
615
605
|
Financials.statics.getManagedServicesForReview = function getManagedServicesForReview(customerId, cb) {
|
|
616
606
|
|
|
617
607
|
var self = this;
|
|
@@ -657,21 +647,6 @@ module.exports = function(mongoose, config) {
|
|
|
657
647
|
|
|
658
648
|
};
|
|
659
649
|
|
|
660
|
-
Financials.statics.getToSend = function getToSend(uuid, cb) {
|
|
661
|
-
|
|
662
|
-
var self = this;
|
|
663
|
-
|
|
664
|
-
var query = self.findOne({
|
|
665
|
-
'snapshots.uuid': uuid
|
|
666
|
-
});
|
|
667
|
-
|
|
668
|
-
query.populate('organization', 'name logoUrl');
|
|
669
|
-
query.populate('customer', 'name logoUrl customer.totemUrl');
|
|
670
|
-
|
|
671
|
-
query.exec(cb);
|
|
672
|
-
|
|
673
|
-
};
|
|
674
|
-
|
|
675
650
|
Financials.statics.removeCustomerFinancials = function removeCustomerFinancials(customerId, cb) {
|
|
676
651
|
|
|
677
652
|
// this is only used to wipe out financials created by the google sheet import process
|