<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Bug in purchasing/includes/db/invoice_db.inc]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=10088&amp;type=atom" />
	<updated>2022-11-20T20:23:36Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=10088</id>
		<entry>
			<title type="html"><![CDATA[Re: Bug in purchasing/includes/db/invoice_db.inc]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=41756#p41756" />
			<content type="html"><![CDATA[<p>Thanks for detecting this.<br />This has been fixed and committed to stable repo.</p><p>A fixed file can be downloaded <a href="https://sourceforge.net/p/frontaccounting/git/ci/master/tree/purchasing/includes/db/invoice_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>2022-11-20T20:23:36Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=41756#p41756</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Bug in purchasing/includes/db/invoice_db.inc]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=41755#p41755" />
			<content type="html"><![CDATA[<p>In file purchasing/includes/db/invoice_db.inc line 375:<br /></p><div class="codebox"><pre><code>    if (count($supp_trans-&gt;src_docs) == 1)
    {
        $invoice_no = key($supp_trans-&gt;src_docs);
        $invoice_alloc_balance = get_supp_trans_allocation_balance(ST_SUPPINVOICE, $supp_trans-&gt;src_docs);
        if ($invoice_alloc_balance &gt; 0) 
        {     //the invoice is not already fully allocated </code></pre></div><p>This line actually give error:<br /></p><div class="codebox"><pre><code>$invoice_alloc_balance = get_supp_trans_allocation_balance(ST_SUPPINVOICE, $supp_trans-&gt;src_docs);</code></pre></div><p>Because $supp_trans-&gt;src_docs is an array and it should be a string. I believe it should be:</p><div class="codebox"><pre><code>$invoice_alloc_balance = get_supp_trans_allocation_balance(ST_SUPPINVOICE, $invoice_no);</code></pre></div>]]></content>
			<author>
				<name><![CDATA[barbarian]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18954</uri>
			</author>
			<updated>2022-11-20T13:59:47Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=41755#p41755</id>
		</entry>
</feed>
