@dhyasama/totem-models 11.140.0 → 11.142.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 +19 -2
- package/package.json +1 -1
package/lib/Financials.js
CHANGED
|
@@ -81,7 +81,7 @@ module.exports = function(mongoose, config) {
|
|
|
81
81
|
|
|
82
82
|
approval:{ type: Boolean, default: false },
|
|
83
83
|
|
|
84
|
-
status: { type: String, enum: ['
|
|
84
|
+
status: { type: String, enum: ['Scheduled', 'Delivered', 'Opened', 'Overdue', 'Skipped', 'Pending', 'Completed', 'Archived'] },
|
|
85
85
|
|
|
86
86
|
year: { type: Number, default: 0 },
|
|
87
87
|
period: { type: String, enum: ['FY', 'H1', 'H2', 'Q1', 'Q2', 'Q3', 'Q4', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] },
|
|
@@ -135,6 +135,24 @@ module.exports = function(mongoose, config) {
|
|
|
135
135
|
row: { type: Number },
|
|
136
136
|
col: { type: Number },
|
|
137
137
|
sheet: { type: String }
|
|
138
|
+
},
|
|
139
|
+
calculation: {
|
|
140
|
+
_id: false,
|
|
141
|
+
description: { type: String, trim: true },
|
|
142
|
+
positions: [{
|
|
143
|
+
_id: false,
|
|
144
|
+
page: { type: Number },
|
|
145
|
+
bbox: {
|
|
146
|
+
_id: false,
|
|
147
|
+
top: { type: Number },
|
|
148
|
+
left: { type: Number },
|
|
149
|
+
width: { type: Number },
|
|
150
|
+
height: { type: Number }
|
|
151
|
+
},
|
|
152
|
+
row: { type: Number },
|
|
153
|
+
col: { type: Number },
|
|
154
|
+
sheet: { type: String }
|
|
155
|
+
}]
|
|
138
156
|
}
|
|
139
157
|
},
|
|
140
158
|
verified: { type: Boolean, default: false },
|
|
@@ -1226,7 +1244,6 @@ module.exports = function(mongoose, config) {
|
|
|
1226
1244
|
else if(isDelivered && isOpened) snapshot.status = 'Opened';
|
|
1227
1245
|
else if(isDelivered) snapshot.status = 'Delivered';
|
|
1228
1246
|
else if(isScheduled) snapshot.status = 'Scheduled'; // when a snapshot is scheduled, but not yet sent (checks every 5 minutes)
|
|
1229
|
-
else snapshot.status = 'Created';
|
|
1230
1247
|
|
|
1231
1248
|
});
|
|
1232
1249
|
|