<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Achieved 999% (error?) in Profit and Loss statement]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=5569&amp;type=atom" />
	<updated>2015-02-23T08:16:06Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=5569</id>
		<entry>
			<title type="html"><![CDATA[Re: Achieved 999% (error?) in Profit and Loss statement]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=22680#p22680" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-02-23T08:16:06Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=22680#p22680</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Achieved 999% (error?) in Profit and Loss statement]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=22673#p22673" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2015-02-22T11:46:25Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=22673#p22673</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Achieved 999% (error?) in Profit and Loss statement]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=22672#p22672" />
			<content type="html"><![CDATA[<p>Where in the wiki should we indicate this fact. Should a translatable string be used in FA 2.4?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-02-22T08:09:23Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=22672#p22672</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Achieved 999% (error?) in Profit and Loss statement]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=22671#p22671" />
			<content type="html"><![CDATA[<p>This is not an error, but a constant for out of range value.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2015-02-22T05:50:39Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=22671#p22671</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Achieved 999% (error?) in Profit and Loss statement]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=22669#p22669" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-02-22T04:18:06Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=22669#p22669</id>
		</entry>
</feed>
