Pman.Tab.XtupleArAging.bjs
authorAlan Knowles <alan@roojs.com>
Thu, 5 Dec 2013 03:15:15 +0000 (11:15 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 5 Dec 2013 03:15:15 +0000 (11:15 +0800)
Pman.Tab.XtupleArAging.js

Pman.Tab.XtupleArAging.bjs
Pman.Tab.XtupleArAging.js

index 883d028..095add0 100644 (file)
                                             "xtype": "Toolbar",
                                             "*prop": "toolbar",
                                             "items": [
+                                                {
+                                                    "|xns": "Roo.form",
+                                                    "xtype": "ComboBox",
+                                                    "allowBlank": false,
+                                                    "editable": true,
+                                                    "emptyText": "Select custinfo",
+                                                    "forceSelection": true,
+                                                    "listWidth": 400,
+                                                    "loadingText": "Searching...",
+                                                    "minChars": 2,
+                                                    "pageSize": 20,
+                                                    "qtip": "Select Customer",
+                                                    "selectOnFocus": true,
+                                                    "triggerAction": "all",
+                                                    "typeAhead": true,
+                                                    "width": 300,
+                                                    "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{cust_name}</b> </div>",
+                                                    "queryParam": "query[cust_name]",
+                                                    "fieldLabel": "cust_name",
+                                                    "valueField": "cust_id",
+                                                    "displayField": "cust_name",
+                                                    "hiddenName": "cust_id",
+                                                    "name": "cust_name",
+                                                    "items": [
+                                                        {
+                                                            "listeners": {
+                                                                "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
+                                                            },
+                                                            "*prop": "store",
+                                                            "remoteSort": true,
+                                                            "xtype": "Store",
+                                                            "|sortInfo": "{ direction : 'ASC', field: 'shiphead_shipdate' }",
+                                                            "|xns": "Roo.data",
+                                                            "items": [
+                                                                {
+                                                                    "*prop": "proxy",
+                                                                    "xtype": "HttpProxy",
+                                                                    "method": "GET",
+                                                                    "|xns": "Roo.data",
+                                                                    "|url": "baseURL + '/Roo/custinfo.php'"
+                                                                },
+                                                                {
+                                                                    "*prop": "reader",
+                                                                    "xtype": "JsonReader",
+                                                                    "|xns": "Roo.data",
+                                                                    "id": "cust_id",
+                                                                    "root": "data",
+                                                                    "totalProperty": "total",
+                                                                    "|fields": "[{\"name\":\"cust_id\",\"type\":\"int\"},\"cust_name\"]"
+                                                                }
+                                                            ]
+                                                        }
+                                                    ]
+                                                },
                                                 {
                                                     "text": "as Of:",
                                                     "xtype": "TextItem",
index 0d778b2..ff9c3e3 100644 (file)
@@ -232,6 +232,56 @@ Pman.Tab.XtupleArAging = new Roo.XComponent({
                                 xtype: 'Toolbar',
                                 xns: Roo,
                                 items : [
+                                    {
+                                        xtype: 'ComboBox',
+                                        xns: Roo.form,
+                                        allowBlank : false,
+                                        editable : true,
+                                        emptyText : "Select custinfo",
+                                        forceSelection : true,
+                                        listWidth : 400,
+                                        loadingText : "Searching...",
+                                        minChars : 2,
+                                        pageSize : 20,
+                                        qtip : "Select Customer",
+                                        selectOnFocus : true,
+                                        triggerAction : 'all',
+                                        typeAhead : true,
+                                        width : 300,
+                                        tpl : '<div class="x-grid-cell-text x-btn button"><b>{cust_name}</b> </div>',
+                                        queryParam : 'query[cust_name]',
+                                        fieldLabel : 'cust_name',
+                                        valueField : 'cust_id',
+                                        displayField : 'cust_name',
+                                        hiddenName : 'cust_id',
+                                        name : 'cust_name',
+                                        store : {
+                                            xtype: 'Store',
+                                            xns: Roo.data,
+                                            listeners : {
+                                                beforeload : function (_self, o){
+                                                    o.params = o.params || {};
+                                                    // set more here
+                                                }
+                                            },
+                                            remoteSort : true,
+                                            sortInfo : { direction : 'ASC', field: 'shiphead_shipdate' },
+                                            proxy : {
+                                                xtype: 'HttpProxy',
+                                                xns: Roo.data,
+                                                method : 'GET',
+                                                url : baseURL + '/Roo/custinfo.php'
+                                            },
+                                            reader : {
+                                                xtype: 'JsonReader',
+                                                xns: Roo.data,
+                                                id : 'cust_id',
+                                                root : 'data',
+                                                totalProperty : 'total',
+                                                fields : [{"name":"cust_id","type":"int"},"cust_name"]
+                                            }
+                                        }
+                                    },
                                     {
                                         xtype: 'TextItem',
                                         xns: Roo.Toolbar,