<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Purchase order updating issue]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=969&amp;type=atom" />
	<updated>2009-12-18T15:55:20Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=969</id>
		<entry>
			<title type="html"><![CDATA[Re: Purchase order updating issue]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=4183#p4183" />
			<content type="html"><![CDATA[<p>This issue has been fixed. CVS Main repository updated. Affected file /purchasing/po_entry_items.php</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2009-12-18T15:55:20Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=4183#p4183</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Purchase order updating issue]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=4181#p4181" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>This solved the issue but I doubt the approach. We may even continue with this but better if we can disallow a user to add 0 quantity while updating.</p></blockquote></div><p>By this, I mean there should not be any entry with quantity_ordered = 0 in <br />xx_purch_order_details table.</p><p>I do not know about if it is required. Else we surely have a workaround which is working smoothly so far. Thus it is also worth considering !</p><p>Thanks</p>]]></content>
			<author>
				<name><![CDATA[chaitanya]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=524</uri>
			</author>
			<updated>2009-12-18T13:46:57Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=4181#p4181</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Purchase order updating issue]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=4180#p4180" />
			<content type="html"><![CDATA[<p>Hi,</p><p>I encountered a scenario and reported it in Mantis. <br />Refer the bug here<br />http://mantis.frontaccounting.com/view.php?id=183</p><p>1. Entered a PO for item A (Single Line) - Quantity - 100<br />2. Modified the PO and set item quantity to 0 (Single item line with order quantity 0)<br />3. Again updated the PO and set quantity for item to - 50</p><p>Then while receiving the delivery, a false message is encountered which is not going.</p><p>This order has been changed or invoiced since this delivery was started to be actioned. Processing halted. To enter a delivery against this purchase order, it must be re-selected and re-read again to update the changes made by the other user.</p><p>What went wrong -<br />Step 2 should not have been accepted in first place !) One should be forced to cancel order in such case !</p><p>I check the procedure function check_po_changed() from purchasing/po_receive_items.php</p><p>The reason of the error was due to abovesaid modifications<br />xx_purch_order_details table has 2 entries for same item 1 with quantity_ordered = 0 and other with quantity_ordered = 50</p><p>This resulted in mismatch in function check_po_changed() as line with quantity_ordered = 0 was not having match in session[PO]-&gt;lines</p><p>Thus resulting in error !</p><p>A temporary work around applied -</p><p>In function check_po_changed()</p><p>&nbsp; &nbsp; $sql = &quot;SELECT item_code, quantity_ordered, quantity_received, qty_invoiced<br />&nbsp; &nbsp; &nbsp; &nbsp; FROM &quot;.TB_PREF.&quot;purch_order_details<br />&nbsp; &nbsp; &nbsp; &nbsp; WHERE order_no=&quot;.db_escape($_SESSION[&#039;PO&#039;]-&gt;order_no)<br />&nbsp; &nbsp; &nbsp; &nbsp; .&quot; ORDER BY po_detail_item&quot;;</p><p>is changed to</p><p>&nbsp; &nbsp; // Chaitanya 18-Dec-09 Consider only quantity_ordered != 0<br />&nbsp; &nbsp; $sql = &quot;SELECT item_code, quantity_ordered, quantity_received, qty_invoiced<br />&nbsp; &nbsp; &nbsp; &nbsp; FROM &quot;.TB_PREF.&quot;purch_order_details<br />&nbsp; &nbsp; &nbsp; &nbsp; WHERE order_no=&quot;.db_escape($_SESSION[&#039;PO&#039;]-&gt;order_no)<br />&nbsp; &nbsp; &nbsp; &nbsp; .&quot; and quantity_ordered != 0 ORDER BY po_detail_item&quot;;</p><p>This solved the issue but I doubt the approach. We may even continue with this but better if we can disallow a user to add 0 quantity while updating.</p><p>We may need to recheck - function handle_update_item() and function check_data()<br />You are best judge to decide on the exact changes required.</p><p>Thanks</p>]]></content>
			<author>
				<name><![CDATA[chaitanya]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=524</uri>
			</author>
			<updated>2009-12-18T13:39:52Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=4180#p4180</id>
		</entry>
</feed>
