<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Error: no supplier trans found for given params]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=9091&amp;type=atom" />
	<updated>2020-11-28T15:11:38Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=9091</id>
		<entry>
			<title type="html"><![CDATA[Re: Error: no supplier trans found for given params]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38666#p38666" />
			<content type="html"><![CDATA[<p>Committed to stable 2.4.8 repo.</p><p>Fixed files can be fetched <a href="https://sourceforge.net/p/frontaccounting/git/ci/master/tree/includes/ui/allocation_cart.inc">here</a> and <a href="https://sourceforge.net/p/frontaccounting/git/ci/master/tree/purchasing/includes/db/po_db.inc">here</a>.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2020-11-28T15:11:38Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38666#p38666</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Error: no supplier trans found for given params]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38664#p38664" />
			<content type="html"><![CDATA[<p>Thanks @notrinos.</p><p>I will fix this later today.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2020-11-28T13:37:27Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38664#p38664</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Error: no supplier trans found for given params]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38663#p38663" />
			<content type="html"><![CDATA[<p>Acctually I already made my own solution for the problem by replace line 406 of allocation_cart.inc with this code:<br /></p><div class="codebox"><pre><code>elseif ($_SESSION[&#039;alloc&#039;]-&gt;person_type == PT_SUPPLIER &amp;&amp; $_SESSION[&#039;alloc&#039;]-&gt;allocs[$counter]-&gt;type != ST_PURCHORDER)</code></pre></div><p>But it will damage the solution of @itronics<br />A better solution in my opinion is to add a function called <strong>get_po()</strong> to po_db.inc like this<br /></p><div class="codebox"><pre><code>function get_po($order_no) {
    $sql = &quot;SELECT * FROM &quot;.TB_PREF.&quot;purch_orders WHERE order_no = &quot;.db_escape($order_no);
    $result = db_query($sql);

    return db_fetch($result);
}</code></pre></div><p>Then add a check for purchase orders in the allocation table by replace line 407 of allocation_cart.inc by this code:<br /></p><div class="codebox"><pre><code>if ($_SESSION[&#039;alloc&#039;]-&gt;allocs[$counter]-&gt;type == ST_PURCHORDER)
                $trans = get_po($_SESSION[&#039;alloc&#039;]-&gt;allocs[$counter]-&gt;type_no);
            else
                $trans = get_supp_trans($_SESSION[&#039;alloc&#039;]-&gt;allocs[$counter]-&gt;type_no, $_SESSION[&#039;alloc&#039;]-&gt;allocs[$counter]-&gt;type);</code></pre></div>]]></content>
			<author>
				<name><![CDATA[notrinos]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=36772</uri>
			</author>
			<updated>2020-11-28T12:58:19Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38663#p38663</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Error: no supplier trans found for given params]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38656#p38656" />
			<content type="html"><![CDATA[<p>@notrinos,&nbsp; if you found solution for the bug. Update here. @joe will fix the bug.</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2020-11-27T17:22:24Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38656#p38656</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Error: no supplier trans found for given params]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38655#p38655" />
			<content type="html"><![CDATA[<p><a href="https://github.com/FrontAccountingERP/FA/commit/159af00183e3732314b508729b06eae88721954c#diff-6ada2367f8f3df984a055b6dd78d357ee9c5a4f75184690056d3f8569f42f69e">This commit</a> has made the error on Payment to Supplier process<br />Function get_supp_trans() at line 407 of allocation_cart.inc will fire the error when allocation table has a purchase order</p>]]></content>
			<author>
				<name><![CDATA[notrinos]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=36772</uri>
			</author>
			<updated>2020-11-27T14:54:34Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38655#p38655</id>
		</entry>
</feed>
