Procházet zdrojové kódy

Add cost to invoice list

Neal Wilson před 11 roky
rodič
revize
37e71b4a6f
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1
    1
      config/Windows/invoicelist.xml

+ 1
- 1
config/Windows/invoicelist.xml Zobrazit soubor

6
 		<![CDATA[
6
 		<![CDATA[
7
 			this.windowTitle = "Typica - Invoice List";
7
 			this.windowTitle = "Typica - Invoice List";
8
 			var table = findChildObject(this, 'table');
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
 			table.openEntry.connect(function(arg) {
10
 			table.openEntry.connect(function(arg) {
11
 				var info = createWindow("invoiceinfo");
11
 				var info = createWindow("invoiceinfo");
12
 				info.setInvoiceID(arg);
12
 				info.setInvoiceID(arg);

Loading…
Zrušit
Uložit