<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Cannot add received items to invoice]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=10158</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=10158&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Cannot add received items to invoice.]]></description>
		<lastBuildDate>Mon, 23 Jan 2023 05:20:55 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Cannot add received items to invoice]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41970#p41970</link>
			<description><![CDATA[<p>I downloaded the git - master part and tested the change. It works.<br />@Joe: Thanks for the quick answer</p>]]></description>
			<author><![CDATA[null@example.com (Zilvermeeuw)]]></author>
			<pubDate>Mon, 23 Jan 2023 05:20:55 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41970#p41970</guid>
		</item>
		<item>
			<title><![CDATA[Re: Cannot add received items to invoice]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41969#p41969</link>
			<description><![CDATA[<p>@Zilvermeeuw,</p><p>Thank you for observing this. It has been fixed and committed to stable repo.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sun, 22 Jan 2023 16:09:08 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41969#p41969</guid>
		</item>
		<item>
			<title><![CDATA[Cannot add received items to invoice]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41967#p41967</link>
			<description><![CDATA[<p>I have an invoice with some GL items. This is a wrong entry and I want to delete these GL items from the invoice and add the received item to the invoice. </p><p>I cannot add the received item to the invoice. <br />With debugging on it gives an error (some in dutch language): </p><div class="codebox"><pre><code>Onbehandelde uitzondering [0]: Unsupported operand types: string - string. in bestand: /var/www/home.vogelnestje.nl/secure1/frontaccountingTst/purchasing/supplier_invoice.php op regel288</code></pre></div><p>On this line the variable called </p><div class="codebox"><pre><code>$_POST[&#039;prev_quantity_inv&#039;.$n]</code></pre></div><p>As the item has no inventory (it is a general cost for the compay), the above variable is empty and the error is raised.<br />I solved this by adding a check on the empty variable by changing the line to:</p><div class="codebox"><pre><code>if ($SysPrefs-&gt;check_qty_charged_vs_del_qty == true &amp;&amp; ($_POST[&#039;qty_recd&#039;.$n] != $_POST[&#039;prev_quantity_inv&#039;.$n]) &amp;&amp; !empty($_POST[&#039;prev_quantity_inv&#039;.$n]) )</code></pre></div><p>Now I can change the invoice as expected.</p><p>I tested this on 2.14, from the GIT (https://sourceforge.net/p/frontaccounting/git/ci/master/tree/)<br />Is there a moderator who can add this to the source of FA?<br />Or am I allowed to do this myself?</p>]]></description>
			<author><![CDATA[null@example.com (Zilvermeeuw)]]></author>
			<pubDate>Sun, 22 Jan 2023 12:05:59 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41967#p41967</guid>
		</item>
	</channel>
</rss>
