<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Journal Inquiry NULL fix]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=5694</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=5694&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Journal Inquiry NULL fix.]]></description>
		<lastBuildDate>Sat, 11 Apr 2015 20:18:41 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Journal Inquiry NULL fix]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=23234#p23234</link>
			<description><![CDATA[<p>This issue has now been fixed in the db_pager.inc file itself using a subquery and hence above fix is not needed. It has been <a href="https://github.com/FrontAccountingERP/FA/commit/8d0b87e3e7dcf325fd55fe5f8c6fb3b8b45ffaa1">committed in the Official GitHub Mirror</a>.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sat, 11 Apr 2015 20:18:41 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=23234#p23234</guid>
		</item>
		<item>
			<title><![CDATA[Journal Inquiry NULL fix]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=23222#p23222</link>
			<description><![CDATA[<p>In the Journal Inquiry page, the <strong>db_pager.inc</strong> seems to grey out (disable) the <strong>First Prev Next Last</strong> page links since it is unable to get the total number of records using <strong>COUNT(DISTINCT(CONCAT group_by_clause))</strong>. This is because, the <strong>a.gl_seq</strong> field is NULL in many records by design (thanks to an archaic MySQL 3 workaround for lack of subqueries - see <strong>includes/db/audit_trail_db.inc</strong> first function).</p><p>The following patch will fix it:</p><div class="codebox"><pre><code>--- gl/includes/db/gl_db_trans.inc    Sat Apr 04 01:10:00 2015
+++ gl/includes/db/gl_db_trans.inc    Fri Apr 10 21:58:56 2015
@@ -637,7 +637,7 @@
     if (!$alsoclosed) {
         $sql .= &quot; AND gl_seq=0&quot;;
     }
-    $sql .= &quot; GROUP BY gl.tran_date, a.gl_seq, gl.type, gl.type_no&quot;;
+    $sql .= &quot; GROUP BY gl.tran_date, IF(ISNULL(a.gl_seq),0,a.gl_seq), gl.type, gl.type_no&quot;;
     return $sql;
 }
 ?&gt;
\ No newline at end of file</code></pre></div><p>The <strong>IF(ISNULL(...</strong> construct can be replaced in all places in the file with <strong>COALESCE(a.gl_seq,0)</strong></p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Fri, 10 Apr 2015 16:45:36 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=23222#p23222</guid>
		</item>
	</channel>
</rss>
