Pman.Tab.XtupleArAging.bjs
authorAlan Knowles <alan@roojs.com>
Thu, 5 Dec 2013 03:38:53 +0000 (11:38 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 5 Dec 2013 03:38:53 +0000 (11:38 +0800)
Pman.Tab.XtupleArAging.js

Pman.Tab.XtupleArAging.bjs
Pman.Tab.XtupleArAging.js

index b69b4f0..6d1f8f8 100644 (file)
                                             "header": "Total",
                                             "width": 150,
                                             "xtype": "ColumnModel",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
+                                            "|renderer": "function(v) { \n\n        return String.format(v*1 < 0 ? '<span style=\"color:red\">{0}</span>' : '{0}', \n            Roo.util.Format.usMoney(v)); \n    }",
                                             "|xns": "Roo.grid"
                                         }
                                     ]
index 17c8757..63bae92 100644 (file)
@@ -461,7 +461,11 @@ Pman.Tab.XtupleArAging = new Roo.XComponent({
                                     dataIndex : 'araging_total_val',
                                     header : 'Total',
                                     width : 150,
-                                    renderer : function(v) { return String.format('{0}', v); }
+                                    renderer : function(v) { 
+                                    
+                                            return String.format(v*1 < 0 ? '<span style="color:red">{0}</span>' : '{0}', 
+                                                Roo.util.Format.usMoney(v)); 
+                                        }
                                 }
                             ]
                         }