Typica is a free program for professional coffee roasters. https://typica.us
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <window id="invoicefeedetail">
  2. <layout type="vertical">
  3. <layout type="grid">
  4. <row>
  5. <column><label>Description</label></column>
  6. <column><line id="description" /></column>
  7. </row>
  8. <row>
  9. <column><label>Cost</label></column>
  10. <column><line id="cost" validator="numeric"/></column>
  11. </row>
  12. </layout>
  13. <button name="submit" type="push" id="submit" />
  14. </layout>
  15. <program>
  16. <![CDATA[
  17. window = this;
  18. var invoiceID = 0;
  19. this.windowTitle = TTR("invoicefeedetail", "Typica - Fee Detail");
  20. var descField = findChildObject(this, 'description');
  21. var costField = findChildObject(this, 'cost');
  22. this.dataSet = function() {
  23. descField.text = window.rowData[2];
  24. costField.text = window.rowData[7];
  25. invoiceID = window.invoiceID;
  26. };
  27. button = findChildObject(this, 'submit');
  28. button.clicked.connect(function() {
  29. var query = new QSqlQuery();
  30. query.prepare("UPDATE invoice_items SET description = :name, cost = :cost WHERE invoice_id = :id AND record_type = 'FEE' AND description = :oldname AND cost = :oldcost");
  31. query.bind(":name", descField.text);
  32. query.bind(":cost", Number(costField.text));
  33. query.bind(":id", Number(invoiceID));
  34. query.bind(":oldname", window.rowData[2]);
  35. query.bind(":oldcost", window.rowData[7]);
  36. query.exec();
  37. query = query.invalidate();
  38. window.pWindow.refresh();
  39. window.close();
  40. });
  41. ]]>
  42. </program>
  43. </window>