{ "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}" }, "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" : { "|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}" }, "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[_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}" }, "xtype" : "Store", "remoteSort" : true, "$ sortInfo" : "{ field : 'cust_name', direction: 'ASC' }", "$ xns" : "Roo.data", "* prop" : "dataSource", "items" : [ { "$ url" : "baseURL + '/Roo/custinfo.php'", "xtype" : "HttpProxy", "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, { "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" } ] }, { "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" : [ { "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 Roo.MessageBox.alert(\"Notice\", \"Report will download shortly\");\n \n}" }, "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}" }, "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}" }, "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}" }, "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}" }, "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}" }, "text" : "Upload AU Post Accounts", "xtype" : "Item", "$ xns" : "Roo.menu" } ] } ] } ] }, { "xtype" : "Toolbar", "$ xns" : "Roo", "* prop" : "toolbar", "items" : [ { "text" : "Search : ", "xtype" : "TextItem", "$ xns" : "Roo.Toolbar" }, { "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" }, { "listeners" : { "|click" : "function (_self, e)\n{\n_this.grid.footer.onClick('first');\n}" }, "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}" }, "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}" }, "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" : "
{office}
", "items" : [ { "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}" }, "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" : "
{addr_country}
", "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" }, "xtype" : "Store", "remoteSort" : true, "$ sortInfo" : "{ direction : 'ASC', field: 'addr_country' }", "$ xns" : "Roo.data", "* prop" : "store", "items" : [ { "$ url" : "baseURL + '/Roo/Addr.php'", "xtype" : "HttpProxy", "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, { "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}" }, "text" : "Show / Hide Inactive", "enableToggle" : true, "pressed" : false, "xtype" : "Button", "$ xns" : "Roo.Toolbar" }, { "text" : "Has orders since", "xtype" : "TextItem", "$ xns" : "Roo.Toolbar" }, { "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" }, { "text" : "No orders since", "xtype" : "TextItem", "$ xns" : "Roo.Toolbar" }, { "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" }, { "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" }, "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" }, "text" : "Edit", "xtype" : "Button", "cls" : "x-btn-text-icon", "$ icon" : "Roo.rootURL + 'images/default/tree/leaf.gif'", "$ xns" : "Roo.Toolbar" } ] }, { "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\"}" }, { "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" }, { "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\"}" }, { "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\"}" }, { "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\"}" }, { "xtype" : "ColumnModel", "sortable" : true, "header" : "Curr/Price List", "width" : 80, "$ renderer" : "function(v,x,r) { \n if (!v.length) {\n return String.format('{0}
No price list', \n r.data.cust_curr_id_curr_name );\n } \n\n return String.format('{0}
{1}', \n r.data.cust_curr_id_curr_name,\n v ); \n }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "ipshead_id_name" }, { "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" }, { "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('[Internal company : {0}] {1}',\n r.data.cust_char_internalcompany, v); \n }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "cust_name" }, { "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('
');\n }\n \n var v = v.split(\"\\r\\n\").join(\"
\");\n return v; \n}", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "cust_bill_info" }, { "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('
');\n }\n \n var v = v.split(\"\\r\\n\").join(\"
\");\n return v; \n}", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "cust_ship_info" }, { "xtype" : "ColumnModel", "sortable" : true, "header" : "Contact", "width" : 150, "$ renderer" : "function(v,x,r) \n{ \n return String.format(\n 'Name: {0}
' + \n 'Phone: {1}
' + \n 'Email: {2}',\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" }, { "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" }, { "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" }, { "hidden" : true, "xtype" : "ColumnModel", "sortable" : true, "header" : "Email", "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_email" }, { "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" }, { "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" }, { "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" }, { "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\"}" }, { "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" } ] } ] } ] }