<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Closing a fiscal year needs to update the query a bit.]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=7666</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7666&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Closing a fiscal year needs to update the query a bit..]]></description>
		<lastBuildDate>Sun, 26 Aug 2018 15:14:00 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Closing a fiscal year needs to update the query a bit.]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32535#p32535</link>
			<description><![CDATA[<p>No, not really. However in normal conditions the old code should work.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sun, 26 Aug 2018 15:14:00 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32535#p32535</guid>
		</item>
		<item>
			<title><![CDATA[Re: Closing a fiscal year needs to update the query a bit.]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32534#p32534</link>
			<description><![CDATA[<p>@joe: any developments?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sun, 26 Aug 2018 11:05:53 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32534#p32534</guid>
		</item>
		<item>
			<title><![CDATA[Re: Closing a fiscal year needs to update the query a bit.]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32495#p32495</link>
			<description><![CDATA[<p>Ok, let me investigate this a little more.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sat, 18 Aug 2018 13:58:59 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32495#p32495</guid>
		</item>
		<item>
			<title><![CDATA[Re: Closing a fiscal year needs to update the query a bit.]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32494#p32494</link>
			<description><![CDATA[<div class="quotebox"><cite>joe wrote:</cite><blockquote><p>But isn&#039;t the voided entries all set to 0 amounts? So in my eyes this is a redundant change, right?</p><p>Joe</p></blockquote></div><p>I guess you are right. But one of a FA user asked to check it,when he closes the fiscal year. he had some voided balance included in the balance. His version is 2.4.3.</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Sat, 18 Aug 2018 12:11:03 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32494#p32494</guid>
		</item>
		<item>
			<title><![CDATA[Re: Closing a fiscal year needs to update the query a bit.]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32492#p32492</link>
			<description><![CDATA[<p>But isn&#039;t the voided entries all set to 0 amounts? So in my eyes this is a redundant change, right?</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sat, 18 Aug 2018 06:26:49 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32492#p32492</guid>
		</item>
		<item>
			<title><![CDATA[Re: Closing a fiscal year needs to update the query a bit.]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32491#p32491</link>
			<description><![CDATA[<p>@kvvaradha: Since you are making a LEFT JOIN for the voided entries, there could be many null voided entries in the result set that would have the <strong>v.date_</strong> field as NULL anyway!</p><p>@joe: can polish it up and check and include it if needed.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Fri, 17 Aug 2018 16:05:35 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32491#p32491</guid>
		</item>
		<item>
			<title><![CDATA[Re: Closing a fiscal year needs to update the query a bit.]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32486#p32486</link>
			<description><![CDATA[<div class="quotebox"><cite>rafat wrote:</cite><blockquote><p>Which file is this in?</p></blockquote></div><p>Fiscal years db file. The fiscal year close function</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Fri, 17 Aug 2018 02:28:22 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32486#p32486</guid>
		</item>
		<item>
			<title><![CDATA[Re: Closing a fiscal year needs to update the query a bit.]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32482#p32482</link>
			<description><![CDATA[<p>@rafat, numerous text editors have search in file functionality(Notepad++ for one), and it takes seconds to carry out</p>]]></description>
			<author><![CDATA[null@example.com (poncho1234)]]></author>
			<pubDate>Thu, 16 Aug 2018 14:30:01 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32482#p32482</guid>
		</item>
		<item>
			<title><![CDATA[Re: Closing a fiscal year needs to update the query a bit.]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32481#p32481</link>
			<description><![CDATA[<p>Which file is this in?</p>]]></description>
			<author><![CDATA[null@example.com (rafat)]]></author>
			<pubDate>Thu, 16 Aug 2018 14:15:43 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32481#p32481</guid>
		</item>
		<item>
			<title><![CDATA[Closing a fiscal year needs to update the query a bit.]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=32479#p32479</link>
			<description><![CDATA[<p>The fiscal year close needs to change the query to get the amount.</p><p>It was now like this.</p><div class="codebox"><pre><code>// retrieve total balances from balance sheet accounts
    $sql = &quot;SELECT SUM(amount) FROM &quot;.TB_PREF.&quot;gl_trans INNER JOIN &quot;.TB_PREF.&quot;chart_master ON account=account_code
        INNER JOIN &quot;.TB_PREF.&quot;chart_types ON account_type=id INNER JOIN &quot;.TB_PREF.&quot;chart_class ON class_id=cid 
        WHERE ctype&gt;=&quot;.CL_ASSETS.&quot; AND ctype &lt;=&quot;.CL_EQUITY.&quot; AND tran_date &lt;= &#039;$to&#039;&quot;;</code></pre></div><p>And it should be like this </p><div class="codebox"><pre><code>// retrieve total balances from balance sheet accounts        
        $sql = &quot;SELECT SUM(amount) FROM &quot;.TB_PREF.&quot;gl_trans trans LEFT JOIN &quot;.TB_PREF.&quot;voided v ON trans.type_no=v.id AND v.type=trans.type INNER JOIN &quot;.TB_PREF.&quot;chart_master ON account=account_code
        INNER JOIN &quot;.TB_PREF.&quot;chart_types types ON account_type=types.id INNER JOIN &quot;.TB_PREF.&quot;chart_class ON class_id=cid WHERE ctype&gt;=&quot;.CL_ASSETS.&quot; AND ctype &lt;=&quot;.CL_EQUITY.&quot; AND tran_date &lt;= &#039;$to&#039; AND ISNULL(v.date_)&quot;;</code></pre></div><p>I think we missed to check voided transactions before getting results.</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Thu, 16 Aug 2018 09:53:55 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=32479#p32479</guid>
		</item>
	</channel>
</rss>
