<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Single and Double Quotes in Item Description Editing Fix]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=5433&amp;type=atom" />
	<updated>2014-12-31T02:35:57Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=5433</id>
		<entry>
			<title type="html"><![CDATA[Single and Double Quotes in Item Description Editing Fix]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=21971#p21971" />
			<content type="html"><![CDATA[<p>When we try to edit the items in an purchase order where the Item Description is set to non-editable and contained double quotes, it was unnecessarily mangling a hidden POST variable and then messing up the purch_order_details table&#039;s item_description field. Also one instance of assignment duplication&nbsp; stands removed.</p><div class="codebox"><pre><code>--- includes/ui/po_ui.inc    Mon Sep 29 21:21:28 2014
+++ includes/ui/po_ui.inc    Wed Dec 31 07:50:07 2014
@@ -382,7 +382,6 @@
         if ($order-&gt;line_items[$id]-&gt;descr_editable)
             text_cells(null,&#039;item_description&#039;, null, 45, 150);
         else {
-            hidden(&#039;item_description&#039;, $_POST[&#039;item_description&#039;]);
 //            label_cell($_POST[&#039;item_description&#039;]);
             label_cell($order-&gt;line_items[$id]-&gt;item_description); 
         }
@@ -394,7 +393,7 @@
     {
 //        hidden(&#039;line_no&#039;, ($_SESSION[&#039;PO&#039;]-&gt;lines_on_order + 1));
 
-        //Chaitanya : Manufcatured item can be purchased
+        //Chaitanya : Manufactured item can be purchased
         stock_items_list_cells(null, &#039;stock_id&#039;, null, false, true, false, true);
         //stock_purchasable_items_list_cells(null, &#039;stock_id&#039;, null, false, true, true);
         if (list_updated(&#039;stock_id&#039;)) {
--- includes/po_class.inc    Mon Sep 29 21:21:28 2014
+++ includes/po_class.inc    Wed Dec 31 07:45:31 2014
@@ -74,7 +74,6 @@
         $this-&gt;line_items[$line_no]-&gt;quantity = $qty;
         $this-&gt;line_items[$line_no]-&gt;price = $price;
         $this-&gt;line_items[$line_no]-&gt;req_del_date = $req_del_date;
-        $this-&gt;line_items[$line_no]-&gt;item_description = $description;
     }
 
     function remove_from_order($line_no)
--- po_entry_items.php    Mon Sep 29 21:21:28 2014
+++ po_entry_items.php    Wed Dec 31 07:45:30 2014
@@ -261,7 +261,7 @@
         }
     
         $_SESSION[&#039;PO&#039;]-&gt;update_order_item($_POST[&#039;line_no&#039;], input_num(&#039;qty&#039;), input_num(&#039;price&#039;),
-              @$_POST[&#039;req_del_date&#039;], $_POST[&#039;item_description&#039;] );
+              @$_POST[&#039;req_del_date&#039;], @$_POST[&#039;item_description&#039;] );
         unset_form_variables();
     }    
     line_start_focus();</code></pre></div>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2014-12-31T02:35:57Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=21971#p21971</id>
		</entry>
</feed>
