<?php
/** GARRISON MODIFIED 4/20/2013 **/
function to_currency($number)
{
	$CI =& get_instance();
	$currency_symbol = $CI->config->item('currency_symbol') ? $CI->config->item('currency_symbol') : 'BDT';
	if($number >= 0)
	{
		if($CI->config->item('currency_side') !== 'currency_side')
			return number_format($number, 2, '.', '')."&nbsp;".$currency_symbol;
		else
			return number_format($number, 2, '.', '').$currency_symbol;
	}
    else
    {
    	if($CI->config->item('currency_side') !== 'currency_side')
    		return '-'.number_format(abs($number), 2, '.', '')."&nbsp;".$currency_symbol;
    	else
    		return '-'.number_format(abs($number), 2, '.', '').$currency_symbol;
    }
}
/** END MODIFIED **/

function to_currency_no_money($number)
{
	return number_format($number, 2, '.', '');
}
?>