1234567891011121314151617 |
- <window id="history">
- <layout type="vertical">
- <sqlview id="table" />
- </layout>
- <program>
- <![CDATA[
- var q = "SELECT time, machine, (SELECT name FROM items WHERE id = roasted_id) AS name, unroasted_total_quantity AS green, roasted_quantity AS roasted, ((unroasted_total_quantity - roasted_quantity) / unroasted_total_quantity * 100::numeric)::numeric(12,2) AS weight_loss, duration, annotation FROM roasting_log ORDER BY time DESC";
- var table = findChildObject(this, 'table');
- table.setQuery(q);
- table.hideColumn(1);
- table.openEntryRow.connect(function(arg) {
- var details = createWindow("batchDetails");
- details.loadData(table, arg);
- });
- ]]>
- </program>
- </window>
|