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

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

index 59fe4dc..5e62a98 100644 (file)
                                             "|xns": "Roo.grid"
                                         },
                                         {
-                                            "xtype": "ColumnModel",
+                                            "*prop": "colModel[]",
+                                            "dataIndex": "curr_abbr",
                                             "header": "Curr abbr",
                                             "width": 200,
-                                            "dataIndex": "curr_abbr",
-                                            "|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"
                                         }
                                     ]
                                 }
index 78b0957..26b6f27 100644 (file)
@@ -171,10 +171,14 @@ Pman.Tab.XtupleCurrency = new Roo.XComponent({
                                 {
                                     xtype: 'ColumnModel',
                                     xns: Roo.grid,
+                                    dataIndex : 'curr_abbr',
                                     header : 'Curr abbr',
                                     width : 200,
-                                    dataIndex : 'curr_abbr',
-                                    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); 
+                                        
+                                    }
                                 }
                             ]
                         }