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
 					for(var i = 0;  i < unroastedList.length; i++)
138
 					for(var i = 0;  i < unroastedList.length; i++)
139
 					{
139
 					{
140
 						var greensQuery = new QSqlQuery();
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
 						greensQuery.bind(":id", Number(unroastedList[i]));
142
 						greensQuery.bind(":id", Number(unroastedList[i]));
143
 						greensQuery.exec();
143
 						greensQuery.exec();
144
 						if(i != 0)
144
 						if(i != 0)
146
 							output.writeEmptyElement("br");
146
 							output.writeEmptyElement("br");
147
 						}
147
 						}
148
 						greensQuery.next();
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
 					output.writeEndElement();
151
 					output.writeEndElement();
152
 					switch(unitBox.currentIndex)
152
 					switch(unitBox.currentIndex)

Loading…
Cancel
Save