소스 검색

Add reason to loss transaction lines and customer to sale transaction lines in item transactions report.

Neal Wilson 9 년 전
부모
커밋
7059429b7a
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5
    1
      config/Reports/itemtransactions.xml

+ 5
- 1
config/Reports/itemtransactions.xml 파일 보기

@@ -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
 						}

Loading…
취소
저장