|
@@ -176,7 +176,7 @@
|
176
|
176
|
scriptFile.close();
|
177
|
177
|
output.writeEndElement();
|
178
|
178
|
|
179
|
|
- query.prepare("SELECT time::date, type, quantity / :c1, balance / :c2, (SELECT files FROM roasting_log WHERE roasting_log.time = item_history.time AND item = ANY(unroasted_id)), (SELECT invoice_id FROM invoice_items WHERE item = item_id AND item_history.type = 'PURCHASE'), (SELECT vendor || ' ' || invoice FROM invoices WHERE id = (SELECT invoice_id FROM invoice_items WHERE item = item_id AND item_history.type = 'PURCHASE')), (SELECT name FROM items WHERE id = (SELECT roasted_id FROM roasting_log WHERE roasting_log.time = item_history.time AND item = ANY(unroasted_id))) FROM item_history(:item)");
|
|
179
|
+ query.prepare("SELECT time::date, type, quantity / :c1, balance / :c2, (SELECT files FROM roasting_log WHERE roasting_log.time = item_history.time AND item = ANY(unroasted_id)), (SELECT invoice_id FROM invoice_items WHERE item = item_id AND item_history.type = 'PURCHASE'), (SELECT vendor || ' ' || invoice FROM invoices WHERE id = (SELECT invoice_id FROM invoice_items WHERE item = item_id AND item_history.type = 'PURCHASE')), (SELECT name FROM items WHERE id = (SELECT roasted_id FROM roasting_log WHERE roasting_log.time = item_history.time AND item = ANY(unroasted_id))), customer, reason FROM item_history(:item)");
|
180
|
180
|
switch(unitBox.currentIndex)
|
181
|
181
|
{
|
182
|
182
|
case 0:
|
|
@@ -240,6 +240,10 @@
|
240
|
240
|
output.writeCDATA(query.value(7) + " " + query.value(4));
|
241
|
241
|
output.writeEndElement();
|
242
|
242
|
output.writeEndElement();
|
|
243
|
+ } else if(query.value(1) == "LOSS") {
|
|
244
|
+ output.writeTextElement("td", query.value(9));
|
|
245
|
+ } else if(query.value(1) == "SALE") {
|
|
246
|
+ output.writeTextElement("td", query.value(8));
|
243
|
247
|
} else {
|
244
|
248
|
output.writeTextElement("td", "");
|
245
|
249
|
}
|