<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — FA2.4.4 Aged Supplier Analysis]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7566&amp;type=atom" />
	<updated>2018-06-16T06:50:40Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7566</id>
		<entry>
			<title type="html"><![CDATA[Re: FA2.4.4 Aged Supplier Analysis]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31913#p31913" />
			<content type="html"><![CDATA[<p>Thank you all. It is working now.</p>]]></content>
			<author>
				<name><![CDATA[seahawk]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=544</uri>
			</author>
			<updated>2018-06-16T06:50:40Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31913#p31913</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: FA2.4.4 Aged Supplier Analysis]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31910#p31910" />
			<content type="html"><![CDATA[<p>@poncho1234</p><p>Thanks for finding this nasty bug. And for your solution. <a href="https://sourceforge.net/p/frontaccounting/git/ci/master/tree/purchasing/includes/db/suppliers_db.inc">Committed to Repo</a>.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2018-06-16T05:52:49Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31910#p31910</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: FA2.4.4 Aged Supplier Analysis]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31908#p31908" />
			<content type="html"><![CDATA[<p>The sql output gives 40 opening brackets, but 44 closing brackets???<br /></p><div class="codebox"><pre><code>SELECT supp.supp_name, supp.curr_code, 0_payment_terms.terms,

        Sum(IFNULL(IF (trans.type=20 OR trans.type=2
      OR (trans.type=0 AND (trans.ov_amount + trans.ov_gst + trans.ov_discount)&gt;0), 1, -1)*
            ABS(trans.ov_amount + trans.ov_gst + trans.ov_discount) - trans.alloc),0)) AS Balance,

        Sum(IF ((TO_DAYS(&#039;2018-06-15&#039;) - TO_DAYS(IF (trans.type=20 OR trans.type=21,trans.due_date,trans.tran_date))) &gt; 0,IF (trans.type=20 OR trans.type=2
      OR (trans.type=0 AND (trans.ov_amount + trans.ov_gst + trans.ov_discount)&gt;0), 1, -1)*
            ABS(trans.ov_amount + trans.ov_gst + trans.ov_discount) - trans.alloc),0)) AS Due,
        Sum(IF ((TO_DAYS(&#039;2018-06-15&#039;) - TO_DAYS(IF (trans.type=20 OR trans.type=21,trans.due_date,trans.tran_date))) &gt; 30,IF (trans.type=20 OR trans.type=2
      OR (trans.type=0 AND (trans.ov_amount + trans.ov_gst + trans.ov_discount)&gt;0), 1, -1)*
            ABS(trans.ov_amount + trans.ov_gst + trans.ov_discount) - trans.alloc),0)) AS Overdue1,
        Sum(IF ((TO_DAYS(&#039;2018-06-15&#039;) - TO_DAYS(IF (trans.type=20 OR trans.type=21,trans.due_date,trans.tran_date))) &gt; 60,IF (trans.type=20 OR trans.type=2
      OR (trans.type=0 AND (trans.ov_amount + trans.ov_gst + trans.ov_discount)&gt;0), 1, -1)*
            ABS(trans.ov_amount + trans.ov_gst + trans.ov_discount) - trans.alloc),0)) AS Overdue2,
        supp.credit_limit - Sum(IFNULL(IF(trans.type=21, -1, 1) 
            * (ov_amount + ov_gst + ov_discount),0)) as cur_credit,
        supp.tax_group_id</code></pre></div><p>I think the problem is here 4 opening brackets - 5 closing:-<br />\purchasing\includes\db\suppliers_db.inc<br /></p><div class="codebox"><pre><code>94:         $value = &quot;IF (trans.type=&quot;.ST_SUPPINVOICE.&quot; OR trans.type=&quot;.ST_BANKDEPOSIT.&quot;
95:       OR (trans.type=&quot;.ST_JOURNAL.&quot; AND (trans.ov_amount + trans.ov_gst + trans.ov_discount)&gt;0), 1, -1)*
96:             ABS(trans.ov_amount + trans.ov_gst + trans.ov_discount) - trans.alloc)&quot;;</code></pre></div><p>Which makes sense as the OR is called 4 times...</p><p>I cannot find when this was changed...</p><p>From my understanding of the above Line 96 should be:-<br /></p><div class="codebox"><pre><code>96:             ABS(trans.ov_amount + trans.ov_gst + trans.ov_discount) - trans.alloc&quot;;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[poncho1234]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19944</uri>
			</author>
			<updated>2018-06-15T21:54:05Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31908#p31908</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[FA2.4.4 Aged Supplier Analysis]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31906#p31906" />
			<content type="html"><![CDATA[<p>Reports/Suppliers/ Aged Supplier analysis, with the following settings:</p><p>Show alocated = No<br />Summary = No or Yes<br />Suppress Zero&#039;s = Yes or no<br />Graphics = No Graphics.</p><p>Reports deos not display.</p><p>With Show alocated = Yes, Report displays</p><p>Please provide solution.</p><p>Using latest Firefox, other reports do display.</p>]]></content>
			<author>
				<name><![CDATA[seahawk]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=544</uri>
			</author>
			<updated>2018-06-15T21:15:45Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31906#p31906</id>
		</entry>
</feed>
