<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Include memo_ from gl_trans table in bank statement]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=5652&amp;type=atom" />
	<updated>2015-04-08T20:07:13Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=5652</id>
		<entry>
			<title type="html"><![CDATA[Re: Include memo_ from gl_trans table in bank statement]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23177#p23177" />
			<content type="html"><![CDATA[<p>Thank you!</p>]]></content>
			<author>
				<name><![CDATA[hunter12]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20235</uri>
			</author>
			<updated>2015-04-08T20:07:13Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23177#p23177</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Include memo_ from gl_trans table in bank statement]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23175#p23175" />
			<content type="html"><![CDATA[<p>Modify your <strong>function get_gl_trans_memo</strong> as follows:<br /></p><div class="codebox"><pre><code>function get_gl_trans_memo($account, $type, $trans_no)
{
    $sql = &quot;SELECT COALESCE(memo_, &#039;&#039;) AS memo_ FROM &quot;.TB_PREF.&quot;gl_trans WHERE account=&quot;
    .db_escape($account).&quot; AND type=&quot;.db_escape($type)
    .&quot; AND type_no=&quot;.db_escape($trans_no);

    $result = db_query($sql, &quot;query for gl memo_ failed&quot;);

    $row = db_fetch_row($result);
    return $row[0];
}</code></pre></div><p>This will help if the <strong>memo_</strong> field is <strong>NULL</strong>.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-04-08T16:55:54Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23175#p23175</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Include memo_ from gl_trans table in bank statement]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23174#p23174" />
			<content type="html"><![CDATA[<p>Sure.</p><p>In gl_db_bank_trans.inc, I added the following function to retrieve memo_:</p><p>function get_gl_trans_memo($account, $type, $trans_no)<br />{<br />&nbsp; &nbsp; $sql = &quot;SELECT memo_ FROM &quot;.TB_PREF.&quot;gl_trans WHERE account=&quot;<br />&nbsp; &nbsp; .db_escape($account).&quot; AND type=&quot;.db_escape($type)<br />&nbsp; &nbsp; .&quot; AND type_no=&quot;.db_escape($trans_no);</p><p>&nbsp; &nbsp; $result = db_query($sql, &quot;query for gl memo_&quot;);</p><p>&nbsp; &nbsp; $row = db_fetch_row($result);<br />&nbsp; &nbsp; return $row[0];<br />}</p><p>--------------------------------------------------------------------------------------------------------------------------------------------------------</p><p>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&nbsp; in another report that is generated through journal entry and whose variable-values I want to see).</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while ($myrow=db_fetch($trans))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($zero == 0 &amp;&amp; $myrow[&#039;amount&#039;] == 0.0)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $total += $myrow[&#039;amount&#039;];<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $name = get_gl_trans_memo($ident,$myrow[&#039;type&#039;],$myrow[&#039;trans_no&#039;]);&nbsp; //Retrieves memo corresponding to bank transaction.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $name_to_store = parse_notes_params($name); //Parses memo_ string<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;TextCol(0, 1, $systypes_array[$myrow[&quot;type&quot;]]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;TextCol(1, 2,&nbsp; &nbsp; $myrow[&#039;trans_no&#039;]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;TextCol(2, 3,&nbsp; &nbsp; $myrow[&#039;ref&#039;]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;DateCol(3, 4,&nbsp; &nbsp; $myrow[&quot;trans_date&quot;], true);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//Handles case for bank transaction created through a form different than journal entry.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (payment_person_name($myrow[&quot;person_type_id&quot;],$myrow[&quot;person_id&quot;], false) == &quot;&quot; ){<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;TextCol(4, 5,$name_to_store[&#039;notes&#039;]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;TextCol(4, 5,payment_person_name($myrow[&quot;person_type_id&quot;],$myrow[&quot;person_id&quot;], false));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </p><br /><p>-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>]]></content>
			<author>
				<name><![CDATA[hunter12]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20235</uri>
			</author>
			<updated>2015-04-08T16:33:59Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23174#p23174</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Include memo_ from gl_trans table in bank statement]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23024#p23024" />
			<content type="html"><![CDATA[<p>Excellent, care to post the code?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-03-29T11:59:36Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23024#p23024</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Include memo_ from gl_trans table in bank statement]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23017#p23017" />
			<content type="html"><![CDATA[<p>I found a workarounf for this. I modified one of the functions in the gl_db_bank_trans.inc file to retrieve the memo_ field of a transaction and then I call that function in the banking report using the account_code variable.</p><br /><p>Thank you.</p>]]></content>
			<author>
				<name><![CDATA[hunter12]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20235</uri>
			</author>
			<updated>2015-03-27T20:22:10Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23017#p23017</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Include memo_ from gl_trans table in bank statement]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23015#p23015" />
			<content type="html"><![CDATA[<p>Without memo_, the banking report looks like this:</p><p>Type&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #&nbsp; &nbsp; &nbsp;Reference&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Date&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Person/Item&nbsp; &nbsp; &nbsp; &nbsp;Debit&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Credit&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Balance</p><p>Bank Deposit&nbsp; &nbsp; &nbsp; &nbsp; 6&nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;03/03/2015&nbsp; &nbsp; &nbsp; john&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100.00<br />Journal Entry&nbsp; &nbsp; &nbsp; &nbsp;28&nbsp; &nbsp; &nbsp; &nbsp;7&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 03/23/2015&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100.00</p><p>Person/item gets its data from the person_id and person_type_id fields in bank_trans table.</p><p>With the memo_ field it should print this:</p><p>Type&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #&nbsp; &nbsp; &nbsp;Reference&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Date&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Person/Item&nbsp; &nbsp; &nbsp; &nbsp;Debit&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Credit&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Balance</p><p>Bank Deposit&nbsp; &nbsp; &nbsp; &nbsp; 6&nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;03/03/2015&nbsp; &nbsp; &nbsp; john&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100.00<br />Journal Entry&nbsp; &nbsp; &nbsp; &nbsp;28&nbsp; &nbsp; &nbsp; &nbsp;7&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 03/23/2015&nbsp; &nbsp; &nbsp; &nbsp;george&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100.00</p><br /><br /><p>where george is the string stored in memo_ when creating the journal entry.</p><p>What I ultimate want is to be able to retrieve memo_ from the gl_trans table using the&nbsp; keys from the bank_trans table that are present in gl_trans table. This would be only for journal entry since other transaction forms innclude the field for entering the personś id and therefore show up in the banking report.</p><br /><p>Thank you.</p>]]></content>
			<author>
				<name><![CDATA[hunter12]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20235</uri>
			</author>
			<updated>2015-03-27T19:09:25Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23015#p23015</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Include memo_ from gl_trans table in bank statement]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23014#p23014" />
			<content type="html"><![CDATA[<p>Make a mockup of with and without the memo_ field and paste the link to the image here so that we can advise you. FA v2.4 now in development state now supports the person_id in these reports (hopefully).</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-03-27T15:58:27Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23014#p23014</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Include memo_ from gl_trans table in bank statement]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23011#p23011" />
			<content type="html"><![CDATA[<p>Hello, </p><p>[Using FA 2.3]</p><p>I would like to know how I can get memo_ from the gl_trans table to show up in the bank statement report.</p><p>Seems like the bank statement report is made using the bank_trans table, which does not include the memo_ field.</p><p>There is no problem for entries created using payment or quick entry because they pull the person_id from the form. However, whenever I create an entry using the journal entry in the banking and general ledger section, and then proceed to print a bank statement, the memo_ field that I entered does not appear in the report.</p><p>I would like to include memo_ in the report for those entries that I create with journal entry. As of now, nothing show up for this case.</p><br /><p>Thank you.</p>]]></content>
			<author>
				<name><![CDATA[hunter12]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20235</uri>
			</author>
			<updated>2015-03-27T14:11:27Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23011#p23011</id>
		</entry>
</feed>
