Browse Source

Add reference field to green coffees in daily production report.

Neal Wilson 11 years ago
parent
commit
29c20664e8
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      config/Reports/dailyproductiondetail.xml

+ 2
- 2
config/Reports/dailyproductiondetail.xml View File

@@ -138,7 +138,7 @@
138 138
 					for(var i = 0;  i < unroastedList.length; i++)
139 139
 					{
140 140
 						var greensQuery = new QSqlQuery();
141
-						greensQuery.prepare("SELECT name FROM items WHERE id = :id");
141
+						greensQuery.prepare("SELECT name, reference FROM coffees WHERE id = :id");
142 142
 						greensQuery.bind(":id", Number(unroastedList[i]));
143 143
 						greensQuery.exec();
144 144
 						if(i != 0)
@@ -146,7 +146,7 @@
146 146
 							output.writeEmptyElement("br");
147 147
 						}
148 148
 						greensQuery.next();
149
-						output.writeCDATA(greensQuery.value(0) + " (" + unroastedList[i] + ")");
149
+						output.writeCDATA(greensQuery.value(0) + " (" + unroastedList[i] + ")" + (greensQuery.value(1) == "" ? "" : " ref: " + greensQuery.value(1)));
150 150
 					}
151 151
 					output.writeEndElement();
152 152
 					switch(unitBox.currentIndex)

Loading…
Cancel
Save