Browse Source

Have production trend dashboard only consider approved batches

Neal Wilson 7 years ago
parent
commit
56f8764561
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      config/Windows/navigation.xml

+ 2
- 2
config/Windows/navigation.xml View File

@@ -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…
Cancel
Save