+function print_gl_rows(&$rep, $result, $title)
+{
+ global $systypes_array;
+
+ $dec = user_price_dec();
+
+ if (db_num_rows($result))
+ {
+ $rep->Line($rep->row - 2);
+ $rep->NewLine();
+ $rep->Font('italic');
+ $rep->TextCol(3, 11, $title);
+ $rep->Font();
+ $rep->Line($rep->row - 2);
+ while($myrow = db_fetch($result)) {
+ $rep->NewLine();
+ $rep->TextCol(0, 2, $systypes_array[$myrow['type']] . ' ' . $myrow['type_no'], -2);
+ $rep->TextCol(2, 3, sql2date($myrow["tran_date"]), -2);
+ $rep->TextCol(3, 4, $myrow['account'], -2);
+ $rep->TextCol(4, 5, $myrow['account_name'], -2);
+ if ($myrow['amount'] > 0.0)
+ $rep->AmountCol(5, 6, $myrow['amount'], $dec);
+ else
+ $rep->AmountCol(6, 7, $myrow['amount'] * -1, $dec, -1);
+ $rep->TextCol(8, 11, $myrow['memo_']);
+ }
+ }
+}
+