浏览代码

Have production trend dashboard only consider approved batches

Neal Wilson 6 年前
父节点
当前提交
56f8764561
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      config/Windows/navigation.xml

+ 2
- 2
config/Windows/navigation.xml 查看文件

@@ -799,13 +799,13 @@
799 799
         }
800 800
         var outputChangeRow = function(output, query, p1, p2) {
801 801
             var u = unitData();
802
-            query.prepare("SELECT sum(roasted_quantity)/:conversion FROM roasting_log WHERE time > 'now'::date - '" + p1 + " days'::interval");
802
+            query.prepare("SELECT sum(roasted_quantity)/:conversion FROM roasting_log WHERE approval = true AND time > 'now'::date - '" + p1 + " days'::interval");
803 803
             query.bind(":conversion", u.conversion);
804 804
             query.exec();
805 805
             query.next();
806 806
             var current = Number(query.value(0));
807 807
             output.writeTextElement("td", "" + current.toFixed(0) + u.unittext);
808
-            query.prepare("SELECT sum(roasted_quantity)/:conversion FROM roasting_log WHERE time > 'now'::date - '" + p2 + " days'::interval AND time < 'now'::date - '" + p1 + " days'::interval");
808
+            query.prepare("SELECT sum(roasted_quantity)/:conversion FROM roasting_log WHERE approval = true AND time > 'now'::date - '" + p2 + " days'::interval AND time < 'now'::date - '" + p1 + " days'::interval");
809 809
             query.bind(":conversion", u.conversion);
810 810
             query.exec();
811 811
             query.next();

正在加载...
取消
保存