<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — rep103 function getTransactions() error]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=6573&amp;type=atom" />
	<updated>2016-12-08T12:24:24Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=6573</id>
		<entry>
			<title type="html"><![CDATA[rep103 function getTransactions() error]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=26992#p26992" />
			<content type="html"><![CDATA[<p>In the file <strong>reporting/rep103.php</strong>, the <strong>function getTransactions()</strong> sums up the invoice value along with the credit notes instead of subtracting the credit note from the invoice amounts. The taxes are not taken into consideration here.</p><p>Line 92 in it:<br /></p><div class="codebox"><pre><code>    $sql = &quot;SELECT SUM((ov_amount+ov_freight+ov_discount)*rate) AS Turnover</code></pre></div><p>shouldn&#039;t it be:<br /></p><div class="codebox"><pre><code>    $sql = &quot;SELECT SUM((ov_amount+ov_freight+ov_discount)*rate*IF(type=&quot;.ST_CUSTCREDIT.&quot;, -1, 1)) AS Turnover</code></pre></div><p>In the above case, the min value needs be -0.001 to work correctly unless an absolute value of the Turnover is used or the credit be done away with. The anomaly here would be to distinguish between a payment by the customer and a credit note given for adjustment or for return of goods.</p><p>Furthermore, the <strong>Turnover</strong> does not display in the above report <span class="bbu">unless</span> a <strong>min</strong> or <strong>max</strong> value of the invoice is specified.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2016-12-08T12:24:24Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=26992#p26992</id>
		</entry>
</feed>
