Pman.Tab.XtupleCurrency.bjs
authorAlan Knowles <alan@roojs.com>
Mon, 23 Dec 2013 10:40:37 +0000 (18:40 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 23 Dec 2013 10:40:37 +0000 (18:40 +0800)
Pman.Tab.XtupleCurrency.js

Pman.Tab.XtupleCurrency.bjs
Pman.Tab.XtupleCurrency.js

index 35b5f28..59fe4dc 100644 (file)
                                             "|xns": "Roo.grid"
                                         },
                                         {
-                                            "xtype": "ColumnModel",
+                                            "*prop": "colModel[]",
+                                            "dataIndex": "curr_symbol",
                                             "header": "Curr symbol",
                                             "width": 200,
-                                            "dataIndex": "curr_symbol",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid",
-                                            "*prop": "colModel[]"
+                                            "xtype": "ColumnModel",
+                                            "|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"
                                         },
                                         {
                                             "xtype": "ColumnModel",
index a1662a8..78b0957 100644 (file)
@@ -159,10 +159,14 @@ Pman.Tab.XtupleCurrency = new Roo.XComponent({
                                 {
                                     xtype: 'ColumnModel',
                                     xns: Roo.grid,
+                                    dataIndex : 'curr_symbol',
                                     header : 'Curr symbol',
                                     width : 200,
-                                    dataIndex : 'curr_symbol',
-                                    renderer : function(v) { return String.format('{0}', v); }
+                                    renderer : function(v,x,r) { 
+                                    
+                                        return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v); 
+                                        
+                                    }
                                 },
                                 {
                                     xtype: 'ColumnModel',