<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Achieved 999% (error?) in Profit and Loss statement]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=5569</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=5569&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Achieved 999% (error?) in Profit and Loss statement.]]></description>
		<lastBuildDate>Mon, 23 Feb 2015 08:16:06 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Achieved 999% (error?) in Profit and Loss statement]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=22680#p22680</link>
			<description><![CDATA[<p>Then let it be like that except that a constant string can be defined for now as &#039;999&#039; and used in the function Achieve();<br />Lines 137 to 147 in <strong>reporting/rep707.php</strong>:<br /></p><div class="codebox"><pre><code>function Achieve($d1, $d2)
{
    if ($d1 == 0 &amp;&amp; $d2 == 0)
        return 0;
    elseif ($d2 == 0)
        return 999;
    $ret = ($d1 / $d2 * 100.0);
    if ($ret &gt; 999)
        $ret = 999;
    return $ret;
}</code></pre></div><p>can be</p><div class="codebox"><pre><code>define(&#039;OUT_OF_RANGE&#039;, 999);

function Achieve($d1, $d2)
{
    if ($d1 == 0 &amp;&amp; $d2 == 0)
        return 0;
    elseif ($d2 == 0)
        return OUT_OF_RANGE;
    $ret = ($d1 / $d2 * 100.0);
    if ($ret &gt; OUT_OF_RANGE)
        $ret = OUT_OF_RANGE;
    return $ret;
}</code></pre></div><p>The define can be placed into the file that contains the other constants.</p><p>The said function Achieve() is <em>duplicated</em> in <strong>gl/inquiry/profit_loss.php</strong>.</p><p>In <strong>reporting/includes/excel_report.inc</strong> we find that <strong>9999999</strong> is used to represent &quot;infinity&quot;.</p><p>In <strong>includes/ui/ui_view.inc</strong>, the value <strong>999999999999</strong> is used to represent &quot;infinity&quot;.</p><p>In <strong>includes/date_functions.inc</strong>, the value <strong>9999</strong> is used to represent the max <strong>year</strong>.</p><p>In <strong>admin/view_print_transaction.php</strong> and <strong>admin/void_transaction.php</strong>, the value <strong>999999</strong> is used to represent the max <strong>ToTransNo</strong>.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Mon, 23 Feb 2015 08:16:06 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=22680#p22680</guid>
		</item>
		<item>
			<title><![CDATA[Re: Achieved 999% (error?) in Profit and Loss statement]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=22673#p22673</link>
			<description><![CDATA[<p>I don&#039;t know Apmuthu. We have had this all the time. Maybe you can find somewhere suitable in the Wiki to put this. Isn&#039;t it mostly used in the balance Sheet and Profit and Loss Statements?</p><p>I my opinion, I Think we can continue with this.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sun, 22 Feb 2015 11:46:25 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=22673#p22673</guid>
		</item>
		<item>
			<title><![CDATA[Re: Achieved 999% (error?) in Profit and Loss statement]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=22672#p22672</link>
			<description><![CDATA[<p>Where in the wiki should we indicate this fact. Should a translatable string be used in FA 2.4?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sun, 22 Feb 2015 08:09:23 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=22672#p22672</guid>
		</item>
		<item>
			<title><![CDATA[Re: Achieved 999% (error?) in Profit and Loss statement]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=22671#p22671</link>
			<description><![CDATA[<p>This is not an error, but a constant for out of range value.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sun, 22 Feb 2015 05:50:39 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=22671#p22671</guid>
		</item>
		<item>
			<title><![CDATA[Achieved 999% (error?) in Profit and Loss statement]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=22669#p22669</link>
			<description><![CDATA[<p>When the denominator is 0, the percentage is shown a 999% for achieved %. </p><p>Attached is the screenshot. </p><p>Is this the intended denotation for error or out of range values?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sun, 22 Feb 2015 04:18:06 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=22669#p22669</guid>
		</item>
	</channel>
</rss>
