<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Voiding purchase order deliveries in 2.4.1]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=6875</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=6875&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Voiding purchase order deliveries in 2.4.1.]]></description>
		<lastBuildDate>Wed, 19 Jul 2017 16:05:08 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Voiding purchase order deliveries in 2.4.1]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28215#p28215</link>
			<description><![CDATA[<p>That makes sense, however I don&#039;t know how to do it.</p><p>If I try to void the PO Delivery (GRN) before removing the invoice, the message</p><p>&nbsp; &nbsp; &nbsp; &nbsp;The entered transaction does not exist or cannot be voided</p><p>still occurs.</p><p>Note that the code that actually voids the transaction (void_transaction) still calls exists_grn_on_invoices():</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case ST_SUPPRECEIVE : // it&#039;s a GRN<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (exists_grn_on_invoices($type_no))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return _(&#039;This GRN cannot be voided because it was already invoiced.&#039;);</p><p>But this seems to be prevented from running now by the earlier call to exists_grn() in admin/void_transaction.php.</p>]]></description>
			<author><![CDATA[null@example.com (Braath Waate)]]></author>
			<pubDate>Wed, 19 Jul 2017 16:05:08 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28215#p28215</guid>
		</item>
		<item>
			<title><![CDATA[Re: Voiding purchase order deliveries in 2.4.1]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28213#p28213</link>
			<description><![CDATA[<p>The faulty behaviour existing in 2.3 was fixed in 2.4.1. If you want remove invalid PO you have to explicitly void related GRNs first.<br />There cannot be hanging GRNs without PO in database.<br />Janusz</p>]]></description>
			<author><![CDATA[null@example.com (itronics)]]></author>
			<pubDate>Wed, 19 Jul 2017 07:21:17 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28213#p28213</guid>
		</item>
		<item>
			<title><![CDATA[Re: Voiding purchase order deliveries in 2.4.1]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28208#p28208</link>
			<description><![CDATA[<p>Will send this to Janusz.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Tue, 18 Jul 2017 19:49:10 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28208#p28208</guid>
		</item>
		<item>
			<title><![CDATA[Re: Voiding purchase order deliveries in 2.4.1]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28207#p28207</link>
			<description><![CDATA[<p>@joe: any fix?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Tue, 18 Jul 2017 17:01:08 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28207#p28207</guid>
		</item>
		<item>
			<title><![CDATA[Voiding purchase order deliveries in 2.4.1]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28204#p28204</link>
			<description><![CDATA[<p>In 2.3, one can void a PO delivery by voiding the invoice and then voiding the PO delivery.&nbsp; The voiding of the invoice clears quantity in supp_inv_items.&nbsp; This allows the void of the PO delivery to proceed because it calls:</p><p>function exists_grn_on_invoices($grn_batch)<br />{<br />&nbsp; &nbsp; &nbsp; &nbsp; $sql = &quot;SELECT &quot;.TB_PREF.&quot;supp_invoice_items.id FROM &quot;.TB_PREF.&quot;supp_invoice_items,&quot;.TB_PREF.&quot;grn_items<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHERE &quot;.TB_PREF.&quot;supp_invoice_items.grn_item_id=&quot;.TB_PREF.&quot;grn_items.id<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND quantity != 0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND grn_batch_id=&quot;.db_escape($grn_batch);<br />&nbsp; &nbsp; &nbsp; &nbsp; $result = db_query($sql, &quot;Cannot query GRNs&quot;);</p><p>&nbsp; &nbsp; return (db_num_rows($result) &gt; 0);<br />}</p><p>and disallows the void only if &quot;quantity != 0&quot;.</p><p>This code changed in 2.4.1.&nbsp; &nbsp;It now calls exists_grn() which simply checks for a grn_batch entry, and if it exists it disallows the void.&nbsp; &nbsp;Yet the grn_batch entry still exists after an invoice has been voided and thus returns the error: </p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;The entered transaction does not exist or cannot be voided.</p><p>To test this, create a direct supplier invoice in both 2.3 and 2.4.1, void the invoice and then void the PO Delivery.</p>]]></description>
			<author><![CDATA[null@example.com (Braath Waate)]]></author>
			<pubDate>Tue, 18 Jul 2017 16:45:15 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28204#p28204</guid>
		</item>
	</channel>
</rss>
