<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Bug Found and Fixed in rep101.php]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7368&amp;type=atom" />
	<updated>2018-04-02T05:49:39Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7368</id>
		<entry>
			<title type="html"><![CDATA[Re: Bug Found and Fixed in rep101.php]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31305#p31305" />
			<content type="html"><![CDATA[<p>Hello,</p><p>I have <a href="https://github.com/FrontAccountingERP/FA/commit/23eaec5e4f4fa5d533d82e6d208135e25d13a2ee">committed</a> the Summation of the Outstanding Open Balances in this report, Customer Balance.</p><p>Still investigating the allocation column, although this is not an important column, but anyhow.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2018-04-02T05:49:39Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31305#p31305</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug Found and Fixed in rep101.php]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31265#p31265" />
			<content type="html"><![CDATA[<p>@boxygen</p><p>Please try this change in rep101.php. Rename the rep101.php1 to rep101.php and replace.</p><p>Tell me if the outstanding column is correct now when selecting Show Balance to No.</p><p>I guess the allocation column still has some discrepancies.</p><p>I want this clarified before continuing with the allocation column.</p><p>@apmuthu and @boxygen<br /><s>Maybe we can inplement the Branch selection too. If we write this information above in the report with the other parameter info, I guess we need no more columns. Right?</s><br />Sorry Guys. We have no link between the customers and branches in Report Selections, so it will be a major change here. So be patient, maybe in the next major. </p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2018-03-29T07:00:07Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31265#p31265</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug Found and Fixed in rep101.php]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31261#p31261" />
			<content type="html"><![CDATA[<p>The outstandings seem to be computed for each line independently without being cumulative. This is wrong.<br />The allocations get summed up even for previous years as the date in the common WHERE clause is taken instead of being a specific range for allocations alone.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-03-29T02:50:31Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31261#p31261</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug Found and Fixed in rep101.php]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31258#p31258" />
			<content type="html"><![CDATA[<p>If we first look at the Customer Balance Report with the Show Balance set to Yes.</p><p>Then the sum of all credits and debits and balance are shown correctly for closing and opening balances. The discrepancy in the allocations have something to do with the time of allocations (not really importing for the report. Maybe we should eliminate the summation for the allocations). The balance column is correct and this is very important.</p><p>If the report is taken with the Show Balance set to No.</p><p>The sum of all credits and debits are shown correctly. Here the lines are calculated on a record base line by line. The total of all outstanding with allocations added gives the total balance (the same result as on the balanced report).</p><p>Again the discrepancy in the allocations aare subject to closer investigation from my side. Will do this asap, but I am still rather overloaded with other work.</p><p>Of course you are welcome with suggestings regarding the Sql statements.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2018-03-28T19:31:25Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31258#p31258</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug Found and Fixed in rep101.php]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31255#p31255" />
			<content type="html"><![CDATA[<p>@Joe,<br />Please check these reports of <a href="http://pakerp.com/2017report.pdf">2017</a> and <a href="http://pakerp.com/2018report.pdf">2018</a>.</p><p>Check the closing balance of 2017 and opening balance of 2018</p><p>You will find the difference in Allocated and Outstanding Figures of Closing and Opening Balances.</p><p>I hope I could have explained the issue.</p><p>Regards.</p><p>Customer is QY009 Babjee Traders</p><p>You can <a href="http://pakerp.com/fa24org">Login</a></p><p>id: admin<br />pass: Pakistan1947</p><p>To reproduce this open rep101.php<br />select above customer<br />Show Balance =&gt; No<br />View report of 2017 whole year<br />View report of 2018 till date </p><p>PS: To understand the problem read the whole thread once again. We were discussing that due to Bank Payment Transaction to customer, the SQL Query shall be adjusted to produce correct results.</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2018-03-28T18:15:49Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31255#p31255</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug Found and Fixed in rep101.php]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31210#p31210" />
			<content type="html"><![CDATA[<p>@apmuthu</p><p>No I guess not.<br />-----<br />Regarding the open balances. There should be no differences when you check the &#039;Show Balance&#039; box. The Sum of all record outstandings before the period should be the same as the Open Balance. <br />There might be some allocations that are not done that can influence on the period result.</p><p>But I cannot reproduce any errors here. </p><p>@boxygen<br />Please be a little more specific regarding your observation.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2018-03-23T15:18:20Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31210#p31210</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug Found and Fixed in rep101.php]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31200#p31200" />
			<content type="html"><![CDATA[<p>At <a href="https://github.com/FrontAccountingERP/FA/blob/master/reporting/rep101.php#L52">Line 52</a> in <strong>reporting/rep101.php</strong>, the value of the <strong>$sql</strong> variable for the first available <em>debtor_no</em> in the second Date Range (2018) in the <strong>function get_open_balance()</strong> is:<br /></p><div class="codebox"><pre><code>SELECT 
    SUM(IF(t.type = 10 OR (t.type IN (0 , 1) AND t.ov_amount&gt;0), -ABS(t.ov_amount + t.ov_gst + t.ov_freight + t.ov_freight_tax + t.ov_discount), 0)) AS charges
   ,SUM(IF(t.type != 10 AND NOT(t.type IN (0 , 1) AND t.ov_amount&gt;0), ABS(t.ov_amount + t.ov_gst + t.ov_freight + t.ov_freight_tax + t.ov_discount) * -1, 0)) AS credits
   ,SUM(IF(t.type != 10 AND NOT(t.type IN (0 , 1)), t.alloc * -1, t.alloc)) AS Allocated
   ,SUM(IF(t.type = 10, 1, -1) * (ABS(t.ov_amount + t.ov_gst + t.ov_freight + t.ov_freight_tax + t.ov_discount) - ABS(t.alloc))) AS OutStanding
FROM 1_debtor_trans t
WHERE t.debtor_no = &#039;1&#039;
  AND t.type &lt;&gt; 13
  AND t.tran_date &lt; &#039;2018-01-01&#039;
GROUP BY debtor_no;</code></pre></div><p>The output corresponding to the statements attached is:<br /></p><div class="codebox"><pre><code>charges    credits    Allocated    OutStanding
-6540        -6540            0            0</code></pre></div><p>Do you want to zero out the Charges and Credits in this instance?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-03-22T10:49:39Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31200#p31200</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug Found and Fixed in rep101.php]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31195#p31195" />
			<content type="html"><![CDATA[<p>@boxygen</p><p>Hello, I am overloaded with other work this week and next week. If you have a suggestion for changing the sql, then I would be extremely glad <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2018-03-21T22:20:50Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31195#p31195</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug Found and Fixed in rep101.php]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31191#p31191" />
			<content type="html"><![CDATA[<p>Hello @joe, could you check this bug</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2018-03-21T07:41:07Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31191#p31191</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug Found and Fixed in rep101.php]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31081#p31081" />
			<content type="html"><![CDATA[<p>@joe, still one problem exists in rep101.php after applying your last commit</p><p>Check the same customer&#039;s balances with Parameter ShowBalance=&gt;No</p><p>First Date Range 1st Jan 2017 till 31 Dec 2017</p><p>Note down Charges, Credits, Allocated and Balance Closing figures</p><p>Second Date Range 1st Jan 2018 till date</p><p>The above closing shall reflect in this opening but there is a difference Opening</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2018-03-10T09:46:44Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31081#p31081</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug Found and Fixed in rep101.php]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31008#p31008" />
			<content type="html"><![CDATA[<p>@alaa</p><p>I cannot reproduce any errors in rep201. Could you be more specific and detailed.</p><p>Specific trans types? Or?</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2018-03-04T18:32:30Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31008#p31008</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug Found and Fixed in rep101.php]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31004#p31004" />
			<content type="html"><![CDATA[<p>do we need to update rep201? i am still getting wrong numbers specially with the opening balance.</p><p>Regards.</p>]]></content>
			<author>
				<name><![CDATA[Alaa]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20274</uri>
			</author>
			<updated>2018-03-04T18:24:44Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31004#p31004</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug Found and Fixed in rep101.php]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30997#p30997" />
			<content type="html"><![CDATA[<p>Yes it is working. Thanks alot for your time and input.</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2018-03-04T12:08:12Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30997#p30997</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug Found and Fixed in rep101.php]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30995#p30995" />
			<content type="html"><![CDATA[<p>@boxygen<br />I have just tested to rep201.php and it seems to already work.</p><p>I now recall why we got this error in rep101. We had to take care of the new options to add AR/AP lines in Journal Entry.<br />And we changed the rep101 and rep201 (<a href="https://github.com/FrontAccountingERP/FA/commit/534dffa74be8e7580cb8f090771d31520a60916b#diff-bbd061690379a0a11501fe15a011d3ac">1</a>, <a href="https://github.com/FrontAccountingERP/FA/commit/ae754adc5705dd91c813eb43e93ecef81fdc6745#diff-bbd061690379a0a11501fe15a011d3ac">2</a>) to fix these items, but forgot to fix rep101 regarding the Bank Payment.</p><p>I really hope that it is working in rep101 now. Did you try with your data?</p><p>/Joe</p><p><a href="https://github.com/FrontAccountingERP/FA/commit/4a8ede2a4a236a46a63819af13487f4d499d7aed">Committed</a></p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2018-03-04T09:34:26Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30995#p30995</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug Found and Fixed in rep101.php]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30994#p30994" />
			<content type="html"><![CDATA[<p>@joe, I think you have check the supplier side also.</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2018-03-04T09:11:23Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30994#p30994</id>
		</entry>
</feed>
