|
@@ -47,7 +47,10 @@
|
47
|
47
|
output.writeStartElement("head");
|
48
|
48
|
output.writeTextElement("title", "Item Transactions");
|
49
|
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
|
54
|
output.writeEndElement();
|
52
|
55
|
output.writeStartElement("style");
|
53
|
56
|
output.writeAttribute("type", "text/css");
|
|
@@ -167,7 +170,10 @@
|
167
|
170
|
output.writeTextElement("script", chartData);
|
168
|
171
|
|
169
|
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
|
177
|
output.writeEndElement();
|
172
|
178
|
|
173
|
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)");
|