scheduler-node-models 1.0.114 → 1.0.115
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/package.json
CHANGED
@@ -386,16 +386,16 @@ class ChargeStatusReport extends general_1.Report {
|
|
386
386
|
// this branch will add only the forecast data formulas to the statistics. It
|
387
387
|
// will first find the correct row based on the labor code, then determine the
|
388
388
|
// fill style to use, then add the formula. Columns H to K
|
389
|
-
let
|
390
|
-
for (let r = 3; r <= statsRow &&
|
389
|
+
let srow = 0;
|
390
|
+
for (let r = 3; r <= statsRow && srow === 0; r++) {
|
391
391
|
const cell = stats.getCell(r, 1);
|
392
392
|
if (cell.text.toLowerCase() === codeText.toLowerCase()) {
|
393
|
-
|
393
|
+
srow = r;
|
394
394
|
}
|
395
395
|
}
|
396
396
|
// row greater than zero means the labor code was found and
|
397
|
-
if (
|
398
|
-
const bLight = (
|
397
|
+
if (srow > 0) {
|
398
|
+
const bLight = (srow % 2) === 0;
|
399
399
|
// forecast information next four columns, total hours, total forecasted
|
400
400
|
// hours, +/- hours, percentage of hours to date.
|
401
401
|
if (bLight) {
|
@@ -405,17 +405,17 @@ class ChargeStatusReport extends general_1.Report {
|
|
405
405
|
style.fill = this.fills.get('ltgreen');
|
406
406
|
}
|
407
407
|
style.numFmt = this.numformats.get('sum');
|
408
|
-
this.setCell(stats, this.getCellID(7,
|
408
|
+
this.setCell(stats, this.getCellID(7, srow), this.getCellID(7, srow), style, totalHours);
|
409
409
|
let formula = `SUMIF(${sheetLabel}!${this.getCellID(5, 5)}:`
|
410
410
|
+ `${this.getCellID(5, row)}, "*${codeText}*", ${sheetLabel}!`
|
411
411
|
+ `${this.getCellID(column, 5)}:${this.getCellID(column, row)})`;
|
412
|
-
this.setCell(stats, this.getCellID(8,
|
412
|
+
this.setCell(stats, this.getCellID(8, srow), this.getCellID(8, srow), style, new general_1.Formula(formula));
|
413
413
|
formula = `${this.getCellID(7, row)} - ${this.getCellID(8, row)}`;
|
414
|
-
this.setCell(stats, this.getCellID(9,
|
414
|
+
this.setCell(stats, this.getCellID(9, srow), this.getCellID(9, srow), style, new general_1.Formula(formula));
|
415
415
|
style.numFmt = this.numformats.get('pct');
|
416
416
|
const oformula = new general_1.Formula(`IFERROR(${this.getCellID(8, row)}/`
|
417
417
|
+ `${this.getCellID(7, row)},"N/A")`);
|
418
|
-
this.setCell(stats, this.getCellID(10,
|
418
|
+
this.setCell(stats, this.getCellID(10, srow), this.getCellID(10, srow), style, oformula);
|
419
419
|
}
|
420
420
|
}
|
421
421
|
}
|