<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Fiscal year error on every transaction]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7794&amp;type=atom" />
	<updated>2019-01-23T10:33:58Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7794</id>
		<entry>
			<title type="html"><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34061#p34061" />
			<content type="html"><![CDATA[<p>this worked for me as well, but I didn&#039;t reinstall - thanks</p>]]></content>
			<author>
				<name><![CDATA[spider]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=44359</uri>
			</author>
			<updated>2019-01-23T10:33:58Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34061#p34061</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33236#p33236" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[mfahad1]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=16438</uri>
			</author>
			<updated>2018-11-11T21:05:48Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33236#p33236</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33168#p33168" />
			<content type="html"><![CDATA[<p>Changing the fiscal id will need to be reflected in some other tables as well.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-11-06T16:57:49Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33168#p33168</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33161#p33161" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[poncho1234]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19944</uri>
			</author>
			<updated>2018-11-05T19:34:58Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33161#p33161</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33155#p33155" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[mfahad1]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=16438</uri>
			</author>
			<updated>2018-11-05T13:17:48Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33155#p33155</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33150#p33150" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[mfahad1]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=16438</uri>
			</author>
			<updated>2018-11-05T05:56:11Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33150#p33150</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33149#p33149" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[poncho1234]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19944</uri>
			</author>
			<updated>2018-11-04T17:44:46Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33149#p33149</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33146#p33146" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[mfahad1]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=16438</uri>
			</author>
			<updated>2018-11-04T14:59:34Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33146#p33146</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33142#p33142" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-11-04T09:37:49Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33142#p33142</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33141#p33141" />
			<content type="html"><![CDATA[<p>That&#039;s the first thing I checked. It&#039;s set correctly 1/7/2018 to 30/6/2019.</p>]]></content>
			<author>
				<name><![CDATA[mfahad1]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=16438</uri>
			</author>
			<updated>2018-11-04T08:41:07Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33141#p33141</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fiscal year error on every transaction]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33139#p33139" />
			<content type="html"><![CDATA[<p>Set your active fiscal year in company setup. Do not change the code.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-11-04T01:36:03Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33139#p33139</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Fiscal year error on every transaction]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33134#p33134" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[mfahad1]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=16438</uri>
			</author>
			<updated>2018-11-04T00:38:54Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33134#p33134</id>
		</entry>
</feed>
