Neal Wilson 7 年之前
父節點
當前提交
0ad0d3b8fd
共有 4 個文件被更改,包括 20 次插入2 次删除
  1. 5
    1
      config/Reports/invchange.xml
  2. 4
    0
      config/Reports/inventory.xml
  3. 5
    1
      config/Reports/itemtransactions.xml
  4. 6
    0
      config/Windows/navigation.xml

+ 5
- 1
config/Reports/invchange.xml 查看文件

@@ -232,6 +232,10 @@
232 232
 				query = query.invalidate();
233 233
 			}
234 234
 			refresh();
235
+            var notifier = Application.subscribe("transactionschange");
236
+            notifier.notify.connect(function() {
237
+                refresh();
238
+            });
235 239
 			dateSelect.rangeUpdated.connect(function() {
236 240
 				refresh();
237 241
 			});
@@ -242,4 +246,4 @@
242 246
 			});
243 247
 		]]>
244 248
 	</program>
245
-</window>
249
+</window>

+ 4
- 0
config/Reports/inventory.xml 查看文件

@@ -187,6 +187,10 @@
187 187
                 buffer.close();
188 188
             }
189 189
             refresh();
190
+            var notifier = Application.subscribe("transactionschange");
191
+            notifier.notify.connect(function() {
192
+                refresh();
193
+            });
190 194
             sortBox['currentIndexChanged(int)'].connect(function() {
191 195
                 QSettings.setValue("inventory_sort", sortBox.currentIndex);
192 196
                 refresh();

+ 5
- 1
config/Reports/itemtransactions.xml 查看文件

@@ -321,6 +321,10 @@
321 321
             if(itemBox.currentData() > 0) {
322 322
                 refresh();
323 323
             }
324
+            var notifier = Application.subscribe("transactionschange");
325
+            notifier.notify.connect(function() {
326
+                refresh();
327
+            });
324 328
             /* Open invoices */
325 329
             var openInvoice = function(url) {
326 330
                 var arg = url.slice(1, url.length);
@@ -370,4 +374,4 @@
370 374
             });
371 375
         ]]>
372 376
     </program>
373
-</window>
377
+</window>

+ 6
- 0
config/Windows/navigation.xml 查看文件

@@ -331,6 +331,12 @@
331 331
             query.exec("CREATE OR REPLACE FUNCTION notify_invoices_changed() RETURNS trigger AS $$ BEGIN NOTIFY InvoicesChange; RETURN NULL; END; $$ LANGUAGE plpgsql");
332 332
             query.exec("CREATE TRIGGER nofify_invoices_changed AFTER INSERT OR UPDATE OR DELETE ON invoices FOR EACH STATEMENT EXECUTE PROCEDURE notify_invoices_changed()");
333 333
             query.exec("CREATE TRIGGER notify_invoices_changed AFTER INSERT OR UPDATE OR DELETE ON invoice_items FOR EACH STATEMENT EXECUTE PROCEDURE notify_invoices_changed()");
334
+            query.exec("CREATE TRIGGER notify_transactions_changed AFTER INSERT OR UPDATE OR DELETE ON inventory FOR EACH STATEMENT EXECUTE PROCEDURE notify_transactions_changed()");
335
+            query.exec("CREATE TRIGGER notify_transactions_changed AFTER INSERT OR UPDATE OR DELETE ON loss FOR EACH STATEMENT EXECUTE PROCEDURE notify_transactions_changed()");
336
+            query.exec("CREATE TRIGGER notify_transactions_changed AFTER INSERT OR UPDATE OR DELETE ON make FOR EACH STATEMENT EXECUTE PROCEDURE notify_transactions_changed()");
337
+            query.exec("CREATE TRIGGER notify_transactions_changed AFTER INSERT OR UPDATE OR DELETE ON purchase FOR EACH STATEMENT EXECUTE PROCEDURE notify_transactions_changed()");
338
+            query.exec("CREATE TRIGGER notify_transactions_changed AFTER INSERT OR UPDATE OR DELETE ON sale FOR EACH STATEMENT EXECUTE PROCEDURE notify_transactions_changed()");
339
+            query.exec("CREATE TRIGGER notify_transactions_changed AFTER INSERT OR UPDATE OR DELETE ON use FOR EACH STATEMENT EXECUTE PROCEDURE notify_transactions_changed()");
334 340
             
335 341
             query.exec("UPDATE TypicaFeatures SET version = 8 WHERE feature = 'base-features'");
336 342
             query = query.invalidate();

Loading…
取消
儲存