<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — sales_order_ui.inc has a bug]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=7966</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7966&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in sales_order_ui.inc has a bug.]]></description>
		<lastBuildDate>Tue, 23 Apr 2019 03:25:28 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: sales_order_ui.inc has a bug]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34793#p34793</link>
			<description><![CDATA[<p>For me it works fine.&nbsp; If you&nbsp; face problem with this. find a better solution for it. we will adapt to your solutions.&nbsp; I tested it on Linux and Windows.&nbsp; Both works fine for me</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Tue, 23 Apr 2019 03:25:28 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34793#p34793</guid>
		</item>
		<item>
			<title><![CDATA[Re: sales_order_ui.inc has a bug]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34790#p34790</link>
			<description><![CDATA[<p>The new code works for now.<br />More testing is needed to check for edge conditions stated above.</p><p>I had to set config.php variable &quot;$no_check_edit_conflicts = 1;&quot; in windows for it to work though - it did not work for earlier commits.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Mon, 22 Apr 2019 17:58:01 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34790#p34790</guid>
		</item>
		<item>
			<title><![CDATA[Re: sales_order_ui.inc has a bug]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34789#p34789</link>
			<description><![CDATA[<div class="codebox"><pre><code>!isset($_POST[&#039;stock_id&#039;])</code></pre></div><p>does not necessarily mean that the stock_id does not exist - it merely states that it was not chosen in the $_POST variable.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Mon, 22 Apr 2019 17:50:09 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34789#p34789</guid>
		</item>
		<item>
			<title><![CDATA[Re: sales_order_ui.inc has a bug]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34785#p34785</link>
			<description><![CDATA[<p>Ok, thanks @kvvaradha.</p><p>Committed and a new file <a href="https://sourceforge.net/p/frontaccounting/git/ci/master/tree/sales/includes/ui/sales_order_ui.inc">here</a>.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Mon, 22 Apr 2019 08:11:53 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34785#p34785</guid>
		</item>
		<item>
			<title><![CDATA[Re: sales_order_ui.inc has a bug]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34779#p34779</link>
			<description><![CDATA[<p>@joe, Yes you are right.</p><p>As like @Apmuthu words, it rolls back to the last item sold to the customer. we are not able to change the item to sell. But we can try this option.it may be fessible to work on.</p><p>We will put an if condition, if the stock_id is not exist, we can get the last_sales_order_detail,like this, here is code<br /></p><div class="codebox"><pre><code>if ($order-&gt;fixed_asset)
            stock_disposable_fa_list_cells(null,&#039;stock_id&#039;, null, _(&#039;[Select item]&#039;), true, $order-&gt;line_items);
        else{
            if(!isset($_POST[&#039;stock_id&#039;])){   // Check the stock id not exist
            $_POST[&#039;stock_id&#039;] = last_sales_order_detail($order, &#039;stk_code&#039;);  //get the llast sales stock id.
        }
             sales_items_list_cells(null,&#039;stock_id&#039;, last_sales_order_detail($order, &#039;stk_code&#039;), false, true, true);
        }
        if (list_updated(&#039;stock_id&#039;)) {            
            $Ajax-&gt;activate(&#039;price&#039;);
            $Ajax-&gt;activate(&#039;units&#039;);
            $Ajax-&gt;activate(&#039;qty&#039;);
            $Ajax-&gt;activate(&#039;line_total&#039;);
        }</code></pre></div><p>Hope this may be fixed the problem.</p><p>if not, we remove the function from sales_order_d.inc <strong>last_sales_order_detail</strong>. It was defined there. and keep the sales item list cells like this<br /></p><div class="codebox"><pre><code>sales_items_list_cells(null,&#039;stock_id&#039;, null, false, true, true);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Mon, 22 Apr 2019 05:22:15 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34779#p34779</guid>
		</item>
		<item>
			<title><![CDATA[Re: sales_order_ui.inc has a bug]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34778#p34778</link>
			<description><![CDATA[<p>@kvvaradha.</p><p>Did you mean that it was ok to change the<br /></p><div class="codebox"><pre><code>line 505 in /sales/includes/ui/sales_order_ui.inc 
from:
            sales_items_list_cells(null,&#039;stock_id&#039;, last_sales_order_detail($order, &#039;stk_code&#039;), false, true, true);
to:
            sales_items_list_cells(null,&#039;stock_id&#039;, null, false, true, true);</code></pre></div><p>?</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sun, 21 Apr 2019 20:57:04 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34778#p34778</guid>
		</item>
		<item>
			<title><![CDATA[Re: sales_order_ui.inc has a bug]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34766#p34766</link>
			<description><![CDATA[<p>@kvvaradha: Your Post #3 is the same as your post #7 which has been incorporated in <a href="https://github.com/FrontAccountingERP/FA/commit/85adfd5e202218a984ef5e1b64197472e0a2ccac">this official commit</a> which is what I would like to revert and <a href="https://github.com/apmuthu/frontac24/commit/d24fc30ad235da23a59a36504ab3b37a2071e9b5">make it as per my commit</a>.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sun, 21 Apr 2019 12:05:19 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34766#p34766</guid>
		</item>
		<item>
			<title><![CDATA[Re: sales_order_ui.inc has a bug]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34764#p34764</link>
			<description><![CDATA[<div class="quotebox"><cite>kvvaradha wrote:</cite><blockquote><p>@joe ,sorry for my mistake.</p><p>the code should be like this.</p><div class="codebox"><pre><code>if ($order-&gt;fixed_asset)
            stock_disposable_fa_list_cells(null,&#039;stock_id&#039;, null, _(&#039;[Select item]&#039;), true, $order-&gt;line_items);
        else
             sales_items_list_cells(null,&#039;stock_id&#039;, last_sales_order_detail($order, &#039;stk_code&#039;), false, true, true);
        if (list_updated(&#039;stock_id&#039;)) {            
            $Ajax-&gt;activate(&#039;price&#039;);
            $Ajax-&gt;activate(&#039;units&#039;);
            $Ajax-&gt;activate(&#039;qty&#039;);
            $Ajax-&gt;activate(&#039;line_total&#039;);
        }
            </code></pre></div><p>By mistake i put in else part of list_updated.</p></blockquote></div><p> @joe - here I gave the same code exactly what he committed there. So you can update it.</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Sun, 21 Apr 2019 11:09:16 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34764#p34764</guid>
		</item>
		<item>
			<title><![CDATA[Re: sales_order_ui.inc has a bug]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34754#p34754</link>
			<description><![CDATA[<p>@kvvaradha</p><p>Please make a comment on this. Do you agree with @apmuthu?</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sat, 20 Apr 2019 15:35:43 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34754#p34754</guid>
		</item>
		<item>
			<title><![CDATA[Re: sales_order_ui.inc has a bug]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34741#p34741</link>
			<description><![CDATA[<p>Will need to revert <a href="https://github.com/FrontAccountingERP/FA/commit/85adfd5e202218a984ef5e1b64197472e0a2ccac">this commit</a> - see <a href="https://frontaccounting.com/punbb/viewtopic.php?id=8109">this post</a>.</p><p>What is the purpose of getting the <strong>last_sales_order_detail() field</strong> (in this case, &#039;stk_code&#039; which is the stock_id)? Byusing this commit, we are making the default choice of the Item description select box override the actual selection made in it. Should this be restricted to only those with editable description alone if used at all?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sat, 20 Apr 2019 09:57:55 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34741#p34741</guid>
		</item>
		<item>
			<title><![CDATA[Re: sales_order_ui.inc has a bug]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34080#p34080</link>
			<description><![CDATA[<p>Ok, @kvvaradha <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>Fixed and a new file can be downloaded <a href="https://sourceforge.net/p/frontaccounting/git/ci/master/tree/sales/includes/ui/sales_order_ui.inc">here</a>.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Fri, 25 Jan 2019 09:27:25 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34080#p34080</guid>
		</item>
		<item>
			<title><![CDATA[Re: sales_order_ui.inc has a bug]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34077#p34077</link>
			<description><![CDATA[<p>@joe ,sorry for my mistake.</p><p>the code should be like this.</p><div class="codebox"><pre><code>if ($order-&gt;fixed_asset)
            stock_disposable_fa_list_cells(null,&#039;stock_id&#039;, null, _(&#039;[Select item]&#039;), true, $order-&gt;line_items);
        else
             sales_items_list_cells(null,&#039;stock_id&#039;, last_sales_order_detail($order, &#039;stk_code&#039;), false, true, true);
        if (list_updated(&#039;stock_id&#039;)) {            
            $Ajax-&gt;activate(&#039;price&#039;);
            $Ajax-&gt;activate(&#039;units&#039;);
            $Ajax-&gt;activate(&#039;qty&#039;);
            $Ajax-&gt;activate(&#039;line_total&#039;);
        }
            </code></pre></div><p>By mistake i put in else part of list_updated.</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Fri, 25 Jan 2019 05:19:47 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34077#p34077</guid>
		</item>
		<item>
			<title><![CDATA[Re: sales_order_ui.inc has a bug]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34073#p34073</link>
			<description><![CDATA[<p>Fixed and sent to repo. Thanks @kvvaradha.</p><p>The fixed file can be downloaded <a href="https://sourceforge.net/p/frontaccounting/git/ci/master/tree/sales/includes/ui/sales_order_ui.inc">here</a>.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Thu, 24 Jan 2019 22:35:34 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34073#p34073</guid>
		</item>
		<item>
			<title><![CDATA[sales_order_ui.inc has a bug]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34070#p34070</link>
			<description><![CDATA[<p>it looks like this now.</p><div class="codebox"><pre><code> 
if ($order-&gt;fixed_asset)
            stock_disposable_fa_list_cells(null,&#039;stock_id&#039;, null, _(&#039;[Select item]&#039;), true, $order-&gt;line_items);
        else
        if (list_updated(&#039;stock_id&#039;)) {
            sales_items_list_cells(null,&#039;stock_id&#039;, null, false, true, true);
            $Ajax-&gt;activate(&#039;price&#039;);
            $Ajax-&gt;activate(&#039;units&#039;);
            $Ajax-&gt;activate(&#039;qty&#039;);
            $Ajax-&gt;activate(&#039;line_total&#039;);
        } else
             sales_items_list_cells(null,&#039;stock_id&#039;, last_sales_order_detail($order, &#039;stk_code&#039;), false, true, true);</code></pre></div><p>But it should be like this</p><div class="codebox"><pre><code>if ($order-&gt;fixed_asset)
            stock_disposable_fa_list_cells(null,&#039;stock_id&#039;, null, _(&#039;[Select item]&#039;), true, $order-&gt;line_items);
        else
            sales_items_list_cells(null,&#039;stock_id&#039;, null, false, true, true);
        if (list_updated(&#039;stock_id&#039;)) {            
            $Ajax-&gt;activate(&#039;price&#039;);
            $Ajax-&gt;activate(&#039;units&#039;);
            $Ajax-&gt;activate(&#039;qty&#039;);
            $Ajax-&gt;activate(&#039;line_total&#039;);
        } else
             sales_items_list_cells(null,&#039;stock_id&#039;, last_sales_order_detail($order, &#039;stk_code&#039;), false, true, true);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Thu, 24 Jan 2019 19:05:28 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34070#p34070</guid>
		</item>
	</channel>
</rss>
