build function for format number to fix bug in ExtJS4