<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Disable input or change some objects in customer invoice]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=6231&amp;type=atom" />
	<updated>2016-04-26T07:53:52Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=6231</id>
		<entry>
			<title type="html"><![CDATA[Re: Disable input or change some objects in customer invoice]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=25409#p25409" />
			<content type="html"><![CDATA[<p>you can call this function by adding last parameter `true`, than it will be disabled.&nbsp; Try it.</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2016-04-26T07:53:52Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=25409#p25409</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Disable input or change some objects in customer invoice]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=25408#p25408" />
			<content type="html"><![CDATA[<p>try this way, i am just explaining you the way to&nbsp; do it for first one. `sales_types_list_row`. you can do it others manually. </p><div class="codebox"><pre><code> 

function sales_types_list($name, $selected_id=null, $submit_on_change=false, $special_option=false, $disabled=false)
{
    $sql = &quot;SELECT id, sales_type, inactive FROM &quot;.TB_PREF.&quot;sales_types&quot;;

    return combo_input($name, $selected_id, $sql, &#039;id&#039;, &#039;sales_type&#039;,
    array(
        &#039;spec_option&#039; =&gt; $special_option===true ? _(&quot;All Sales Types&quot;) : $special_option,
        &#039;spec_id&#039; =&gt; 0,
        &#039;select_submit&#039;=&gt; $submit_on_change,
                &#039;disabled&#039;  =&gt; $disabled, 
    //      &#039;async&#039; =&gt; false,
    ) );
}

function sales_types_list_cells($label, $name, $selected_id=null, $submit_on_change=false, $special_option=false, $disabled=false)
{
    if ($label != null)
        echo &quot;&lt;td&gt;$label&lt;/td&gt;\n&quot;;
    echo &quot;&lt;td&gt;&quot;;
    echo sales_types_list($name, $selected_id, $submit_on_change, $special_option, $disabled);
    echo &quot;&lt;/td&gt;\n&quot;;
}

function sales_types_list_row($label, $name, $selected_id=null, $submit_on_change=false, $special_option=false, $disabled=false)
{
    echo &quot;&lt;tr&gt;&lt;td class=&#039;label&#039;&gt;$label&lt;/td&gt;&quot;;
    sales_types_list_cells(null, $name, $selected_id, $submit_on_change, $special_option, $disabled);
    echo &quot;&lt;/tr&gt;\n&quot;;
}</code></pre></div><p>Here I just added additional parameter `$disabled`. and forwarded to combo_input call.</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2016-04-26T07:52:44Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=25408#p25408</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Disable input or change some objects in customer invoice]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=25404#p25404" />
			<content type="html"><![CDATA[<p>How can i disable input or change some objects in customer invoice? such as:</p><p>sales_types_list_row<br />price<br />payment_terms_list_cells<br />Amount<br />Shipping Cost</p><p>And dont allow user to input or change these?</p>]]></content>
			<author>
				<name><![CDATA[kolegut]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=21907</uri>
			</author>
			<updated>2016-04-23T12:12:59Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=25404#p25404</id>
		</entry>
</feed>
