<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Profit/Loss calculation]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=6656&amp;type=atom" />
	<updated>2017-01-25T12:26:07Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=6656</id>
		<entry>
			<title type="html"><![CDATA[Re: Profit/Loss calculation]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=27431#p27431" />
			<content type="html"><![CDATA[<p>Once the Profit/Loss has been calculated, it comes in as a single entry of Balance Sheet class that should match the rest of those there, with the difference matching cash on hand (debit).</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-01-25T12:26:07Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=27431#p27431</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Profit/Loss calculation]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=27411#p27411" />
			<content type="html"><![CDATA[<p>Hi.. I have a doubt on how the system calculates the profit/loss when closing the fiscal year. The benefit and profit is the sum of transactions of the balance accounts and not the income and costs accounts as it should be?</p><p>In the fiscal_years_db.inc file it is calculated with the following formula:</p><br /><p>$sql = &quot;SELECT SUM(amount) FROM &quot;.TB_PREF.&quot;gl_trans INNER JOIN &quot;.TB_PREF.&quot;chart_master ON account=account_code<br />&nbsp; &nbsp; &nbsp; &nbsp; INNER JOIN &quot;.TB_PREF.&quot;chart_types ON account_type=id INNER JOIN &quot;.TB_PREF.&quot;chart_class ON class_id=cid <br />&nbsp; &nbsp; &nbsp; &nbsp; WHERE ctype&gt;=&quot;.CL_ASSETS.&quot; AND ctype &lt;=&quot;.CL_EQUITY.&quot; AND tran_date &lt;= &#039;$to&#039;&quot;;<br />&nbsp; &nbsp; $result = db_query($sql, &quot;The total balance could not be calculated&quot;);</p><p>It is the sum of the transactions from the classes Asset, Liabilities and Equities (Balance classes) and not Income, Cost and Expenses (Profit and Loss classes). I should sum the Profit and Loss classes transactions: CL_INCOME, CL_COGS and CL_EXPENSE.</p><p>Am I right?</p><p>Regards</p>]]></content>
			<author>
				<name><![CDATA[panchovilla]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=31293</uri>
			</author>
			<updated>2017-01-19T23:48:32Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=27411#p27411</id>
		</entry>
</feed>
