while ($account=db_fetch($result))
{
$per_balance = get_gl_trans_from_to($from, $to, $account["account_code"], $dimension, $dimension2);
while ($account=db_fetch($result))
{
$per_balance = get_gl_trans_from_to($from, $to, $account["account_code"], $dimension, $dimension2);