Typica is a free program for professional coffee roasters. https://typica.us
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

invoiceinfo.xml 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <window id="invoiceinfo">
  2. <layout type="vertical">
  3. <layout type="horizontal">
  4. <label>Date:</label>
  5. <line id="date" writable="false" />
  6. <label>Vendor:</label>
  7. <line id="vendor" writable="false" />
  8. <label>Invoice:</label>
  9. <line id="invoice" writable="false" />
  10. <button id="edit" name="Edit" type="push" />
  11. </layout>
  12. <sqlview id="itemtable" />
  13. </layout>
  14. <program>
  15. <![CDATA[
  16. var window = this;
  17. var table = findChildObject(this, 'itemtable');
  18. this.setInvoiceID = function(arg) {
  19. window.invoiceID = arg;
  20. window.windowTitle = "Typica - Invoice Details " + arg;
  21. };
  22. button = findChildObject(this, 'edit');
  23. button.clicked.connect(function() {
  24. var editInvoiceDetails = createWindow("editinvoice");
  25. editInvoiceDetails.invoiceID = window.invoiceID;
  26. var invoiceLine = findChildObject(editInvoiceDetails, 'invoice');
  27. var localInvoiceLine = findChildObject(window, 'invoice');
  28. invoiceLine.text = localInvoiceLine.text;
  29. editInvoiceDetails.invoiceID = window.invoiceID;
  30. });
  31. table.openEntryRow.connect(function(arg) {
  32. if(table.data(arg, 0) == 'PURCHASE') {
  33. var itemWindow = createWindow("invoiceitemdetail");
  34. itemWindow.rowData = [];
  35. for(var i = 0; i < 8; i++) {
  36. itemWindow.rowData[i] = table.data(arg, i);
  37. }
  38. itemWindow.dataSet();
  39. }
  40. else {
  41. var feeWindow = createWindow("invoicefeedetail");
  42. feeWindow.rowData = [];
  43. for(var i = 0; i < 8; i++) {
  44. feeWindow.rowData[i] = table.data(arg, i);
  45. }
  46. feeWindow.dataSet();
  47. }
  48. });
  49. ]]>
  50. </program>
  51. </window>