Pman.Dialog.XtupleJournalEntry.bjs
authorAlan Knowles <alan@roojs.com>
Mon, 23 Dec 2013 09:29:15 +0000 (17:29 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 23 Dec 2013 09:29:15 +0000 (17:29 +0800)
Pman.Dialog.XtupleJournalEntry.js

Pman.Dialog.XtupleJournalEntry.bjs
Pman.Dialog.XtupleJournalEntry.js

index 345d5ac..23596f9 100644 (file)
                             "|xns": "Roo.grid",
                             "items": [
                                 {
+                                    "listeners": {
+                                        "beforeload": "function (_self, options)\n{\n    this.removeAll();\n    if (!_this.form.findField('gltrans_sequence').getValue()) {\n        return false;\n    }\n    options.params.gltrans_sequence = _this.form.findField('gltrans_sequence').getValue();\n}"
+                                    },
                                     "*prop": "dataSource",
-                                    "xtype": "Store",
                                     "remoteSort": true,
+                                    "xtype": "Store",
                                     "|sortInfo": "{ field : 'gltrans_source', direction: 'ASC' }",
                                     "|xns": "Roo.data",
                                     "items": [
index f8c1af6..0c4a9e0 100644 (file)
@@ -248,6 +248,16 @@ Pman.Dialog.XtupleJournalEntry = {
                         dataSource : {
                             xtype: 'Store',
                             xns: Roo.data,
+                            listeners : {
+                                beforeload : function (_self, options)
+                                {
+                                    this.removeAll();
+                                    if (!_this.form.findField('gltrans_sequence').getValue()) {
+                                        return false;
+                                    }
+                                    options.params.gltrans_sequence = _this.form.findField('gltrans_sequence').getValue();
+                                }
+                            },
                             remoteSort : true,
                             sortInfo : { field : 'gltrans_source', direction: 'ASC' },
                             proxy : {