+ if ($showbalance == 1)
+ {
+ $begin = begin_fiscalyear();
+ if (is_account_balancesheet($account["account_code"]))
+ $begin = "";
+ $balance = get_gl_trans_from_to($begin, ToDay(), $account["account_code"], 0);
+ }
+ $rep->TextCol(0, 1, $account['account_code']);
+ $rep->TextCol(1, 2, $account['account_name']);
+ $rep->TextCol(2, 3, $account['account_code2']);
+ if ($showbalance == 1)
+ $rep->AmountCol(3, 4, $balance, $dec);
+
+ $rep->NewLine();
+ if ($rep->row < $rep->bottomMargin + 3 * $rep->lineHeight)
+ {
+ $rep->Line($rep->row - 2);
+ $rep->Header();
+ }
+ }