Neal Wilson 7 years ago
parent
commit
0ad0d3b8fd

+ 5
- 1
config/Reports/invchange.xml View File

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

+ 4
- 0
config/Reports/inventory.xml View File

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

+ 5
- 1
config/Reports/itemtransactions.xml View File

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

+ 6
- 0
config/Windows/navigation.xml View File

331
             query.exec("CREATE OR REPLACE FUNCTION notify_invoices_changed() RETURNS trigger AS $$ BEGIN NOTIFY InvoicesChange; RETURN NULL; END; $$ LANGUAGE plpgsql");
331
             query.exec("CREATE OR REPLACE FUNCTION notify_invoices_changed() RETURNS trigger AS $$ BEGIN NOTIFY InvoicesChange; RETURN NULL; END; $$ LANGUAGE plpgsql");
332
             query.exec("CREATE TRIGGER nofify_invoices_changed AFTER INSERT OR UPDATE OR DELETE ON invoices FOR EACH STATEMENT EXECUTE PROCEDURE notify_invoices_changed()");
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
             query.exec("CREATE TRIGGER notify_invoices_changed AFTER INSERT OR UPDATE OR DELETE ON invoice_items FOR EACH STATEMENT EXECUTE PROCEDURE notify_invoices_changed()");
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
             query.exec("UPDATE TypicaFeatures SET version = 8 WHERE feature = 'base-features'");
341
             query.exec("UPDATE TypicaFeatures SET version = 8 WHERE feature = 'base-features'");
336
             query = query.invalidate();
342
             query = query.invalidate();

Loading…
Cancel
Save