Fix #7123 - getting abra ready to test
[Pman.Xtuple] / Pman.Tab.XtupleCustomer.bjs
index 51d6e65..4ad7012 100644 (file)
 {
-    "id": "roo-file-48",
-    "name": "Pman.Tab.XtupleCustomer",
-    "parent": "Pman.Tab.XtupleSales",
-    "title": "",
-    "path": "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Tab.XtupleCustomer.bjs",
-    "items": [
+    "name" : "Pman.Tab.XtupleCustomer",
+    "parent" : "Pman.Tab.XtupleSales",
+    "title" : "",
+    "path" : "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Tab.XtupleCustomer.bjs",
+    "permname" : "",
+    "modOrder" : "700",
+    "items" : [
         {
-            "listeners": {
-                "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
+            "listeners" : {
+                "|activate" : "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
             },
-            ".builderCfg": "{\"cols\":[{\"table\":\"custinfo\",\"column\":\"cust_active\",\"columnshort\":\"cust_active\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Active\"},{\"table\":\"custtype\",\"column\":\"cust_custtype_id_custtype_descrip\",\"columnshort\":\"custtype_descrip\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Customer type\"},{\"table\":\"salesrep\",\"column\":\"cust_salesrep_id_salesrep_name\",\"columnshort\":\"salesrep_name\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":0,\"title\":\"Sales Rep\"},{\"table\":\"custinfo\",\"column\":\"cust_name\",\"columnshort\":\"cust_name\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"Name\"}],\"cols_ex\":[\"cust_name\"],\"table\":\"custinfo\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}",
-            "background": true,
-            "fitContainer": true,
-            "fitToframe": true,
-            "region": "center",
-            "tableName": "custinfo",
-            "title": "Customers",
-            "xtype": "GridPanel",
-            "|xns": "Roo",
-            "items": [
+            "fitToframe" : true,
+            "region" : "center",
+            "background" : true,
+            "title" : "Customers",
+            "xtype" : "GridPanel",
+            "fitContainer" : true,
+            "$ xns" : "Roo",
+            "# builderCfg" : "{\"cols\":[{\"table\":\"custinfo\",\"column\":\"cust_active\",\"columnshort\":\"cust_active\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Active\"},{\"table\":\"custtype\",\"column\":\"cust_custtype_id_custtype_descrip\",\"columnshort\":\"custtype_descrip\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Customer type\"},{\"table\":\"salesrep\",\"column\":\"cust_salesrep_id_salesrep_name\",\"columnshort\":\"salesrep_name\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":0,\"title\":\"Sales Rep\"},{\"table\":\"custinfo\",\"column\":\"cust_name\",\"columnshort\":\"cust_name\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"Name\"}],\"cols_ex\":[\"cust_name\"],\"table\":\"custinfo\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}",
+            "tableName" : "custinfo",
+            "items" : [
                 {
-                    "listeners": {
-                        "|render": "function() \n{\n    _this.grid = this; \n    _this.dialog = Pman.Dialog.XtupleCustomer;\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}",
-                        "|rowdblclick": "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {\n        _this.grid.footer.onClick('refresh');\n    }); \n}\n"
+                    "listeners" : {
+                        "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {\n        _this.grid.footer.onClick('refresh');\n    }); \n}\n",
+                        "|render" : "function() \n{\n    _this.grid = this; \n    _this.dialog = Pman.Dialog.XtupleCustomer;\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}"
                     },
-                    "*prop": "grid",
-                    ".builderCfg": "{\"cols\":[{\"table\":\"custinfo\",\"column\":\"cust_active\",\"columnshort\":\"cust_active\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Active\"},{\"table\":\"custtype\",\"column\":\"cust_custtype_id_custtype_descrip\",\"columnshort\":\"custtype_descrip\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Customer type\"},{\"table\":\"salesrep\",\"column\":\"cust_salesrep_id_salesrep_name\",\"columnshort\":\"salesrep_name\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":0,\"title\":\"Sales Rep\"},{\"table\":\"custinfo\",\"column\":\"cust_name\",\"columnshort\":\"cust_name\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"Name\"}],\"cols_ex\":[\"cust_name\"],\"table\":\"custinfo\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}",
-                    "autoExpandColumn": "cust_name",
-                    "loadMask": true,
-                    "xtype": "Grid",
-                    "|xns": "Roo.grid",
-                    "items": [
+                    "autoExpandColumn" : "cust_name",
+                    "xtype" : "Grid",
+                    "loadMask" : true,
+                    "$ xns" : "Roo.grid",
+                    "* prop" : "grid",
+                    "# builderCfg" : "{\"cols\":[{\"table\":\"custinfo\",\"column\":\"cust_active\",\"columnshort\":\"cust_active\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Active\"},{\"table\":\"custtype\",\"column\":\"cust_custtype_id_custtype_descrip\",\"columnshort\":\"custtype_descrip\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Customer type\"},{\"table\":\"salesrep\",\"column\":\"cust_salesrep_id_salesrep_name\",\"columnshort\":\"salesrep_name\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":0,\"title\":\"Sales Rep\"},{\"table\":\"custinfo\",\"column\":\"cust_name\",\"columnshort\":\"cust_name\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"Name\"}],\"cols_ex\":[\"cust_name\"],\"table\":\"custinfo\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}",
+                    "items" : [
                         {
-                            "listeners": {
-                                "beforeload": "function (_self, o)\n{\n    if (!_this.officeCombo) {\n        return false;\n    }\n    \n    o.params = o.params || {};\n    o.params['search[cust_name]'] = _this.searchBox.getValue();\n    if (!_this.activeBtn.pressed) {\n        o.params.cust_active = 1;\n    } \n    var dt = _this.dateSearch.getValue(); \n    if (dt) {\n        o.params['search[orders_since]'] = dt.format('Y-m-d');\n    }\n    dt = _this.dateSearchNo.getValue(); \n    if (dt) {\n        o.params['search[no_orders_since]'] = dt.format('Y-m-d');\n    }\n    \n    o.params['search[with_orders_since]'] = 1; //\n    o.params['search[with_balance]'] = 1;\n    o.params['search[with_address]'] = 1;\n    o.params['_with_char'] = 1;    \n    o.params['_with_group_data'] = 1;\n    o.params['search[_country]'] = _this.country.getValue();\n    o.params._get = 1; // for download\n    \n    o.params['cust_char_internalcompany'] = _this.officeCombo.getValue();\n}"
+                            "listeners" : {
+                                "beforeload" : "function (_self, o)\n{\n    if (!_this.officeCombo) {\n        return false;\n    }\n    \n    o.params = o.params || {};\n    o.params['search[_mix]'] = _this.searchBox.getValue();\n    if (!_this.activeBtn.pressed) {\n        o.params.cust_active = 1;\n        o.params.cust_aropen_active = 1;\n    } \n    var dt = _this.dateSearch.getValue(); \n    if (dt) {\n        o.params['search[orders_since]'] = dt.format('Y-m-d');\n    }\n    dt = _this.dateSearchNo.getValue(); \n    if (dt) {\n        o.params['search[no_orders_since]'] = dt.format('Y-m-d');\n    }\n    \n    o.params['search[with_orders_since]'] = 1; //\n    o.params['search[with_balance]'] = 1;\n    o.params['search[with_address]'] = 1;\n    o.params['_with_char'] = 1;    \n    o.params['_with_group_data'] = 1;\n    o.params['search[_country]'] = _this.country.getValue();\n    o.params._get = 1; // for download\n    \n    o.params['cust_char_internalcompany'] = _this.officeCombo.getValue();\n}"
                             },
-                            "*prop": "dataSource",
-                            "remoteSort": true,
-                            "xtype": "Store",
-                            "|sortInfo": "{ field : 'cust_name', direction: 'ASC' }",
-                            "|xns": "Roo.data",
-                            "items": [
+                            "xtype" : "Store",
+                            "remoteSort" : true,
+                            "$ sortInfo" : "{ field : 'cust_name', direction: 'ASC' }",
+                            "$ xns" : "Roo.data",
+                            "* prop" : "dataSource",
+                            "items" : [
                                 {
-                                    "*prop": "proxy",
-                                    "method": "GET",
-                                    "xtype": "HttpProxy",
-                                    "|url": "baseURL + '/Roo/custinfo.php'",
-                                    "|xns": "Roo.data"
+                                    "$ url" : "baseURL + '/Roo/custinfo.php'",
+                                    "xtype" : "HttpProxy",
+                                    "method" : "GET",
+                                    "$ xns" : "Roo.data",
+                                    "* prop" : "proxy"
                                 },
                                 {
-                                    "|xns": "Roo.data",
-                                    "xtype": "JsonReader",
-                                    "totalProperty": "total",
-                                    "root": "data",
-                                    ".builderCfg": "{\"cols\":[{\"table\":\"custinfo\",\"column\":\"cust_active\",\"columnshort\":\"cust_active\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Active\"},{\"table\":\"custtype\",\"column\":\"cust_custtype_id_custtype_descrip\",\"columnshort\":\"custtype_descrip\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Customer type\"},{\"table\":\"salesrep\",\"column\":\"cust_salesrep_id_salesrep_name\",\"columnshort\":\"salesrep_name\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":0,\"title\":\"Sales Rep\"},{\"table\":\"custinfo\",\"column\":\"cust_name\",\"columnshort\":\"cust_name\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"Name\"}],\"cols_ex\":[\"cust_name\"],\"table\":\"custinfo\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}",
-                                    "*prop": "reader",
-                                    "id": "id",
-                                    "|fields": "[\n    {\n        'name': 'cust_active',\n        'type': 'boolean'\n    },\n    {\n        'name': 'cust_custtype_id_custtype_descrip',\n        'type': 'string'\n    },\n    {\n        'name': 'cust_salesrep_id_salesrep_name',\n        'type': 'string'\n    },\n    {\n        'name': 'cust_name',\n        'type': 'string'\n    }\n]"
+                                    "id" : "id",
+                                    "root" : "data",
+                                    "xtype" : "JsonReader",
+                                    "$ fields" : "[\n    {\n        'name': 'cust_active',\n        'type': 'boolean'\n    },\n    {\n        'name': 'cust_custtype_id_custtype_descrip',\n        'type': 'string'\n    },\n    {\n        'name': 'cust_salesrep_id_salesrep_name',\n        'type': 'string'\n    },\n    {\n        'name': 'cust_name',\n        'type': 'string'\n    }\n]",
+                                    "$ xns" : "Roo.data",
+                                    "* prop" : "reader",
+                                    "# builderCfg" : "{\"cols\":[{\"table\":\"custinfo\",\"column\":\"cust_active\",\"columnshort\":\"cust_active\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Active\"},{\"table\":\"custtype\",\"column\":\"cust_custtype_id_custtype_descrip\",\"columnshort\":\"custtype_descrip\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Customer type\"},{\"table\":\"salesrep\",\"column\":\"cust_salesrep_id_salesrep_name\",\"columnshort\":\"salesrep_name\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":0,\"title\":\"Sales Rep\"},{\"table\":\"custinfo\",\"column\":\"cust_name\",\"columnshort\":\"cust_name\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"Name\"}],\"cols_ex\":[\"cust_name\"],\"table\":\"custinfo\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}",
+                                    "totalProperty" : "total"
                                 }
                             ]
                         },
                         {
-                            "*prop": "footer",
-                            "xtype": "PagingToolbar",
-                            "pageSize": 25,
-                            "displayInfo": true,
-                            "displayMsg": "Displaying custinfo{0} - {1} of {2}",
-                            "emptyMsg": "No custinfo found",
-                            "|xns": "Roo",
-                            "items": [
+                            "pageSize" : 25,
+                            "xtype" : "PagingToolbar",
+                            "emptyMsg" : "No custinfo found",
+                            "$ xns" : "Roo",
+                            "displayInfo" : true,
+                            "displayMsg" : "Displaying custinfo{0} - {1} of {2}",
+                            "* prop" : "footer",
+                            "items" : [
                                 {
-                                    "text": "Upload/Download",
-                                    "xtype": "Button",
-                                    "|xns": "Roo.Toolbar",
-                                    "items": [
+                                    "text" : "Upload/Download",
+                                    "xtype" : "Button",
+                                    "$ xns" : "Roo.Toolbar",
+                                    "items" : [
                                         {
-                                            "|xns": "Roo.menu",
-                                            "xtype": "Menu",
-                                            "*prop": "menu",
-                                            "items": [
+                                            "xtype" : "Menu",
+                                            "$ xns" : "Roo.menu",
+                                            "* prop" : "menu",
+                                            "items" : [
                                                 {
-                                                    "listeners": {
-                                                        "click": "function (_self, e)\n{\n    \n    if (!Pman.hasPerm('Xtuple.CustomerDownload','S')) {\n        Roo.MessageBox.alert(\"Error\", \"Permission Denied\");\n        return;\n    }\n   /* \n    var params = {\n        '_group' : 'customer',\n        '_name' : 'subscribers',\n        'limit' : 99999,\n        'csvTitles' : '*',\n        'csvCols' : '*'\n    };\n    \n    \n    new Pman.Download({\n      url : baseURL + '/Roo/Metasql',\n      params :   params,\n      method : 'GET'\n    });*/\n    \n    new Pman.Download({\n        url : baseURL + '/Roo/custinfo',\n        method : 'GET',\n        params : {\n            cust_subscribed  : 1,\n            limit : 9999\n        }\n        \n    });\n    Roo.MessageBox.alert(\"Notice\", \"Report will download shortly\");\n    \n}"
+                                                    "listeners" : {
+                                                        "click" : "function (_self, e)\n{\n    \n    if (!Pman.hasPerm('Xtuple.CustomerDownload','S')) {\n        Roo.MessageBox.alert(\"Error\", \"Permission Denied\");\n        return;\n    }\n   \n    var params = {\n        '_group' : 'customer',\n        '_name' : 'subscribers',\n        'limit' : 99999,\n        'csvTitles' : '*',\n        'csvCols' : '*'\n    };\n    \n    \n    new Pman.Download({\n      url : baseURL + '/Roo/Metasql',\n      params :   params,\n      method : 'GET'\n    });\n    \n    Roo.MessageBox.alert(\"Notice\", \"Report will download shortly\");\n    \n}"
                                                     },
-                                                    "text": "Download Mailing list subscribers",
-                                                    "xtype": "Item",
-                                                    "|xns": "Roo.menu"
+                                                    "text" : "Download Mailing list subscribers",
+                                                    "xtype" : "Item",
+                                                    "$ xns" : "Roo.menu"
                                                 },
                                                 {
-                                                    "listeners": {
-                                                        "click": "function (_self, e)\n{\n    \n    if (!Pman.hasPerm('Xtuple.CustomerDownload','S')) {\n        Roo.MessageBox.alert(\"Error\", \"Permission Denied\");\n        return;\n    }\n   // _this.grid.ds.proxy.conn.method = 'POST';\n    new Pman.Download({\n        grid : _this.grid\n    });\n    \n}"
+                                                    "listeners" : {
+                                                        "click" : "function (_self, e)\n{\n    \n    if (!Pman.hasPerm('Xtuple.CustomerDownload','S')) {\n        Roo.MessageBox.alert(\"Error\", \"Permission Denied\");\n        return;\n    }\n    _this.grid.ds.proxy.conn.method = 'POST';\n    new Pman.Download({\n        grid : _this.grid\n    });\n    \n}"
                                                     },
-                                                    "text": "Download Customers",
-                                                    "xtype": "Item",
-                                                    "|xns": "Roo.menu"
+                                                    "text" : "Download Customers",
+                                                    "xtype" : "Item",
+                                                    "$ xns" : "Roo.menu"
                                                 },
                                                 {
-                                                    "listeners": {
-                                                        "click": "function (_self, e)\n{\n    \n    if (!Pman.hasPerm('Admin.Admin_Tab','S')) {\n        Roo.MessageBox.alert(\"Error\", \"Permission Denied\");\n        return;\n    }\n    \n    var c = _this.country.getValue();\n    if(!c.length){\n        Roo.MessageBox.alert(\"Error\", \"Please select a country\");\n        return;\n    }\n    \n    new Pman.Download({\n        url : baseURL + '/Roo/custinfo',\n        method : 'GET',\n        params : {\n            _my_json : 1,\n            limit : 9999,\n            'search[_country]' : c,\n            'search[with_address]' : 1\n        }\n        \n    });\n}"
+                                                    "listeners" : {
+                                                        "click" : "function (_self, e)\n{\n    \n    if (!Pman.hasPerm('Admin.Admin_Tab','S')) {\n        Roo.MessageBox.alert(\"Error\", \"Permission Denied\");\n        return;\n    }\n    \n    var c = _this.country.getValue();\n    if(!c.length){\n        Roo.MessageBox.alert(\"Error\", \"Please select a country\");\n        return;\n    }\n    \n    new Pman.Download({\n        url : baseURL + '/Roo/custinfo',\n        method : 'GET',\n        params : {\n            _my_json : 1,\n            limit : 9999,\n            'search[_country]' : c,\n            'search[with_address]' : 1\n        }\n        \n    });\n}"
                                                     },
-                                                    "text": "Download Customers As Json",
-                                                    "xtype": "Item",
-                                                    "|xns": "Roo.menu"
+                                                    "text" : "Download Customers As Json",
+                                                    "xtype" : "Item",
+                                                    "$ xns" : "Roo.menu"
                                                 },
                                                 {
-                                                    "listeners": {
-                                                        "click": "function (_self, e)\n{\n    \n    if (!Pman.hasPerm('Admin.Admin_Tab','S')) {\n        Roo.MessageBox.alert(\"Error\", \"Permission Denied\");\n        return;\n    }\n   \n   Pman.Dialog.Image.show(\n       {\n            _url : baseURL+'/Xtuple/Import/Customers' \n        \n       },\n       function (data) {\n            _this.grid.footer.onClick('first');\n            Roo.MessageBox.alert(\"Notice\", \"DONE\");\n//            Roo.MessageBox.alert(\"Notice\", msg.join(\"\\n\"));\n\n       }\n   );\n    \n}"
+                                                    "listeners" : {
+                                                        "click" : "function (_self, e)\n{\n    \n    if (!Pman.hasPerm('Admin.Admin_Tab','S')) {\n        Roo.MessageBox.alert(\"Error\", \"Permission Denied\");\n        return;\n    }\n   \n   Pman.Dialog.Image.show(\n       {\n            _url : baseURL+'/Xtuple/Import/Customers' \n        \n       },\n       function (data) {\n            _this.grid.footer.onClick('first');\n            Roo.MessageBox.alert(\"Notice\", \"DONE\");\n//            Roo.MessageBox.alert(\"Notice\", msg.join(\"\\n\"));\n\n       }\n   );\n    \n}"
                                                     },
-                                                    "text": "Upload Customers",
-                                                    "xtype": "Item",
-                                                    "|xns": "Roo.menu"
+                                                    "text" : "Upload Customers",
+                                                    "xtype" : "Item",
+                                                    "$ xns" : "Roo.menu"
                                                 },
                                                 {
-                                                    "listeners": {
-                                                        "click": "function (_self, e)\n{\n    \n    if (!Pman.hasPerm('Admin.Admin_Tab','S')) {\n        Roo.MessageBox.alert(\"Error\", \"Permission Denied\");\n        return;\n    }\n   \n   Pman.Dialog.Image.show(\n       {\n            _url : baseURL+'/Xtuple/Import/MyCustomers' \n        \n       },\n       function (data) {\n            _this.grid.footer.onClick('first');\n            Roo.MessageBox.alert(\"Notice\", \"DONE\");\n//            Roo.MessageBox.alert(\"Notice\", msg.join(\"\\n\"));\n\n       }\n   );\n    \n}"
+                                                    "listeners" : {
+                                                        "click" : "function (_self, e)\n{\n    \n    if (!Pman.hasPerm('Admin.Admin_Tab','S')) {\n        Roo.MessageBox.alert(\"Error\", \"Permission Denied\");\n        return;\n    }\n   \n   Pman.Dialog.Image.show(\n       {\n            _url : baseURL+'/Xtuple/Import/MyCustomers' \n        \n       },\n       function (data) {\n            _this.grid.footer.onClick('first');\n            Roo.MessageBox.alert(\"Notice\", \"DONE\");\n//            Roo.MessageBox.alert(\"Notice\", msg.join(\"\\n\"));\n\n       }\n   );\n    \n}"
                                                     },
-                                                    "text": "Upload Customers Json File",
-                                                    "xtype": "Item",
-                                                    "|xns": "Roo.menu"
+                                                    "text" : "Upload Customers Json File",
+                                                    "xtype" : "Item",
+                                                    "$ xns" : "Roo.menu"
                                                 },
                                                 {
-                                                    "listeners": {
-                                                        "click": "function (_self, e)\n{\n    \n    if (!Pman.hasPerm('Admin.Admin_Tab','S')) {\n        Roo.MessageBox.alert(\"Error\", \"Permission Denied\");\n        return;\n    }\n   \n   Pman.Dialog.Image.show(\n       {\n            _url : baseURL+'/Xtuple/Import/AUPostAccounts' \n        \n       },\n       function (data) {\n            _this.grid.footer.onClick('first');\n            Roo.MessageBox.alert(\"Notice\", data);\n\n       }\n   );\n    \n}"
+                                                    "listeners" : {
+                                                        "click" : "function (_self, e)\n{\n    \n    if (!Pman.hasPerm('Admin.Admin_Tab','S')) {\n        Roo.MessageBox.alert(\"Error\", \"Permission Denied\");\n        return;\n    }\n   \n   Pman.Dialog.Image.show(\n       {\n            _url : baseURL+'/Xtuple/Import/AUPostAccounts' \n        \n       },\n       function (data) {\n            _this.grid.footer.onClick('first');\n            Roo.MessageBox.alert(\"Notice\", data);\n\n       }\n   );\n    \n}"
                                                     },
-                                                    "text": "Upload AU Post Accounts",
-                                                    "xtype": "Item",
-                                                    "|xns": "Roo.menu"
+                                                    "text" : "Upload AU Post Accounts",
+                                                    "xtype" : "Item",
+                                                    "$ xns" : "Roo.menu"
                                                 }
                                             ]
                                         }
                             ]
                         },
                         {
-                            "*prop": "toolbar",
-                            "xtype": "Toolbar",
-                            "|xns": "Roo",
-                            "items": [
+                            "xtype" : "Toolbar",
+                            "$ xns" : "Roo",
+                            "* prop" : "toolbar",
+                            "items" : [
                                 {
-                                    "text": "Search : ",
-                                    "xtype": "TextItem",
-                                    "|xns": "Roo.Toolbar"
+                                    "text" : "Search : ",
+                                    "xtype" : "TextItem",
+                                    "$ xns" : "Roo.Toolbar"
                                 },
                                 {
-                                    "listeners": {
-                                        "render": "function (_self)\n{\n    _this.searchBox = _self;\n}",
-                                        "specialkey": "function (_self, e)\n{\n    _this.grid.footer.onClick('first');\n}"
+                                    "listeners" : {
+                                        "specialkey" : "function (_self, e)\n{\n    _this.grid.footer.onClick('first');\n}",
+                                        "render" : "function (_self)\n{\n    _this.searchBox = _self;\n}"
                                     },
-                                    "xtype": "TextField",
-                                    "|xns": "Roo.form"
+                                    "xtype" : "TextField",
+                                    "$ xns" : "Roo.form"
                                 },
                                 {
-                                    "listeners": {
-                                        "|click": "function (_self, e)\n{\n_this.grid.footer.onClick('first');\n}"
+                                    "listeners" : {
+                                        "|click" : "function (_self, e)\n{\n_this.grid.footer.onClick('first');\n}"
                                     },
-                                    "cls": "x-btn-icon",
-                                    "xtype": "Button",
-                                    "|icon": "rootURL + '/Pman/templates/images/search.gif'",
-                                    "|xns": "Roo.Toolbar"
+                                    "xtype" : "Button",
+                                    "cls" : "x-btn-icon",
+                                    "$ icon" : "rootURL + '/Pman/templates/images/search.gif'",
+                                    "$ xns" : "Roo.Toolbar"
                                 },
                                 {
-                                    "listeners": {
-                                        "|click": "function (_self, e)\n{\n    _this.searchBox.setValue('');\n    \n    \n    _this.grid.footer.onClick('first');\n}"
+                                    "listeners" : {
+                                        "|click" : "function (_self, e)\n{\n    _this.searchBox.setValue('');\n    \n    \n    _this.grid.footer.onClick('first');\n}"
                                     },
-                                    "cls": "x-btn-icon",
-                                    "xtype": "Button",
-                                    "|icon": "rootURL + '/Pman/templates/images/edit-clear.gif'",
-                                    "|xns": "Roo.Toolbar"
+                                    "xtype" : "Button",
+                                    "cls" : "x-btn-icon",
+                                    "$ icon" : "rootURL + '/Pman/templates/images/edit-clear.gif'",
+                                    "$ xns" : "Roo.Toolbar"
                                 },
                                 {
-                                    "listeners": {
-                                        "render": "function (_self)\n{\n  _this.officeCombo  = _self;\n}",
-                                        "select": "function (combo, record, index)\n{\n\n    _this.grid.footer.onClick('first');\n}"
+                                    "listeners" : {
+                                        "render" : "function (_self)\n{\n  _this.officeCombo  = _self;\n}",
+                                        "select" : "function (combo, record, index)\n{\n\n    _this.grid.footer.onClick('first');\n}"
                                     },
-                                    "xtype": "ComboBox",
-                                    "allowBlank": true,
-                                    "displayField": "office",
-                                    "editable": false,
-                                    "fieldLabel": "Office",
-                                    "hiddenName": "office",
-                                    "listWidth": 200,
-                                    "mode": "local",
-                                    "name": "office",
-                                    "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{office}</b> </div>",
-                                    "triggerAction": "all",
-                                    "valueField": "office",
-                                    "width": 75,
-                                    "|xns": "Roo.form",
-                                    "items": [
+                                    "listWidth" : 200,
+                                    "triggerAction" : "all",
+                                    "fieldLabel" : "Office",
+                                    "displayField" : "office",
+                                    "xtype" : "ComboBox",
+                                    "hiddenName" : "office",
+                                    "valueField" : "office",
+                                    "allowBlank" : true,
+                                    "editable" : false,
+                                    "width" : 75,
+                                    "$ xns" : "Roo.form",
+                                    "mode" : "local",
+                                    "name" : "office",
+                                    "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{office}</b> </div>",
+                                    "items" : [
                                         {
-                                            "*prop": "store",
-                                            "xtype": "SimpleStore",
-                                            "|data": "[ \n    [ ''] ,\n    [ 'hk' ],\n    [ 'sg' ],\n    [ 'my' ],\n    [ 'cn' ],\n    [ 'au' ]\n]\n        ",
-                                            "|fields": "['office']",
-                                            "|xns": "Roo.data"
+                                            "xtype" : "SimpleStore",
+                                            "$ data" : "[ \n    [ ''] ,\n    [ 'hk' ],\n    [ 'sg' ],\n    [ 'my' ],\n    [ 'cn' ],\n    [ 'au' ]\n]\n        ",
+                                            "$ fields" : "['office']",
+                                            "$ xns" : "Roo.data",
+                                            "* prop" : "store"
                                         }
                                     ]
                                 },
                                 {
-                                    "listeners": {
-                                        "render": "function (_self)\n{\n    _this.country = _self;\n}",
-                                        "select": "function (combo, record, index)\n{\n    _this.grid.footer.onClick('first');\n}"
+                                    "listeners" : {
+                                        "render" : "function (_self)\n{\n    _this.country = _self;\n}",
+                                        "select" : "function (combo, record, index)\n{\n    _this.grid.footer.onClick('first');\n}"
                                     },
-                                    "allowBlank": true,
-                                    "alwaysQuery": true,
-                                    "displayField": "addr_country",
-                                    "editable": true,
-                                    "emptyText": "Select Country",
-                                    "fieldLabel": "Country",
-                                    "forceSelection": true,
-                                    "hiddenName": "addr_country",
-                                    "listWidth": 300,
-                                    "loadingText": "Searching...",
-                                    "minChars": 2,
-                                    "name": "addr_country",
-                                    "pageSize": 20,
-                                    "qtip": "Select Country",
-                                    "queryParam": "query[addr_country]",
-                                    "selectOnFocus": true,
-                                    "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{addr_country}</b> </div>",
-                                    "triggerAction": "all",
-                                    "typeAhead": true,
-                                    "valueField": "addr_country",
-                                    "width": 150,
-                                    "xtype": "ComboBox",
-                                    "|xns": "Roo.form",
-                                    "items": [
+                                    "alwaysQuery" : true,
+                                    "listWidth" : 300,
+                                    "triggerAction" : "all",
+                                    "fieldLabel" : "Country",
+                                    "forceSelection" : true,
+                                    "selectOnFocus" : true,
+                                    "pageSize" : 20,
+                                    "displayField" : "addr_country",
+                                    "emptyText" : "Select Country",
+                                    "hiddenName" : "addr_country",
+                                    "minChars" : 2,
+                                    "valueField" : "addr_country",
+                                    "xtype" : "ComboBox",
+                                    "allowBlank" : true,
+                                    "typeAhead" : true,
+                                    "editable" : true,
+                                    "width" : 150,
+                                    "$ xns" : "Roo.form",
+                                    "name" : "addr_country",
+                                    "qtip" : "Select Country",
+                                    "queryParam" : "query[addr_country]",
+                                    "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{addr_country}</b> </div>",
+                                    "loadingText" : "Searching...",
+                                    "items" : [
                                         {
-                                            "listeners": {
-                                                "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    o.params._distinct = 'addr_country';\n    o.params._columns ='addr_country';\n}\n"
+                                            "listeners" : {
+                                                "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    o.params._distinct = 'addr_country';\n    o.params._columns ='addr_country';\n}\n"
                                             },
-                                            "*prop": "store",
-                                            "remoteSort": true,
-                                            "xtype": "Store",
-                                            "|sortInfo": "{ direction : 'ASC', field: 'addr_country' }",
-                                            "|xns": "Roo.data",
-                                            "items": [
+                                            "xtype" : "Store",
+                                            "remoteSort" : true,
+                                            "$ sortInfo" : "{ direction : 'ASC', field: 'addr_country' }",
+                                            "$ xns" : "Roo.data",
+                                            "* prop" : "store",
+                                            "items" : [
                                                 {
-                                                    "*prop": "proxy",
-                                                    "method": "GET",
-                                                    "xtype": "HttpProxy",
-                                                    "|url": "baseURL + '/Roo/Addr.php'",
-                                                    "|xns": "Roo.data"
+                                                    "$ url" : "baseURL + '/Roo/Addr.php'",
+                                                    "xtype" : "HttpProxy",
+                                                    "method" : "GET",
+                                                    "$ xns" : "Roo.data",
+                                                    "* prop" : "proxy"
                                                 },
                                                 {
-                                                    "*prop": "reader",
-                                                    "id": "addr_id",
-                                                    "root": "data",
-                                                    "totalProperty": "total",
-                                                    "xtype": "JsonReader",
-                                                    "|fields": "[{\"name\":\"addr_id\",\"type\":\"int\"},{\"name\":\"addr_country\",\"type\":\"string\"}]",
-                                                    "|xns": "Roo.data"
+                                                    "id" : "addr_id",
+                                                    "root" : "data",
+                                                    "xtype" : "JsonReader",
+                                                    "$ fields" : "[{\"name\":\"addr_id\",\"type\":\"int\"},{\"name\":\"addr_country\",\"type\":\"string\"}]",
+                                                    "$ xns" : "Roo.data",
+                                                    "* prop" : "reader",
+                                                    "totalProperty" : "total"
                                                 }
                                             ]
                                         }
                                     ]
                                 },
                                 {
-                                    "listeners": {
-                                        "toggle": "function (_self, pressed)\n{\n    _this.grid.footer.onClick('first');\n}",
-                                        "render": "function (_self)\n{\n    _this.activeBtn = _self;\n}"
+                                    "listeners" : {
+                                        "toggle" : "function (_self, pressed)\n{\n    _this.grid.footer.onClick('first');\n}",
+                                        "render" : "function (_self)\n{\n    _this.activeBtn = _self;\n}"
                                     },
-                                    "enableToggle": true,
-                                    "pressed": false,
-                                    "text": "Show / Hide Inactive",
-                                    "xtype": "Button",
-                                    "|xns": "Roo.Toolbar"
+                                    "text" : "Show / Hide Inactive",
+                                    "enableToggle" : true,
+                                    "pressed" : false,
+                                    "xtype" : "Button",
+                                    "$ xns" : "Roo.Toolbar"
                                 },
                                 {
-                                    "text": "Has orders since",
-                                    "xtype": "TextItem",
-                                    "|xns": "Roo.Toolbar"
+                                    "text" : "Has orders since",
+                                    "xtype" : "TextItem",
+                                    "$ xns" : "Roo.Toolbar"
                                 },
                                 {
-                                    "listeners": {
-                                        "render": "function (_self)\n{\n    _this.dateSearch = _self\n}",
-                                        "select": "function (combo, date)\n{\n    _this.grid.footer.onClick('first');\n}",
-                                        "specialkey": "function (_self, e)\n{\n   _this.grid.footer.onClick('first');\n}"
+                                    "listeners" : {
+                                        "specialkey" : "function (_self, e)\n{\n   _this.grid.footer.onClick('first');\n}",
+                                        "render" : "function (_self)\n{\n    _this.dateSearch = _self\n}",
+                                        "select" : "function (combo, date)\n{\n    _this.grid.footer.onClick('first');\n}"
                                     },
-                                    "format": "Y-m-d",
-                                    "xtype": "DateField",
-                                    "|xns": "Roo.form"
+                                    "format" : "Y-m-d",
+                                    "xtype" : "DateField",
+                                    "$ xns" : "Roo.form"
                                 },
                                 {
-                                    "text": "No orders since",
-                                    "xtype": "TextItem",
-                                    "|xns": "Roo.Toolbar"
+                                    "text" : "No orders since",
+                                    "xtype" : "TextItem",
+                                    "$ xns" : "Roo.Toolbar"
                                 },
                                 {
-                                    "listeners": {
-                                        "render": "function (_self)\n{\n    _this.dateSearchNo = _self\n}",
-                                        "select": "function (combo, date)\n{\n   _this.grid.footer.onClick('first');\n}",
-                                        "specialkey": "function (_self, e)\n{\n   _this.grid.footer.onClick('first');\n}"
+                                    "listeners" : {
+                                        "specialkey" : "function (_self, e)\n{\n   _this.grid.footer.onClick('first');\n}",
+                                        "render" : "function (_self)\n{\n    _this.dateSearchNo = _self\n}",
+                                        "select" : "function (combo, date)\n{\n   _this.grid.footer.onClick('first');\n}"
                                     },
-                                    "format": "Y-m-d",
-                                    "xtype": "DateField",
-                                    "|xns": "Roo.form"
+                                    "format" : "Y-m-d",
+                                    "xtype" : "DateField",
+                                    "$ xns" : "Roo.form"
                                 },
                                 {
-                                    "xtype": "Fill",
-                                    "|xns": "Roo.Toolbar"
+                                    "xtype" : "Fill",
+                                    "$ xns" : "Roo.Toolbar"
                                 },
                                 {
-                                    "listeners": {
-                                        "|click": "function()\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
+                                    "listeners" : {
+                                        "|click" : "function()\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
                                     },
-                                    "cls": "x-btn-text-icon",
-                                    "text": "Add",
-                                    "xtype": "Button",
-                                    "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
-                                    "|xns": "Roo.Toolbar"
+                                    "text" : "Add",
+                                    "xtype" : "Button",
+                                    "cls" : "x-btn-text-icon",
+                                    "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
+                                    "$ xns" : "Roo.Toolbar"
                                 },
                                 {
-                                    "listeners": {
-                                        "|click": "function()\n{\n    var s = _this.grid.getSelectionModel().getSelections();\n    if (!s.length || (s.length > 1))  {\n        Roo.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n        return;\n    }\n    if (!_this.dialog) return;\n    _this.dialog.show(s[0].data, function() {\n        _this.grid.footer.onClick('first');\n    }); \n    \n}\n"
+                                    "listeners" : {
+                                        "|click" : "function()\n{\n    var s = _this.grid.getSelectionModel().getSelections();\n    if (!s.length || (s.length > 1))  {\n        Roo.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n        return;\n    }\n    if (!_this.dialog) return;\n    _this.dialog.show(s[0].data, function() {\n        _this.grid.footer.onClick('first');\n    }); \n    \n}\n"
                                     },
-                                    "cls": "x-btn-text-icon",
-                                    "text": "Edit",
-                                    "xtype": "Button",
-                                    "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
-                                    "|xns": "Roo.Toolbar"
+                                    "text" : "Edit",
+                                    "xtype" : "Button",
+                                    "cls" : "x-btn-text-icon",
+                                    "$ icon" : "Roo.rootURL + 'images/default/tree/leaf.gif'",
+                                    "$ xns" : "Roo.Toolbar"
                                 }
                             ]
                         },
                         {
-                            "*prop": "colModel[]",
-                            ".builderCfg": "{\"table\":\"custinfo\",\"column\":\"cust_active\",\"columnshort\":\"cust_active\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Active\"}",
-                            "dataIndex": "cust_active",
-                            "header": "Active",
-                            "width": 50,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v) { return String.format('{0}', v? 'Y' : 'N'); }",
-                            "|xns": "Roo.grid"
+                            "xtype" : "ColumnModel",
+                            "header" : "Active",
+                            "width" : 50,
+                            "$ renderer" : "function(v) { return String.format('{0}', v? 'Y' : 'N'); }",
+                            "$ xns" : "Roo.grid",
+                            "* prop" : "colModel[]",
+                            "dataIndex" : "cust_active",
+                            "# builderCfg" : "{\"table\":\"custinfo\",\"column\":\"cust_active\",\"columnshort\":\"cust_active\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Active\"}"
                         },
                         {
-                            "*prop": "colModel[]",
-                            "dataIndex": "last_order",
-                            "header": "Last Order",
-                            "width": 80,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v) { \n    if (!v) { \n        return '-none-';\n    }\n    var vv = Date.parseDate(v, 'Y-m-d');\n    return String.format('{0}',  vv.format('d/M/Y') ); \n}",
-                            "|xns": "Roo.grid"
+                            "xtype" : "ColumnModel",
+                            "header" : "Last Order",
+                            "width" : 80,
+                            "$ renderer" : "function(v) { \n    if (!v) { \n        return '-none-';\n    }\n    var vv = Date.parseDate(v, 'Y-m-d');\n    return String.format('{0}',  vv.format('d/M/Y') ); \n}",
+                            "$ xns" : "Roo.grid",
+                            "* prop" : "colModel[]",
+                            "dataIndex" : "last_order"
                         },
                         {
-                            "*prop": "colModel[]",
-                            ".builderCfg": "{\"table\":\"custtype\",\"column\":\"cust_custtype_id_custtype_descrip\",\"columnshort\":\"custtype_descrip\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Customer type\"}",
-                            "dataIndex": "cust_taxzone_id_taxzone_descrip",
-                            "header": "Tax Status",
-                            "sortable": true,
-                            "width": 100,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                            "|xns": "Roo.grid"
+                            "xtype" : "ColumnModel",
+                            "sortable" : true,
+                            "header" : "Tax Status",
+                            "width" : 100,
+                            "$ renderer" : "function(v) { return String.format('{0}', v); }",
+                            "$ xns" : "Roo.grid",
+                            "* prop" : "colModel[]",
+                            "dataIndex" : "cust_taxzone_id_taxzone_descrip",
+                            "# builderCfg" : "{\"table\":\"custtype\",\"column\":\"cust_custtype_id_custtype_descrip\",\"columnshort\":\"custtype_descrip\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Customer type\"}"
                         },
                         {
-                            "*prop": "colModel[]",
-                            ".builderCfg": "{\"table\":\"custtype\",\"column\":\"cust_custtype_id_custtype_descrip\",\"columnshort\":\"custtype_descrip\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Customer type\"}",
-                            "dataIndex": "cust_terms_id_terms_descrip",
-                            "header": "Terms",
-                            "sortable": true,
-                            "width": 100,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                            "|xns": "Roo.grid"
+                            "xtype" : "ColumnModel",
+                            "sortable" : true,
+                            "header" : "Terms",
+                            "width" : 100,
+                            "$ renderer" : "function(v) { return String.format('{0}', v); }",
+                            "$ xns" : "Roo.grid",
+                            "* prop" : "colModel[]",
+                            "dataIndex" : "cust_terms_id_terms_descrip",
+                            "# builderCfg" : "{\"table\":\"custtype\",\"column\":\"cust_custtype_id_custtype_descrip\",\"columnshort\":\"custtype_descrip\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Customer type\"}"
                         },
                         {
-                            "*prop": "colModel[]",
-                            ".builderCfg": "{\"table\":\"salesrep\",\"column\":\"cust_salesrep_id_salesrep_name\",\"columnshort\":\"salesrep_name\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":0,\"title\":\"Sales Rep\"}",
-                            "dataIndex": "cust_salesrep_id_salesrep_name",
-                            "header": "Sales Rep",
-                            "sortable": true,
-                            "width": 100,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                            "|xns": "Roo.grid"
+                            "xtype" : "ColumnModel",
+                            "sortable" : true,
+                            "header" : "Sales Rep",
+                            "width" : 100,
+                            "$ renderer" : "function(v) { return String.format('{0}', v); }",
+                            "$ xns" : "Roo.grid",
+                            "* prop" : "colModel[]",
+                            "dataIndex" : "cust_salesrep_id_salesrep_name",
+                            "# builderCfg" : "{\"table\":\"salesrep\",\"column\":\"cust_salesrep_id_salesrep_name\",\"columnshort\":\"salesrep_name\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":0,\"title\":\"Sales Rep\"}"
                         },
                         {
-                            "*prop": "colModel[]",
-                            "dataIndex": "ipshead_id_name",
-                            "header": "Curr/Price List",
-                            "sortable": true,
-                            "width": 80,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v,x,r) { \n    if (!v.length) {\n         return String.format('{0}<br/><span style=\"color:red\">No price list</span>', \n        r.data.cust_curr_id_curr_name  );\n     }    \n\n    return  String.format('{0}<br/>{1}', \n        r.data.cust_curr_id_curr_name,\n       v ); \n   }",
-                            "|xns": "Roo.grid"
+                            "xtype" : "ColumnModel",
+                            "sortable" : true,
+                            "header" : "Curr/Price List",
+                            "width" : 80,
+                            "$ renderer" : "function(v,x,r) { \n    if (!v.length) {\n         return String.format('{0}<br/><span style=\"color:red\">No price list</span>', \n        r.data.cust_curr_id_curr_name  );\n     }    \n\n    return  String.format('{0}<br/>{1}', \n        r.data.cust_curr_id_curr_name,\n       v ); \n   }",
+                            "$ xns" : "Roo.grid",
+                            "* prop" : "colModel[]",
+                            "dataIndex" : "ipshead_id_name"
                         },
                         {
-                            "*prop": "colModel[]",
-                            "dataIndex": "cust_number",
-                            "header": "Ref No.",
-                            "sortable": true,
-                            "width": 80,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                            "|xns": "Roo.grid"
+                            "xtype" : "ColumnModel",
+                            "sortable" : true,
+                            "header" : "Ref No.",
+                            "width" : 80,
+                            "$ renderer" : "function(v) { return String.format('{0}', v); }",
+                            "$ xns" : "Roo.grid",
+                            "* prop" : "colModel[]",
+                            "dataIndex" : "cust_number"
                         },
                         {
-                            "*prop": "colModel[]",
-                            "dataIndex": "cust_name",
-                            "header": "Name",
-                            "sortable": true,
-                            "width": 200,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v,x,r) {\n    if (!r.data.cust_char_internalcompany.length) {\n         return String.format('{0}', v); \n     }\n    return String.format('<span style=\"color:red\">[Internal company : {0}] {1}</span>',\n        r.data.cust_char_internalcompany,  v); \n }",
-                            "|xns": "Roo.grid"
+                            "xtype" : "ColumnModel",
+                            "sortable" : true,
+                            "header" : "Name",
+                            "width" : 200,
+                            "$ renderer" : "function(v,x,r) {\n    if (!r.data.cust_char_internalcompany.length) {\n         return String.format('{0}', v); \n     }\n    return String.format('<span style=\"color:red\">[Internal company : {0}] {1}</span>',\n        r.data.cust_char_internalcompany,  v); \n }",
+                            "$ xns" : "Roo.grid",
+                            "* prop" : "colModel[]",
+                            "dataIndex" : "cust_name"
                         },
                         {
-                            "*prop": "colModel[]",
-                            "dataIndex": "cust_bill_info",
-                            "header": "Billing Address",
-                            "sortable": true,
-                            "width": 200,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v,x,r) \n{ \n    if(!v.length){\n        var add = [];\r\n        Roo.each([ 'line1', 'line2', 'line3', 'city', 'state', 'country'], function (k) {\r\n            if (!r.data['cntct_addr_' + k].length) {\r\n                return;\r\n            }\r\n            add.push(String.format(\"{0}\", r.data['cntct_addr_' + k]));\r\n        \r\n        });\n        return add.join('<BR/>');\n    }\n    \n    var v = v.split(\"\\r\\n\").join(\"<br/>\");\n    return v; \n}",
-                            "|xns": "Roo.grid"
+                            "xtype" : "ColumnModel",
+                            "sortable" : true,
+                            "header" : "Billing Address",
+                            "width" : 200,
+                            "$ renderer" : "function(v,x,r) \n{ \n    if(!v.length){\n        var add = [];\r\n        Roo.each([ 'line1', 'line2', 'line3', 'city', 'state', 'country'], function (k) {\r\n            if (!r.data['cntct_addr_' + k].length) {\r\n                return;\r\n            }\r\n            add.push(String.format(\"{0}\", r.data['cntct_addr_' + k]));\r\n        \r\n        });\n        return add.join('<BR/>');\n    }\n    \n    var v = v.split(\"\\r\\n\").join(\"<br/>\");\n    return v; \n}",
+                            "$ xns" : "Roo.grid",
+                            "* prop" : "colModel[]",
+                            "dataIndex" : "cust_bill_info"
                         },
                         {
-                            "*prop": "colModel[]",
-                            "dataIndex": "cust_ship_info",
-                            "header": "Shipping Address",
-                            "sortable": true,
-                            "width": 200,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v,x,r) \n{ \n    if(!v.length){\n        var add = [];\r\n        Roo.each([ 'line1', 'line2', 'line3', 'city', 'state', 'country'], function (k) {\r\n            if (!r.data['cntct_addr_' + k].length) {\r\n                return;\r\n            }\r\n            add.push(String.format(\"{0}\", r.data['cntct_addr_' + k]));\r\n        \r\n        });\n        return add.join('<BR/>');\n    }\n    \n    var v = v.split(\"\\r\\n\").join(\"<br/>\");\n    return v; \n}",
-                            "|xns": "Roo.grid"
+                            "xtype" : "ColumnModel",
+                            "sortable" : true,
+                            "header" : "Shipping Address",
+                            "width" : 200,
+                            "$ renderer" : "function(v,x,r) \n{ \n    if(!v.length){\n        var add = [];\r\n        Roo.each([ 'line1', 'line2', 'line3', 'city', 'state', 'country'], function (k) {\r\n            if (!r.data['cntct_addr_' + k].length) {\r\n                return;\r\n            }\r\n            add.push(String.format(\"{0}\", r.data['cntct_addr_' + k]));\r\n        \r\n        });\n        return add.join('<BR/>');\n    }\n    \n    var v = v.split(\"\\r\\n\").join(\"<br/>\");\n    return v; \n}",
+                            "$ xns" : "Roo.grid",
+                            "* prop" : "colModel[]",
+                            "dataIndex" : "cust_ship_info"
                         },
                         {
-                            "*prop": "colModel[]",
-                            "dataIndex": "cust_cntct_id_cntct_first_name",
-                            "header": "Contact",
-                            "sortable": true,
-                            "width": 150,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v,x,r) \n{ \n    return String.format(\n        'Name: {0}<br/>' + \n        'Phone: {1}<br/>' + \n        'Email: <a href=\"mailto:{2}\">{2}</a>',\n    \n        r.data.cust_cntct_id_cntct_first_name,\n        r.data.cust_cntct_id_cntct_phone,\n        r.data.cust_cntct_id_cntct_email\n    );\n}",
-                            "|xns": "Roo.grid"
+                            "xtype" : "ColumnModel",
+                            "sortable" : true,
+                            "header" : "Contact",
+                            "width" : 150,
+                            "$ renderer" : "function(v,x,r) \n{ \n    return String.format(\n        'Name: {0}<br/>' + \n        'Phone: {1}<br/>' + \n        'Email: <a href=\"mailto:{2}\">{2}</a>',\n    \n        r.data.cust_cntct_id_cntct_first_name,\n        r.data.cust_cntct_id_cntct_phone,\n        r.data.cust_cntct_id_cntct_email\n    );\n}",
+                            "$ xns" : "Roo.grid",
+                            "* prop" : "colModel[]",
+                            "dataIndex" : "cust_cntct_id_cntct_first_name"
                         },
                         {
-                            "*prop": "colModel[]",
-                            "dataIndex": "cust_char_au_post_accno",
-                            "header": "AU Post#",
-                            "hidden": true,
-                            "sortable": true,
-                            "width": 150,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v,x,r) \n{ \n    return String.format('{0}', v);\n}",
-                            "|xns": "Roo.grid"
+                            "hidden" : true,
+                            "xtype" : "ColumnModel",
+                            "sortable" : true,
+                            "header" : "AU Post#",
+                            "width" : 150,
+                            "$ renderer" : "function(v,x,r) \n{ \n    return String.format('{0}', v);\n}",
+                            "$ xns" : "Roo.grid",
+                            "* prop" : "colModel[]",
+                            "dataIndex" : "cust_char_au_post_accno"
                         },
                         {
-                            "*prop": "colModel[]",
-                            "dataIndex": "cust_cntct_id_cntct_phone",
-                            "header": "Contact Number",
-                            "hidden": true,
-                            "sortable": true,
-                            "width": 150,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v,x,r) \n{ \n    return String.format('{0}',v);\n}",
-                            "|xns": "Roo.grid"
+                            "hidden" : true,
+                            "xtype" : "ColumnModel",
+                            "sortable" : true,
+                            "header" : "Contact Number",
+                            "width" : 150,
+                            "$ renderer" : "function(v,x,r) \n{ \n    return String.format('{0}',v);\n}",
+                            "$ xns" : "Roo.grid",
+                            "* prop" : "colModel[]",
+                            "dataIndex" : "cust_cntct_id_cntct_phone"
                         },
                         {
-                            "*prop": "colModel[]",
-                            "dataIndex": "cust_cntct_id_cntct_email",
-                            "header": "Email",
-                            "hidden": true,
-                            "sortable": true,
-                            "width": 150,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v,x,r) \n{ \n    return String.format('<a href=\"mailto:{0}\">{0}</a>', v);\n}",
-                            "|xns": "Roo.grid"
+                            "hidden" : true,
+                            "xtype" : "ColumnModel",
+                            "sortable" : true,
+                            "header" : "Email",
+                            "width" : 150,
+                            "$ renderer" : "function(v,x,r) \n{ \n    return String.format('<a href=\"mailto:{0}\">{0}</a>', v);\n}",
+                            "$ xns" : "Roo.grid",
+                            "* prop" : "colModel[]",
+                            "dataIndex" : "cust_cntct_id_cntct_email"
                         },
                         {
-                            "*prop": "colModel[]",
-                            "align": "right",
-                            "dataIndex": "cntct_addr_city",
-                            "header": "City",
-                            "hidden": true,
-                            "sortable": true,
-                            "width": 75,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v) { return String.format('{0}', v ? v : ''); }",
-                            "|xns": "Roo.grid"
+                            "align" : "right",
+                            "hidden" : true,
+                            "xtype" : "ColumnModel",
+                            "sortable" : true,
+                            "header" : "City",
+                            "width" : 75,
+                            "$ renderer" : "function(v) { return String.format('{0}', v ? v : ''); }",
+                            "$ xns" : "Roo.grid",
+                            "* prop" : "colModel[]",
+                            "dataIndex" : "cntct_addr_city"
                         },
                         {
-                            "*prop": "colModel[]",
-                            "align": "right",
-                            "dataIndex": "cntct_addr_state",
-                            "header": "State",
-                            "hidden": true,
-                            "sortable": true,
-                            "width": 75,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v) { return String.format('{0}', v ? v : ''); }",
-                            "|xns": "Roo.grid"
+                            "align" : "right",
+                            "hidden" : true,
+                            "xtype" : "ColumnModel",
+                            "sortable" : true,
+                            "header" : "State",
+                            "width" : 75,
+                            "$ renderer" : "function(v) { return String.format('{0}', v ? v : ''); }",
+                            "$ xns" : "Roo.grid",
+                            "* prop" : "colModel[]",
+                            "dataIndex" : "cntct_addr_state"
                         },
                         {
-                            "*prop": "colModel[]",
-                            "align": "right",
-                            "dataIndex": "cntct_addr_country",
-                            "header": "Country",
-                            "sortable": true,
-                            "width": 75,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v) { return String.format('{0}', v ? v : ''); }",
-                            "|xns": "Roo.grid"
+                            "align" : "right",
+                            "xtype" : "ColumnModel",
+                            "sortable" : true,
+                            "header" : "Country",
+                            "width" : 75,
+                            "$ renderer" : "function(v) { return String.format('{0}', v ? v : ''); }",
+                            "$ xns" : "Roo.grid",
+                            "* prop" : "colModel[]",
+                            "dataIndex" : "cntct_addr_country"
                         },
                         {
-                            "*prop": "colModel[]",
-                            ".builderCfg": "{\"table\":\"custtype\",\"column\":\"cust_custtype_id_custtype_descrip\",\"columnshort\":\"custtype_descrip\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Customer type\"}",
-                            "dataIndex": "cust_curr_id_curr_name",
-                            "header": "Currency",
-                            "sortable": true,
-                            "width": 50,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                            "|xns": "Roo.grid"
+                            "xtype" : "ColumnModel",
+                            "sortable" : true,
+                            "header" : "Currency",
+                            "width" : 50,
+                            "$ renderer" : "function(v) { return String.format('{0}', v); }",
+                            "$ xns" : "Roo.grid",
+                            "* prop" : "colModel[]",
+                            "dataIndex" : "cust_curr_id_curr_name",
+                            "# builderCfg" : "{\"table\":\"custtype\",\"column\":\"cust_custtype_id_custtype_descrip\",\"columnshort\":\"custtype_descrip\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Customer type\"}"
                         },
                         {
-                            "*prop": "colModel[]",
-                            "align": "right",
-                            "dataIndex": "balance",
-                            "header": "Balance",
-                            "width": 75,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v,x,r) { \n\n     \n    return String.format('{0}{1}', r.data.cust_curr_id_curr_symbol, Roo.util.Format.number(v,2)); \n}",
-                            "|xns": "Roo.grid"
+                            "align" : "right",
+                            "xtype" : "ColumnModel",
+                            "header" : "Balance",
+                            "width" : 75,
+                            "$ renderer" : "function(v,x,r) { \n\n     \n    return String.format('{0}{1}', r.data.cust_curr_id_curr_symbol, Roo.util.Format.number(v,2)); \n}",
+                            "$ xns" : "Roo.grid",
+                            "* prop" : "colModel[]",
+                            "dataIndex" : "balance"
                         }
                     ]
                 }
             ]
         }
-    ],
-    "permname": "",
-    "modOrder": "700"
+    ]
 }
\ No newline at end of file