<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Bug in gl/includes/db/gl_journal.inc]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=9410</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=9410&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Bug in gl/includes/db/gl_journal.inc.]]></description>
		<lastBuildDate>Wed, 11 Aug 2021 16:06:33 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Bug in gl/includes/db/gl_journal.inc]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=39837#p39837</link>
			<description><![CDATA[<p>Actually the old query INSERT INTO table1 SELECT col.. FROM table2 is a right syntax.<br />But better to keep the new query because if the subquery SELECT return null the system will raise an error meanwhile the old query can run successfully even when the SELECT subquery returns null</p>]]></description>
			<author><![CDATA[null@example.com (notrinos)]]></author>
			<pubDate>Wed, 11 Aug 2021 16:06:33 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=39837#p39837</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in gl/includes/db/gl_journal.inc]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=39825#p39825</link>
			<description><![CDATA[<p>Yes, it is amazing that this bug is first detected now after so many minor releases.</p><p>Maybe because the entrance is mostly done by the Sales routines.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sun, 08 Aug 2021 15:46:24 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=39825#p39825</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in gl/includes/db/gl_journal.inc]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=39824#p39824</link>
			<description><![CDATA[<p>Thanks. U have checked this bug has persisted since at least 2.4.2 and it is quite critical because data entry via journal entry feature that relate to account receivable will write the cust_trans using this method and it will fail because the query is wrong.</p>]]></description>
			<author><![CDATA[null@example.com (barbarian)]]></author>
			<pubDate>Sun, 08 Aug 2021 12:07:36 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=39824#p39824</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in gl/includes/db/gl_journal.inc]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=39823#p39823</link>
			<description><![CDATA[<p>This has been fixed and committed to stable repo. Thanks @barbarian for finding this.</p><p>A fixed copy can be downloaded and replaced.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sun, 08 Aug 2021 10:34:21 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=39823#p39823</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in gl/includes/db/gl_journal.inc]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=39822#p39822</link>
			<description><![CDATA[<p>@joe,<br />Can you update the code and commit it to stable version&nbsp; downloads.</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Sun, 08 Aug 2021 07:07:58 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=39822#p39822</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in gl/includes/db/gl_journal.inc]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=39820#p39820</link>
			<description><![CDATA[<p>Instead of</p><div class="codebox"><pre><code>$sql = &quot;INSERT INTO &quot;.TB_PREF.&quot;debtor_trans (trans_no, type, debtor_no, branch_code, tran_date, reference, ov_amount, rate)
        SELECT &quot;
        .db_escape($trans_no).&quot;, &quot;.db_escape($trans_type).&quot;, debtor_no,&quot;
        .db_escape($branch_id).&quot;,&#039;&quot;.date2sql($date).&quot;&#039;, &quot;.db_escape($ref).&quot;,&quot;
        .db_escape($amount).&quot;, &quot;.db_escape($rate).&quot;
        FROM &quot;.TB_PREF.&quot;cust_branch WHERE branch_code=&quot;.db_escape($branch_id);</code></pre></div><p>It should be</p><div class="codebox"><pre><code>$sql = &quot;INSERT INTO &quot;.TB_PREF.&quot;debtor_trans (trans_no, type, debtor_no, branch_code, tran_date, reference, ov_amount, rate)
        VALUES (&quot;
        .db_escape($trans_no).&quot;, &quot;.db_escape($trans_type).&quot;, (SELECT debtor_no FROM &quot;.TB_PREF.&quot;cust_branch WHERE branch_code=&quot;.db_escape($branch_id). &quot;) ,&quot;
        .db_escape($branch_id).&quot;,&#039;&quot;.date2sql($date).&quot;&#039;, &quot;.db_escape($ref).&quot;,&quot;
        .db_escape($amount).&quot;, &quot;.db_escape($rate).&quot;)&quot;;</code></pre></div><p>The sub query SELECT debtor_no ... result should bebecome the debtor_no column when inserting.</p>]]></description>
			<author><![CDATA[null@example.com (barbarian)]]></author>
			<pubDate>Sat, 07 Aug 2021 23:18:00 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=39820#p39820</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in gl/includes/db/gl_journal.inc]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=39819#p39819</link>
			<description><![CDATA[<div class="quotebox"><cite>barbarian wrote:</cite><blockquote><p>I found this incorrect sql query:</p><p><a href="https://i.imgur.com/YcYMfc3.png"> Screenshot </a></p></blockquote></div><p>The SQL Query is wrong. INSERT INTO .... SELECT FROM ...</p>]]></description>
			<author><![CDATA[null@example.com (barbarian)]]></author>
			<pubDate>Sat, 07 Aug 2021 18:08:08 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=39819#p39819</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in gl/includes/db/gl_journal.inc]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=39815#p39815</link>
			<description><![CDATA[<p>Can you elaborate the issue in text?</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Sat, 07 Aug 2021 14:58:42 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=39815#p39815</guid>
		</item>
		<item>
			<title><![CDATA[Bug in gl/includes/db/gl_journal.inc]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=39814#p39814</link>
			<description><![CDATA[<p>I found this incorrect sql query:</p><p><a href="https://i.imgur.com/YcYMfc3.png"> Screenshot </a></p>]]></description>
			<author><![CDATA[null@example.com (barbarian)]]></author>
			<pubDate>Sat, 07 Aug 2021 14:22:01 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=39814#p39814</guid>
		</item>
	</channel>
</rss>
