$prev = get_balance($account["account_code"], $dimension, $dimension2, $begin, $from, false, false);
$curr = get_balance($account["account_code"], $dimension, $dimension2, $from, $to, true, true);
$tot = get_balance($account["account_code"], $dimension, $dimension2, $begin, $to, false, true);
$prev = get_balance($account["account_code"], $dimension, $dimension2, $begin, $from, false, false);
$curr = get_balance($account["account_code"], $dimension, $dimension2, $from, $to, true, true);
$tot = get_balance($account["account_code"], $dimension, $dimension2, $begin, $to, false, true);