Sfoglia il codice sorgente

Add cost to invoice list

Neal Wilson 9 anni fa
parent
commit
37e71b4a6f
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1
    1
      config/Windows/invoicelist.xml

+ 1
- 1
config/Windows/invoicelist.xml Vedi File

@@ -6,7 +6,7 @@
6 6
 		<![CDATA[
7 7
 			this.windowTitle = "Typica - Invoice List";
8 8
 			var table = findChildObject(this, 'table');
9
-			table.setQuery("SELECT id, time, invoice, vendor FROM invoices ORDER BY time DESC");
9
+			table.setQuery("SELECT id, time, invoice, vendor, (SELECT sum(cost) FROM invoice_items WHERE invoice_id = id) AS cost FROM invoices ORDER BY time DESC");
10 10
 			table.openEntry.connect(function(arg) {
11 11
 				var info = createWindow("invoiceinfo");
12 12
 				info.setInvoiceID(arg);

Loading…
Annulla
Salva