<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Ajax Activation duplication]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=5338&amp;type=atom" />
	<updated>2014-11-26T19:24:49Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=5338</id>
		<entry>
			<title type="html"><![CDATA[Ajax Activation duplication]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=21566#p21566" />
			<content type="html"><![CDATA[<p>In the file inventory/prices.php lines 127 to 137 are:<br /></p><div class="codebox"><pre><code>if (list_updated(&#039;stock_id&#039;)) {
    $Ajax-&gt;activate(&#039;price_table&#039;);
    $Ajax-&gt;activate(&#039;price_details&#039;);
}
if (list_updated(&#039;stock_id&#039;) || isset($_POST[&#039;_curr_abrev_update&#039;]) || isset($_POST[&#039;_sales_type_id_update&#039;])) {
    // after change of stock, currency or salestype selector
    // display default calculated price for new settings. 
    // If we have this price already in db it is overwritten later.
    unset($_POST[&#039;price&#039;]);
    $Ajax-&gt;activate(&#039;price_details&#039;);
}</code></pre></div><p>We see that for the <strong>list_updated()</strong> is executed twice and the <strong>$Ajax-&gt;activate(&#039;price_details&#039;);</strong> is also executed twice for it&#039;s being checked. Is this necessary?</p><p>Where is the code that manages the Ajax return functionality for the various trigger values such as &#039;price_details&#039; ?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2014-11-26T19:24:49Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=21566#p21566</id>
		</entry>
</feed>
