<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Fiscal year error on every transaction]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=7794</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7794&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Fiscal year error on every transaction.]]></description>
		<lastBuildDate>Wed, 23 Jan 2019 10:33:58 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34061#p34061</link>
			<description><![CDATA[<p>this worked for me as well, but I didn&#039;t reinstall - thanks</p>]]></description>
			<author><![CDATA[null@example.com (spider)]]></author>
			<pubDate>Wed, 23 Jan 2019 10:33:58 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34061#p34061</guid>
		</item>
		<item>
			<title><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33236#p33236</link>
			<description><![CDATA[<p>So I deleted and reinstalled the whole system. Followed this (https://frontaccounting.com/fawiki/index.php?n=Help.FiscalYears) step by step.</p><p>The problem here is that when I installed the system the default fiscal year is 1-1-2018 to 31-12-2018. I then create a small year 1-1-2019 to 30-6-2019 and another full year 1-7-2019 to 30-6-2020.</p><p>Now I close and delete 1-1-2018 to 31-12-2018 and also the small year 1-1-2019 to 30-6-2019. This is where the problem lies. Once these years are closed the sys_prefs.gl_closing_date is set to &#039;2019-06-30&#039;.</p><p>Now when I create 1-7-2018 to 30-6-2019 (which is the current year right now) and set it as the current year, the fiscal year closed error pops up as the gl_closing_date is set to &#039;2019-06-30&#039;.</p><p>So here&#039;s how I fixed this issue for myself:</p><p>1. I reinstalled the whole system again<br />2. Went in to the fiscal_year table and changed the years from (1-1-2018 to 31-12-2018) to (1-1-2017 to 31-12-2017)</p><p>Then followed the wiki link provided above and now everything is working properly.</p>]]></description>
			<author><![CDATA[null@example.com (mfahad1)]]></author>
			<pubDate>Sun, 11 Nov 2018 21:05:48 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33236#p33236</guid>
		</item>
		<item>
			<title><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33168#p33168</link>
			<description><![CDATA[<p>Changing the fiscal id will need to be reflected in some other tables as well.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Tue, 06 Nov 2018 16:57:49 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33168#p33168</guid>
		</item>
		<item>
			<title><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33161#p33161</link>
			<description><![CDATA[<p>Have you checked/re-check the basics:-</p><p>What is the active fiscal year in company setup? </p><p>Is the fiscal year selected closed?</p><p>Did you make code changes? Change them back.</p><p>Clear cache - logout login - go to Preferences click the &#039;Update&#039; button.</p><p>Did you create backup before you started changes? (Always a good idea then you can revert if you made a mistake)</p><p>If you still having issues try on clean install as suggested earlier</p>]]></description>
			<author><![CDATA[null@example.com (poncho1234)]]></author>
			<pubDate>Mon, 05 Nov 2018 19:34:58 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33161#p33161</guid>
		</item>
		<item>
			<title><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33155#p33155</link>
			<description><![CDATA[<p>I changed the dates in the fiscal year. The id 10 is now 18-19 and 11 is 19-20.</p><p>made the current fiscal year 18-19.</p><p>Still getting the error. I guess the variable gl_closing_date in the sys_prefs table is 2019-06-30 and that&#039;s where the issue lies.</p>]]></description>
			<author><![CDATA[null@example.com (mfahad1)]]></author>
			<pubDate>Mon, 05 Nov 2018 13:17:48 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33155#p33155</guid>
		</item>
		<item>
			<title><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33150#p33150</link>
			<description><![CDATA[<p>I made the fiscal years by creating a makeshift one and then deleting old ones and creating them again, like stated in the wiki.</p><p>That&#039;s exactly how I ended up with the ID of the later year larger than the current one.</p>]]></description>
			<author><![CDATA[null@example.com (mfahad1)]]></author>
			<pubDate>Mon, 05 Nov 2018 05:56:11 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33150#p33150</guid>
		</item>
		<item>
			<title><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33149#p33149</link>
			<description><![CDATA[<p>This is documented in the <a href="https://frontaccounting.com/fawiki/index.php?n=Help.FiscalYears">wiki</a></p><p>But where you are now, maybe a fresh install and follow the instructions in the wiki is the <strong>easiest</strong> way to go.</p><p>Or as apmuthu states in post 4 above</p><div class="quotebox"><cite>apmuthu wrote:</cite><blockquote><p>The sequence of the ids must match the sort order of the fiscal year start field.</p></blockquote></div><p>Your 2019 - 2020 comes <strong>before</strong> your 2018 - 2019<br />so delete 2019 - 2020 and then enter it again</p>]]></description>
			<author><![CDATA[null@example.com (poncho1234)]]></author>
			<pubDate>Sun, 04 Nov 2018 17:44:46 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33149#p33149</guid>
		</item>
		<item>
			<title><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33146#p33146</link>
			<description><![CDATA[<p>id&nbsp; &nbsp; &nbsp; begin&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end&nbsp; &nbsp; &nbsp; &nbsp;closed<br />10 2019-07-01 2020-06-30&nbsp; &nbsp;0<br />11 2018-07-01 2019-06-30&nbsp; &nbsp;0</p><p>How do I fix this? To change the year from the default Jan-Dec, I had to close n delete the old ones and then create them again in the Jul-Jun format.</p><p>Can I just use an update query to switch the dates?</p>]]></description>
			<author><![CDATA[null@example.com (mfahad1)]]></author>
			<pubDate>Sun, 04 Nov 2018 14:59:34 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33146#p33146</guid>
		</item>
		<item>
			<title><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33142#p33142</link>
			<description><![CDATA[<p>List the contents of the fiscal year table. The sequence of the ids must match the sort order of the fiscal year start field.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sun, 04 Nov 2018 09:37:49 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33142#p33142</guid>
		</item>
		<item>
			<title><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33141#p33141</link>
			<description><![CDATA[<p>That&#039;s the first thing I checked. It&#039;s set correctly 1/7/2018 to 30/6/2019.</p>]]></description>
			<author><![CDATA[null@example.com (mfahad1)]]></author>
			<pubDate>Sun, 04 Nov 2018 08:41:07 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33141#p33141</guid>
		</item>
		<item>
			<title><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33139#p33139</link>
			<description><![CDATA[<p>Set your active fiscal year in company setup. Do not change the code.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sun, 04 Nov 2018 01:36:03 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33139#p33139</guid>
		</item>
		<item>
			<title><![CDATA[Fiscal year error on every transaction]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33134#p33134</link>
			<description><![CDATA[<p>Hi,</p><p>I recently installed FA 2.4.4</p><p>I deleted the fiscal years and set the year to 01/07/2018 to 30/06/2019.</p><p>Now when I add a direct invoice with the date as 04/11/2018 (4th Nov 2018) it gives an error:</p><p>&quot;The entered date is out of fiscal year or is closed for further data entry.&quot;</p><p>I went into the code and commented the following code in the function is_date_in_fiscalyear($date, $date):</p><p>if (is_date_closed($date2))<br />&nbsp; &nbsp; &nbsp; &nbsp; return 0;</p><p>The error stopped and I could enter the invoice.</p><p>This is the is_date_closed function:</p><p>function is_date_closed($date)<br />{<br />&nbsp; &nbsp; return !date1_greater_date2($date, sql2date(get_company_pref(&#039;gl_closing_date&#039;)));<br />}</p><p>My gl_closing_date is 30/6/2019<br />The date entered in the invoice is 04/11/2018</p><p>So the function date1_greater_date2 returns false as my date1 is not greater than date2. The ! before the function means it will return true, which means the function is_date_in_fiscalyear will return false, which of course is not the right result.</p><p>Also the code further in the is_date_in_fiscalyear is:</p><p>&nbsp; &nbsp; &nbsp; &nbsp; $myrow = get_current_fiscalyear();<br />&nbsp; &nbsp; $begin = sql2date($myrow[&#039;begin&#039;]);<br />&nbsp; &nbsp; $end = sql2date($myrow[&#039;end&#039;]);<br />&nbsp; &nbsp; if (date1_greater_date2($begin, $date2) || date1_greater_date2($date2, $end))<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; return 0;<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; return 1;</p><p>This code checks if the transaction being entered is in the fiscal year, so I don&#039;t understand why we need is_date_closed function.</p><p>Now finally my question is that if I keep that code commented will it give me any problems?</p><p>It&#039;s 5:30 am here i&#039;m running on caffine, I might be totally wrong here, I apologize if I am.</p>]]></description>
			<author><![CDATA[null@example.com (mfahad1)]]></author>
			<pubDate>Sun, 04 Nov 2018 00:38:54 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33134#p33134</guid>
		</item>
	</channel>
</rss>
