Fix #7123 - getting abra ready to test
[Pman.Xtuple] / Pman.Tab.XtupleCurrency.bjs
index 81e73df..b66ae78 100644 (file)
 {
-    "id": "roo-file-529",
-    "name": "Pman.Tab.XtupleCurrency",
-    "parent": "",
-    "title": "",
-    "path": "/home/alan/gitlive/web.xtuple/Pman/Xtuple/Pman.Tab.XtupleCurrency.bjs",
-    "items": [
+    "name" : "Pman.Tab.XtupleCurrency",
+    "parent" : "Pman.Tab.XtupleAccountsTab",
+    "title" : "Pman.Tab.XtupleCurrency",
+    "path" : "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Tab.XtupleCurrency.bjs",
+    "permname" : "",
+    "modOrder" : "600",
+    "items" : [
         {
-            "|xns": "Roo",
-            "xtype": "NestedLayoutPanel",
-            "items": [
+            "background" : true,
+            "region" : "center",
+            "title" : "Currency / Rates",
+            "xtype" : "NestedLayoutPanel",
+            "$ xns" : "Roo",
+            "items" : [
                 {
-                    "|xns": "Roo",
-                    "xtype": "BorderLayout",
-                    "*prop": "layout",
-                    "items": [
+                    "xtype" : "BorderLayout",
+                    "$ xns" : "Roo",
+                    "* prop" : "layout",
+                    "items" : [
                         {
-                            "*prop": "west",
-                            "xtype": "LayoutRegion",
-                            "|xns": "Roo"
+                            "xtype" : "LayoutRegion",
+                            "width" : 300,
+                            "$ xns" : "Roo",
+                            "split" : true,
+                            "* prop" : "west"
                         },
                         {
-                            "|xns": "Roo",
-                            "xtype": "LayoutRegion",
-                            "*prop": "center"
+                            "xtype" : "LayoutRegion",
+                            "$ xns" : "Roo",
+                            "* prop" : "center"
                         },
                         {
-                            "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}"
                             },
-                            "background": false,
-                            "fitContainer": true,
-                            "fitToframe": true,
-                            "region": "center",
-                            "tableName": "curr_symbol",
-                            "title": "curr_symbol",
-                            "xtype": "GridPanel",
-                            "|xns": "Roo",
-                            "items": [
+                            "fitToframe" : true,
+                            "background" : false,
+                            "region" : "west",
+                            "title" : "curr_symbol",
+                            "xtype" : "GridPanel",
+                            "fitContainer" : true,
+                            "$ xns" : "Roo",
+                            "tableName" : "curr_symbol",
+                            "items" : [
                                 {
-                                    "*prop": "grid",
-                                    "xtype": "Grid",
-                                    "autoExpandColumn": "curr_name",
-                                    "loadMask": true,
-                                    "listeners": {
-                                        "|render": "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\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('first');\n    }); \n}\n"
+                                    "listeners" : {
+                                        "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    Pman.Dialog.XtupleCurrency.show( this.getDataSource().getAt(rowIndex).data, function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
+                                        "|render" : "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}"
                                     },
-                                    "|xns": "Roo.grid",
-                                    "items": [
+                                    "autoExpandColumn" : "curr_name",
+                                    "xtype" : "Grid",
+                                    "loadMask" : true,
+                                    "$ xns" : "Roo.grid",
+                                    "* prop" : "grid",
+                                    "items" : [
                                         {
-                                            "*prop": "dataSource",
-                                            "xtype": "Store",
-                                            "remoteSort": true,
-                                            "|sortInfo": "{ field : 'curr_name', direction: 'ASC' }",
-                                            "|xns": "Roo.data",
-                                            "items": [
+                                            "listeners" : {
+                                                "afterselectionchange" : "function (_self)\n{\n    _this.rgrid.footer.onClick('first');\n}"
+                                            },
+                                            "xtype" : "RowSelectionModel",
+                                            "singleSelect" : true,
+                                            "$ xns" : "Roo.grid",
+                                            "* prop" : "sm"
+                                        },
+                                        {
+                                            "remoteSort" : true,
+                                            "xtype" : "Store",
+                                            "$ sortInfo" : "{ field : 'curr_name', direction: 'ASC' }",
+                                            "$ xns" : "Roo.data",
+                                            "* prop" : "dataSource",
+                                            "items" : [
                                                 {
-                                                    "*prop": "proxy",
-                                                    "xtype": "HttpProxy",
-                                                    "method": "GET",
-                                                    "|url": "baseURL + '/Roo/curr_symbol.php'",
-                                                    "|xns": "Roo.data"
+                                                    "$ url" : "baseURL + '/Roo/curr_symbol.php'",
+                                                    "method" : "GET",
+                                                    "xtype" : "HttpProxy",
+                                                    "$ xns" : "Roo.data",
+                                                    "* prop" : "proxy"
                                                 },
                                                 {
-                                                    "|xns": "Roo.data",
-                                                    "xtype": "JsonReader",
-                                                    "totalProperty": "total",
-                                                    "root": "data",
-                                                    "*prop": "reader",
-                                                    "id": "id",
-                                                    "|fields": "[\n    {\n        'name': 'curr_id',\n        'type': 'int'\n    },\n    {\n        'name': 'curr_base',\n        'type': 'int'\n    },\n    {\n        'name': 'curr_name',\n        'type': 'string'\n    },\n    {\n        'name': 'curr_symbol',\n        'type': 'string'\n    },\n    {\n        'name': 'curr_abbr',\n        'type': 'string'\n    }\n]"
+                                                    "id" : "id",
+                                                    "root" : "data",
+                                                    "xtype" : "JsonReader",
+                                                    "$ fields" : "[\n    {\n        'name': 'curr_id',\n        'type': 'int'\n    },\n    {\n        'name': 'curr_base',\n        'type': 'int'\n    },\n    {\n        'name': 'curr_name',\n        'type': 'string'\n    },\n    {\n        'name': 'curr_symbol',\n        'type': 'string'\n    },\n    {\n        'name': 'curr_abbr',\n        'type': 'string'\n    }\n]",
+                                                    "$ xns" : "Roo.data",
+                                                    "* prop" : "reader",
+                                                    "totalProperty" : "total"
                                                 }
                                             ]
                                         },
                                         {
-                                            "*prop": "footer",
-                                            "xtype": "PagingToolbar",
-                                            "pageSize": 25,
-                                            "displayInfo": true,
-                                            "displayMsg": "Displaying curr_symbol{0} - {1} of {2}",
-                                            "emptyMsg": "No curr_symbol found",
-                                            "|xns": "Roo"
+                                            "pageSize" : 25,
+                                            "xtype" : "PagingToolbar",
+                                            "emptyMsg" : "Nothing found",
+                                            "$ xns" : "Roo",
+                                            "displayMsg" : "{0} - {1} of {2}",
+                                            "displayInfo" : true,
+                                            "* prop" : "footer"
                                         },
                                         {
-                                            "*prop": "toolbar",
-                                            "xtype": "Toolbar",
-                                            "|xns": "Roo",
-                                            "items": [
+                                            "xtype" : "Toolbar",
+                                            "$ xns" : "Roo",
+                                            "* prop" : "toolbar",
+                                            "items" : [
                                                 {
-                                                    "text": "Add",
-                                                    "xtype": "Button",
-                                                    "cls": "x-btn-text-icon",
-                                                    "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
-                                                    "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    Pman.Dialog.XtupleCurrency.show( { curr_id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
                                                     },
-                                                    "|xns": "Roo.Toolbar"
+                                                    "text" : "Add",
+                                                    "xtype" : "Button",
+                                                    "cls" : "x-btn-text-icon",
+                                                    "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
+                                                    "$ xns" : "Roo.Toolbar"
                                                 },
                                                 {
-                                                    "text": "Edit",
-                                                    "xtype": "Button",
-                                                    "cls": "x-btn-text-icon",
-                                                    "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
-                                                    "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"
-                                                    },
-                                                    "|xns": "Roo.Toolbar"
+                                                    "xtype" : "Fill",
+                                                    "$ xns" : "Roo.Toolbar"
                                                 },
                                                 {
-                                                    "text": "Delete",
-                                                    "cls": "x-btn-text-icon",
-                                                    "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
-                                                    "xtype": "Button",
-                                                    "listeners": {
-                                                        "|click": "function()\n{\n     Pman.genericDelete(_this, 'curr_symbol'); \n}\n        "
+                                                    "listeners" : {
+                                                        "|click" : "function()\n{\n    var s = _this.grid.getSelectionModel().getSelected();\n    \n    if(!s){\n        Roo.MessageBox.alert(\"Error\", \"Please select a currency!\");\n        return;\n    }\n        \n    new Pman.Request({\n        method: 'POST',\n        url: baseURL+ '/Roo/curr_symbol',\n        params : {\n            curr_id : s.data.curr_id,\n            _load_rates : 1\n        },\n        success : function() {\n            _this.rgrid.footer.onClick('first');\n        }\n    });\n}\n"
                                                     },
-                                                    "|xns": "Roo.Toolbar"
+                                                    "text" : "Get this months rates",
+                                                    "xtype" : "Button",
+                                                    "cls" : "x-btn-text-icon",
+                                                    "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
+                                                    "$ xns" : "Roo.Toolbar"
                                                 }
                                             ]
                                         },
                                         {
-                                            "xtype": "ColumnModel",
-                                            "header": "Curr",
-                                            "width": 75,
-                                            "dataIndex": "curr_id",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid",
-                                            "*prop": "colModel[]"
-                                        },
-                                        {
-                                            "xtype": "ColumnModel",
-                                            "header": "Curr base",
-                                            "width": 75,
-                                            "dataIndex": "curr_base",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid",
-                                            "*prop": "colModel[]"
+                                            "xtype" : "ColumnModel",
+                                            "header" : "Name",
+                                            "width" : 80,
+                                            "$ renderer" : "function(v,x,r) { \n\n    return String.format(r.data.curr_base*1 ? '<span style=\"color:red\">{0}</span>' : '{0}', v); \n    \n}",
+                                            "$ xns" : "Roo.grid",
+                                            "* prop" : "colModel[]",
+                                            "dataIndex" : "curr_name"
                                         },
                                         {
-                                            "xtype": "ColumnModel",
-                                            "header": "Curr name",
-                                            "width": 200,
-                                            "dataIndex": "curr_name",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid",
-                                            "*prop": "colModel[]"
+                                            "xtype" : "ColumnModel",
+                                            "header" : "Symbol",
+                                            "width" : 80,
+                                            "$ renderer" : "function(v,x,r) { \n\n    return String.format(r.data.curr_base*1 ? '<span style=\"color:red\">{0}</span>' : '{0}', v); \n    \n}",
+                                            "$ xns" : "Roo.grid",
+                                            "* prop" : "colModel[]",
+                                            "dataIndex" : "curr_symbol"
                                         },
                                         {
-                                            "xtype": "ColumnModel",
-                                            "header": "Curr symbol",
-                                            "width": 200,
-                                            "dataIndex": "curr_symbol",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid",
-                                            "*prop": "colModel[]"
-                                        },
-                                        {
-                                            "xtype": "ColumnModel",
-                                            "header": "Curr abbr",
-                                            "width": 200,
-                                            "dataIndex": "curr_abbr",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid",
-                                            "*prop": "colModel[]"
+                                            "xtype" : "ColumnModel",
+                                            "header" : "Abbr.",
+                                            "width" : 80,
+                                            "$ renderer" : "function(v,x,r) { \n\n    return String.format(r.data.curr_base*1 ? '<span style=\"color:red\">{0}</span>' : '{0}', v); \n    \n}",
+                                            "$ xns" : "Roo.grid",
+                                            "* prop" : "colModel[]",
+                                            "dataIndex" : "curr_abbr"
                                         }
                                     ]
                                 }
                             ]
                         },
                         {
-                            "listeners": {
-                                "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
+                            "listeners" : {
+                                "|activate" : "function() {\n    _this.rpanel = this;\n    if (_this.rgrid) {\n        _this.rgrid.footer.onClick('first');\n    }\n}"
                             },
-                            "background": false,
-                            "fitContainer": true,
-                            "fitToframe": true,
-                            "region": "center",
-                            "tableName": "curr_rate",
-                            "title": "curr_rate",
-                            "xtype": "GridPanel",
-                            "|xns": "Roo",
-                            "items": [
+                            "fitToframe" : true,
+                            "background" : false,
+                            "region" : "center",
+                            "title" : "curr_rate",
+                            "xtype" : "GridPanel",
+                            "fitContainer" : true,
+                            "$ xns" : "Roo",
+                            "tableName" : "curr_rate",
+                            "items" : [
                                 {
-                                    "*prop": "grid",
-                                    "xtype": "Grid",
-                                    "autoExpandColumn": "",
-                                    "loadMask": true,
-                                    "listeners": {
-                                        "|render": "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\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('first');\n    }); \n}\n"
+                                    "listeners" : {
+                                        "|render" : "function() \n{\n    _this.rgrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.rpanel.active) {\n       this.footer.onClick('first');\n    }\n}"
                                     },
-                                    "|xns": "Roo.grid",
-                                    "items": [
+                                    "autoExpandColumn" : "curr_rate",
+                                    "xtype" : "Grid",
+                                    "loadMask" : true,
+                                    "$ xns" : "Roo.grid",
+                                    "* prop" : "grid",
+                                    "items" : [
+                                        {
+                                            "xtype" : "RowSelectionModel",
+                                            "singleSelect" : true,
+                                            "$ xns" : "Roo.grid",
+                                            "* prop" : "sm"
+                                        },
                                         {
-                                            "*prop": "dataSource",
-                                            "xtype": "Store",
-                                            "remoteSort": true,
-                                            "|sortInfo": "{ field : '', direction: 'ASC' }",
-                                            "|xns": "Roo.data",
-                                            "items": [
+                                            "xtype" : "Toolbar",
+                                            "$ xns" : "Roo",
+                                            "* prop" : "toolbar",
+                                            "items" : [
                                                 {
-                                                    "*prop": "proxy",
-                                                    "xtype": "HttpProxy",
-                                                    "method": "GET",
-                                                    "|url": "baseURL + '/Roo/curr_rate.php'",
-                                                    "|xns": "Roo.data"
+                                                    "xtype" : "Fill",
+                                                    "$ xns" : "Roo.Toolbar"
                                                 },
                                                 {
-                                                    "|xns": "Roo.data",
-                                                    "xtype": "JsonReader",
-                                                    "totalProperty": "total",
-                                                    "root": "data",
-                                                    "*prop": "reader",
-                                                    "id": "id",
-                                                    "|fields": "[\n    {\n        'name': 'curr_rate_id',\n        'type': 'int'\n    },\n    {\n        'name': 'curr_id',\n        'type': 'int'\n    },\n    {\n        'name': 'curr_id',\n        'type': 'int'\n    },\n    {\n        'name': 'curr_rate',\n        'type': 'float'\n    },\n    {\n        'name': 'curr_effective',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'curr_expires',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    }\n]"
+                                                    "listeners" : {
+                                                        "|click" : "function ()\n{\n\n     var sel  = _this.rgrid.getSelectionModel().getSelected();\n    if (!sel) {\n        Roo.MessageBox.alert(\"Error\", \"Select a rate\");\n        return;\n    }\n    \n    Roo.MessageBox.confirm(\"Are you sure\", \"Are you sure you want to delete this rate?\",\n        function(r) {\n            if (r != 'yes') {\n                return;\n            }\n            new Pman.Request({\n                mask : 'Deleting',\n                url : baseURL + '/Roo/curr_rate',\n                method : 'POST',\n                params :  {\n                    _delete : sel.data.curr_rate_id\n                },\n                success : function() {\n                    _this.rgrid.footer.onClick('first');\n                }\n            })\n            \n        }\n    );\n            \n            \n   \n}"
+                                                    },
+                                                    "text" : "Delete",
+                                                    "xtype" : "Button",
+                                                    "cls" : "x-btn-text-icon",
+                                                    "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
+                                                    "$ xns" : "Roo.Toolbar"
                                                 }
                                             ]
                                         },
                                         {
-                                            "*prop": "footer",
-                                            "xtype": "PagingToolbar",
-                                            "pageSize": 25,
-                                            "displayInfo": true,
-                                            "displayMsg": "Displaying curr_rate{0} - {1} of {2}",
-                                            "emptyMsg": "No curr_rate found",
-                                            "|xns": "Roo"
-                                        },
-                                        {
-                                            "*prop": "toolbar",
-                                            "xtype": "Toolbar",
-                                            "|xns": "Roo",
-                                            "items": [
-                                                {
-                                                    "text": "Add",
-                                                    "xtype": "Button",
-                                                    "cls": "x-btn-text-icon",
-                                                    "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
-                                                    "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"
-                                                    },
-                                                    "|xns": "Roo.Toolbar"
-                                                },
+                                            "listeners" : {
+                                                "beforeload" : "function (_self, options)\n{\n    var s = _this.grid.selModel.getSelected();\n    if (!s) { \n        this.removeAll();\n        return false;\n    }\n    options.params.curr_id = s.data.curr_id;\n    options.params._with_base_symbol  = 1;\n}"
+                                            },
+                                            "xtype" : "Store",
+                                            "remoteSort" : true,
+                                            "$ sortInfo" : "{ field : 'curr_effective', direction: 'DESC' }",
+                                            "$ xns" : "Roo.data",
+                                            "* prop" : "dataSource",
+                                            "items" : [
                                                 {
-                                                    "text": "Edit",
-                                                    "xtype": "Button",
-                                                    "cls": "x-btn-text-icon",
-                                                    "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
-                                                    "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"
-                                                    },
-                                                    "|xns": "Roo.Toolbar"
+                                                    "$ url" : "baseURL + '/Roo/curr_rate.php'",
+                                                    "method" : "GET",
+                                                    "xtype" : "HttpProxy",
+                                                    "$ xns" : "Roo.data",
+                                                    "* prop" : "proxy"
                                                 },
                                                 {
-                                                    "text": "Delete",
-                                                    "cls": "x-btn-text-icon",
-                                                    "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
-                                                    "xtype": "Button",
-                                                    "listeners": {
-                                                        "|click": "function()\n{\n     Pman.genericDelete(_this, 'curr_rate'); \n}\n        "
-                                                    },
-                                                    "|xns": "Roo.Toolbar"
+                                                    "id" : "id",
+                                                    "root" : "data",
+                                                    "xtype" : "JsonReader",
+                                                    "$ xns" : "Roo.data",
+                                                    "$ fields" : "[\n    {\n        'name': 'curr_rate_id',\n        'type': 'int'\n    },\n    {\n        'name': 'curr_id',\n        'type': 'int'\n    },\n    {\n        'name': 'curr_id',\n        'type': 'int'\n    },\n    {\n        'name': 'curr_rate',\n        'type': 'float'\n    },\n    {\n        'name': 'curr_effective',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'curr_expires',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    }\n]",
+                                                    "* prop" : "reader",
+                                                    "totalProperty" : "total"
                                                 }
                                             ]
                                         },
                                         {
-                                            "xtype": "ColumnModel",
-                                            "header": "Curr rate",
-                                            "width": 75,
-                                            "dataIndex": "curr_rate_id",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid",
-                                            "*prop": "colModel[]"
+                                            "pageSize" : 25,
+                                            "xtype" : "PagingToolbar",
+                                            "emptyMsg" : "No curr_rate found",
+                                            "$ xns" : "Roo",
+                                            "displayMsg" : "Displaying curr_rate {0} - {1} of {2}",
+                                            "displayInfo" : true,
+                                            "* prop" : "footer"
                                         },
                                         {
-                                            "xtype": "ColumnModel",
-                                            "header": "Curr",
-                                            "width": 75,
-                                            "dataIndex": "curr_id",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid",
-                                            "*prop": "colModel[]"
+                                            "xtype" : "ColumnModel",
+                                            "header" : "From",
+                                            "width" : 150,
+                                            "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
+                                            "$ xns" : "Roo.grid",
+                                            "* prop" : "colModel[]",
+                                            "dataIndex" : "curr_effective"
                                         },
                                         {
-                                            "xtype": "ColumnModel",
-                                            "header": "Curr",
-                                            "width": 75,
-                                            "dataIndex": "curr_id",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid",
-                                            "*prop": "colModel[]"
+                                            "xtype" : "ColumnModel",
+                                            "header" : "To",
+                                            "width" : 150,
+                                            "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
+                                            "$ xns" : "Roo.grid",
+                                            "* prop" : "colModel[]",
+                                            "dataIndex" : "curr_expires"
                                         },
                                         {
-                                            "xtype": "ColumnModel",
-                                            "header": "Curr rate",
-                                            "width": 75,
-                                            "dataIndex": "curr_rate",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid",
-                                            "*prop": "colModel[]"
+                                            "align" : "right",
+                                            "xtype" : "ColumnModel",
+                                            "header" : "Rate",
+                                            "width" : 75,
+                                            "$ renderer" : "function(v) { return String.format('{0}', v); }",
+                                            "$ xns" : "Roo.grid",
+                                            "* prop" : "colModel[]",
+                                            "dataIndex" : "curr_rate"
                                         },
                                         {
-                                            "xtype": "ColumnModel",
-                                            "header": "Curr effective",
-                                            "width": 75,
-                                            "dataIndex": "curr_effective",
-                                            "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
-                                            "|xns": "Roo.grid",
-                                            "*prop": "colModel[]"
+                                            "align" : "right",
+                                            "xtype" : "ColumnModel",
+                                            "header" : "Rate",
+                                            "width" : 150,
+                                            "$ renderer" : "function(v,x,r) {\n\n     return String.format('{1}1 = {2}{0}', \n        Roo.util.Format.number(r.data.curr_rate,2),\n        r.data.base_curr_symbol,\n        r.data.curr_id_curr_symbol\n    ); \n    \n}",
+                                            "$ xns" : "Roo.grid",
+                                            "* prop" : "colModel[]",
+                                            "dataIndex" : "curr_rate1"
                                         },
                                         {
-                                            "xtype": "ColumnModel",
-                                            "header": "Curr expires",
-                                            "width": 75,
-                                            "dataIndex": "curr_expires",
-                                            "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
-                                            "|xns": "Roo.grid",
-                                            "*prop": "colModel[]"
+                                            "align" : "right",
+                                            "xtype" : "ColumnModel",
+                                            "header" : "Rate",
+                                            "width" : 150,
+                                            "$ renderer" : "function(v,x,r) {    \n     return String.format('{2}1 = {1}{0}', \n        Roo.util.Format.number(1.0/r.data.curr_rate,2),\n        r.data.base_curr_symbol,\n        r.data.curr_id_curr_symbol\n    ); \n}",
+                                            "$ xns" : "Roo.grid",
+                                            "* prop" : "colModel[]",
+                                            "dataIndex" : "curr_rate2"
                                         }
                                     ]
                                 }
                 }
             ]
         }
-    ],
-    "permname": "",
-    "modOrder": "001"
+    ]
 }
\ No newline at end of file