Bläddra i källkod

Add person to item transactions report

Neal Wilson 7 år sedan
förälder
incheckning
a11b9483ba
1 ändrade filer med 3 tillägg och 1 borttagningar
  1. 3
    1
      config/Reports/itemtransactions.xml

+ 3
- 1
config/Reports/itemtransactions.xml Visa fil

@@ -222,7 +222,7 @@
222 222
                     }, 0));
223 223
                     output.writeEndElement();
224 224
                     output.writeEndElement();
225
-                    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) WHERE time >= :sd AND time < :ed ::date + interval '1 day'");
225
+                    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, (SELECT person FROM transactions WHERE time = item_history.time AND item = item_history.item) FROM item_history(:item) WHERE time >= :sd AND time < :ed ::date + interval '1 day'");
226 226
                     query.bind(":sd", startDate);
227 227
                     query.bind(":ed", endDate);
228 228
                     switch(unitBox.currentIndex)
@@ -245,6 +245,7 @@
245 245
                     output.writeTextElement("th", TTR("item_transactions", "Quantity"));
246 246
                     output.writeTextElement("th", TTR("item_transactions", "Balance"));
247 247
                     output.writeTextElement("th", TTR("item_transactions", "Record"));
248
+					output.writeTextElement("th", TTR("item_transactions", "Person"));
248 249
                     output.writeEndElement(); // tr
249 250
                     var prev_balance = "0";
250 251
                     var prev_prec = 0;
@@ -297,6 +298,7 @@
297 298
                         } else {
298 299
                             output.writeTextElement("td", "");
299 300
                         }
301
+						output.writeTextElement("td", query.value(10));
300 302
                         output.writeEndElement(); // tr
301 303
                     }
302 304
                     output.writeEndElement(); // table

Laddar…
Avbryt
Spara