<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Cannot add received items to invoice]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=10158&amp;type=atom" />
	<updated>2023-01-23T05:20:55Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=10158</id>
		<entry>
			<title type="html"><![CDATA[Re: Cannot add received items to invoice]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=41970#p41970" />
			<content type="html"><![CDATA[<p>I downloaded the git - master part and tested the change. It works.<br />@Joe: Thanks for the quick answer</p>]]></content>
			<author>
				<name><![CDATA[Zilvermeeuw]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17887</uri>
			</author>
			<updated>2023-01-23T05:20:55Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=41970#p41970</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Cannot add received items to invoice]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=41969#p41969" />
			<content type="html"><![CDATA[<p>@Zilvermeeuw,</p><p>Thank you for observing this. It has been fixed and committed to stable repo.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2023-01-22T16:09:08Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=41969#p41969</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Cannot add received items to invoice]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=41967#p41967" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Zilvermeeuw]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17887</uri>
			</author>
			<updated>2023-01-22T12:05:59Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=41967#p41967</id>
		</entry>
</feed>
