OSDN Git Service

報告書の戦果に予測を表示する
authorKazuhiro Fujieda <fujieda@users.osdn.me>
Sat, 22 Feb 2020 04:55:08 +0000 (13:55 +0900)
committerKazuhiro Fujieda <fujieda@users.osdn.me>
Sat, 22 Feb 2020 04:56:05 +0000 (13:56 +0900)
LogViewer/tags.tag

index 4d1fbd4..6e82122 100644 (file)
@@ -997,6 +997,12 @@ this.calcResult = function(data) {
         lastDate = date;
         lastExp = exp;
     }
+    if (lastDate.isBefore(endOfMonth)) {
+        var eom = endOfMonth.format("YYYY-MM");
+        var ave = (perMonth - carryOverAch) / lastDate.date();
+        var estimate = perMonth + ave * (endOfMonth.date() - lastDate.date());
+        this.result[eom].push([endOfMonth.format("YYYY-MM-DD 予測"), ave.toFixed(1) + " 平均", estimate.toFixed(1) + " 予測", monthEo + " 合計", (estimate + monthEo).toFixed(1) + " 予測"]);
+    }
 };
 
 this.calcChartData = function() {