Neal Wilson 9 years ago
parent
commit
e1c8116496
1 changed files with 8 additions and 2 deletions
  1. 8
    2
      config/Reports/itemtransactions.xml

+ 8
- 2
config/Reports/itemtransactions.xml View File

47
 				output.writeStartElement("head");
47
 				output.writeStartElement("head");
48
 				output.writeTextElement("title", "Item Transactions");
48
 				output.writeTextElement("title", "Item Transactions");
49
 				output.writeStartElement("script");
49
 				output.writeStartElement("script");
50
-				output.writeAttribute("src", "Scripts/d3.min.js");
50
+				var scriptFile = new QFile(QSettings.value("config") + "/Scripts/d3.min.js");
51
+				scriptFile.open(1);
52
+				output.writeCDATA(scriptFile.readToString());
53
+				scriptFile.close();
51
 				output.writeEndElement();
54
 				output.writeEndElement();
52
 				output.writeStartElement("style");
55
 				output.writeStartElement("style");
53
 				output.writeAttribute("type", "text/css");
56
 				output.writeAttribute("type", "text/css");
167
 					output.writeTextElement("script", chartData);
170
 					output.writeTextElement("script", chartData);
168
 					
171
 					
169
 					output.writeStartElement("script");
172
 					output.writeStartElement("script");
170
-					output.writeAttribute("src", "Scripts/greenusechart.js");
173
+					scriptFile = new QFile(QSettings.value("config") + "/Scripts/greenusechart.js");
174
+					scriptFile.open(1);
175
+					output.writeCDATA(scriptFile.readToString());
176
+					scriptFile.close();
171
 					output.writeEndElement();
177
 					output.writeEndElement();
172
 					
178
 					
173
 					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))) FROM item_history(:item)");

Loading…
Cancel
Save