<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Leap Year (Period Y-1) Not included in Profit and Loss]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=6848&amp;type=atom" />
	<updated>2017-10-24T06:24:53Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=6848</id>
		<entry>
			<title type="html"><![CDATA[Re: Leap Year (Period Y-1) Not included in Profit and Loss]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29172#p29172" />
			<content type="html"><![CDATA[<p>I too have no problems rendering them. Attached are the outputs from the en-US-demo.sql CoA.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-10-24T06:24:53Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29172#p29172</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Leap Year (Period Y-1) Not included in Profit and Loss]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29169#p29169" />
			<content type="html"><![CDATA[<p>Strange. I have no problems rendering it.</p><p>Can you set the $go_debug flag in config.php to 1 or 2 to trap any errors.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2017-10-23T20:51:16Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29169#p29169</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Leap Year (Period Y-1) Not included in Profit and Loss]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29168#p29168" />
			<content type="html"><![CDATA[<p>Joe</p><p>Report rep707.php does not render any return. Something must be wrong with it. Do not know if this report 707 is for 2.4 or 2.3?</p><p>The Balancesheet report works, but when you select Profit and Loss Statement with Period Y-1 instead of accumulated, the report does not render</p>]]></content>
			<author>
				<name><![CDATA[seahawk]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=544</uri>
			</author>
			<updated>2017-10-23T20:25:28Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29168#p29168</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Leap Year (Period Y-1) Not included in Profit and Loss]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28733#p28733" />
			<content type="html"><![CDATA[<p>SourceForge is temporarily in maintenance mode.<br />Download the whole set of post release changed files from <a href="https://frontaccounting.com/punbb/viewtopic.php?pid=28478#p28478">this post</a>.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-09-26T15:06:02Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28733#p28733</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Leap Year (Period Y-1) Not included in Profit and Loss]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28731#p28731" />
			<content type="html"><![CDATA[<p>Thanks Joe. Not able to download</p>]]></content>
			<author>
				<name><![CDATA[seahawk]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=544</uri>
			</author>
			<updated>2017-09-26T13:41:06Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28731#p28731</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Leap Year (Period Y-1) Not included in Profit and Loss]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28599#p28599" />
			<content type="html"><![CDATA[<p>This has now been fixed.<br />Report rep707.php. Comparing to same period last year. If the to-date = end month to-date, then the period year-1 is also end month.</p><p>You can download the changed file <a href="https://sourceforge.net/p/frontaccounting/git/ci/master/tree/reporting/rep707.php">here</a>.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2017-09-09T12:02:35Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28599#p28599</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Leap Year (Period Y-1) Not included in Profit and Loss]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28597#p28597" />
			<content type="html"><![CDATA[<p>Hello guys,</p><p>as i see it, the only problem is the Profit and Loss report, when comparing to the same period last year if it is a leap year.</p><p>A solution would be check if the to-date is the day of the end month. If this is the case, then we could also convert the period year-1 to be the day of the&nbsp; end month if year-1 is a leap year.</p><p>Should we fix it this way? Do we need this to be an option? No, probably not.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2017-09-09T09:57:44Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28597#p28597</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Leap Year (Period Y-1) Not included in Profit and Loss]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28596#p28596" />
			<content type="html"><![CDATA[<p>If I could submit picture of the reports then I can show the difference in the reports for Period-1 and what the problem is. </p><p>Banking and General ledger / Inquiries and reports / General Ledger Reports / Profit and Loss Statement: </p><p>Select the current financial year Start Date: 01/03/2016 - Select the Current finacial year end date: 28/02/2017; Select compare to: Period Y-1 - Display report. </p><p>The amounts on the Profit and Loss Statement for Period Y-1 [Leap Year] is wrong.&nbsp; </p><p>If you compare the reports for Period Y-1 tot the 2016 Fin year report:&nbsp; Draw report for Period 01/03/2015 to 29/02/2016 [Leap year] the amounts will differ to the period Y-1 [Leap year] for period 01/03/2016 to 28/02/2017 as above. The period Y-1 for the period 01/03/2014 to 28/02/2014 is calculated correctly. </p><p>They should be the same which they are not. All amounts processed on the 29th are not calcultaed in the Period Y-1</p><p>Id you do Banking and General ledger /&nbsp; Inquiries and reports / Profit and Loss Drill Down and your select period Start Date: 01/03/2016 - Select the Current financial year end date: 28/02/2017; Select compare to: Period Y-1 - Display report it displays correctly.</p>]]></content>
			<author>
				<name><![CDATA[seahawk]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=544</uri>
			</author>
			<updated>2017-09-09T09:36:37Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28596#p28596</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Leap Year (Period Y-1) Not included in Profit and Loss]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28433#p28433" />
			<content type="html"><![CDATA[<p>As already stated, MySQL has <strong>DATE_SUB(DATE_ADD(date_field, INTERVAL 1 YEAR), INTERVAL 1 DAY)</strong> which will always take the right Feb 28th or 29th as needed.</p><p>Similarly, for a month, it would be <strong>DATE_SUB(DATE_ADD(date_field, INTERVAL 1 MONTH), INTERVAL 1 DAY)</strong>.</p><p>If you can pin point the sqls in FA where this causes an error we will be able to fix it. In most instances, the start and end date of the fiscal year are taken from the table&#039;s fields so it should not cause any issue.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-08-18T19:39:42Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28433#p28433</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Leap Year (Period Y-1) Not included in Profit and Loss]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28431#p28431" />
			<content type="html"><![CDATA[<p>In South Africa, most small businesses and individuals finacial and Income Tax year end is at the end of February. When you do period 01/03/yyyy to 28/02/yyyy the folliwng year, the then there is no issue. If you do the report for 01/03/yyyy to 29/02/yyyy the following year, it also shows correct. </p><p>The problem arises when you select on the report to show Period y-1 and the current finaicl year ends on 28/02 it does not include the correct figures for the previous year on the report since it will only add previous years figure up to 28/02 instead of 29/02. If the 29/02 is the current year and the period y-1 ended on 28/02 the previous year, everything is fine.</p><p>I do not know how one will be able to deal with this. Maybe period y-1 should always read 29/02 for february.</p>]]></content>
			<author>
				<name><![CDATA[seahawk]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=544</uri>
			</author>
			<updated>2017-08-18T15:42:43Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28431#p28431</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Leap Year (Period Y-1) Not included in Profit and Loss]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28074#p28074" />
			<content type="html"><![CDATA[<p>I was thinking of the default end date for the next fiscal year creation in such a situation. Periods less than a month for reporting can be manually entered.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-07-01T13:43:01Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28074#p28074</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Leap Year (Period Y-1) Not included in Profit and Loss]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28073#p28073" />
			<content type="html"><![CDATA[<p>Yes, but if you want to select a period less than a month this will not work. For those who absolutely want this to work on a monthly base, then it could be done this way.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2017-07-01T04:54:57Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28073#p28073</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Leap Year (Period Y-1) Not included in Profit and Loss]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28072#p28072" />
			<content type="html"><![CDATA[<p>Thanks for the explanation and the edge case. Rather than use PHP to compute the last day of the financial year, it might be prudent to use the MySQL function:</p><div class="codebox"><pre><code>SELECT DATE_SUB(DATE_ADD(&#039;2015-03-01&#039;, INTERVAL 1 YEAR), INTERVAL 1 DAY)</code></pre></div><p>which will yield <strong>2016-02-29</strong>.</p><p>Similarly<br /></p><div class="codebox"><pre><code>SELECT DATE_SUB(DATE_ADD(&#039;2016-03-01&#039;, INTERVAL 1 YEAR), INTERVAL 1 DAY);</code></pre></div><p>will get us <strong>2017-02-28</strong>.</p><p>Also, how did it affect the JOURNAL entries alone?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-06-30T18:35:57Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28072#p28072</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Leap Year (Period Y-1) Not included in Profit and Loss]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28071#p28071" />
			<content type="html"><![CDATA[<p>If the year ends in 28.2 then it will always end in 28.2. this will always be a tricky case and I guess the Auditors will agree on that. I have never heard about a fiscal year ending on 28.2 just because of the leap year problem.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2017-06-30T18:03:05Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28071#p28071</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Leap Year (Period Y-1) Not included in Profit and Loss]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28070#p28070" />
			<content type="html"><![CDATA[<p>@joe: serious?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-06-30T15:29:21Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28070#p28070</id>
		</entry>
</feed>
