소스 검색

Have production trend dashboard only consider approved batches

Neal Wilson 7 년 전
부모
커밋
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();

Loading…
취소
저장