Sure.
In gl_db_bank_trans.inc, I added the following function to retrieve memo_:
function get_gl_trans_memo($account, $type, $trans_no)
{
$sql = "SELECT memo_ FROM ".TB_PREF."gl_trans WHERE account="
.db_escape($account)." AND type=".db_escape($type)
." AND type_no=".db_escape($trans_no);
$result = db_query($sql, "query for gl memo_");
$row = db_fetch_row($result);
return $row[0];
}
--------------------------------------------------------------------------------------------------------------------------------------------------------
In rep601.php for banking report, I modified the code inside the while loop (see below) and I used the parse function provided by apmunthu to retrieve all strings stored in memo_ except the variable_values(I used the parse function in another report that is generated through journal entry and whose variable-values I want to see).
while ($myrow=db_fetch($trans))
{
if ($zero == 0 && $myrow['amount'] == 0.0)
continue;
$total += $myrow['amount'];
$name = get_gl_trans_memo($ident,$myrow['type'],$myrow['trans_no']); //Retrieves memo corresponding to bank transaction.
$name_to_store = parse_notes_params($name); //Parses memo_ string
$rep->TextCol(0, 1, $systypes_array[$myrow["type"]]);
$rep->TextCol(1, 2, $myrow['trans_no']);
$rep->TextCol(2, 3, $myrow['ref']);
$rep->DateCol(3, 4, $myrow["trans_date"], true);
//Handles case for bank transaction created through a form different than journal entry.
if (payment_person_name($myrow["person_type_id"],$myrow["person_id"], false) == "" ){
$rep->TextCol(4, 5,$name_to_store['notes']);
}
$rep->TextCol(4, 5,payment_person_name($myrow["person_type_id"],$myrow["person_id"], false));
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------