<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Restricting sales Invoice price edition for unauthorized users]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=9143&amp;type=atom" />
	<updated>2021-02-28T17:58:43Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=9143</id>
		<entry>
			<title type="html"><![CDATA[Re: Restricting sales Invoice price edition for unauthorized users]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=39191#p39191" />
			<content type="html"><![CDATA[<p>Any Updates?</p>]]></content>
			<author>
				<name><![CDATA[detkenn]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=45282</uri>
			</author>
			<updated>2021-02-28T17:58:43Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=39191#p39191</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Restricting sales Invoice price edition for unauthorized users]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38898#p38898" />
			<content type="html"><![CDATA[<p>I will ask Janusz to take a look at thisl</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2021-01-10T06:52:11Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38898#p38898</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Restricting sales Invoice price edition for unauthorized users]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38896#p38896" />
			<content type="html"><![CDATA[<p>@joe: Does this warrant a commit? Is the hidden price field safe as is? The patch is attached for current repo.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2021-01-10T04:51:26Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38896#p38896</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Restricting sales Invoice price edition for unauthorized users]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38893#p38893" />
			<content type="html"><![CDATA[<p>A feature to restrict users, with no sales pricing edition permissions, from editing prices while creating a Sales Order/Delivery /Invoice is admirable. Here is the code:</p><p>File: <strong>sales/includes/ui/sales_order_ui.inc</strong><br />Change <strong>function sales_order_item_controls</strong> as follows:</p><div class="codebox"><pre><code>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;);
            $Ajax-&gt;activate(&#039;price_lbl&#039;);
            $Ajax-&gt;activate(&#039;Disc_lbl&#039;);
        }</code></pre></div><div class="codebox"><pre><code>label_cell($units, &#039;&#039;, &#039;units&#039;);

        if($_SESSION[&quot;wa_current_user&quot;]-&gt;can_access(&#039;SA_SALESPRICE&#039;)){
            amount_cells(null, &#039;price&#039;);
            small_amount_cells(null, &#039;Disc&#039;, percent_format($_POST[&#039;Disc&#039;]), null, null, user_percent_dec());
        } else {
            amount_cell(input_num(&#039;price&#039;),false,&#039;&#039;,&#039;price_lbl&#039;);
            hidden(&quot;price&quot;,$_POST[&#039;price&#039;]);
            
            amount_cell(input_num(&#039;Disc&#039;),false,&#039;&#039;,&#039;Disc_lbl&#039;);
            hidden(&quot;Disc&quot;,$_POST[&#039;Disc&#039;]);
        }</code></pre></div>]]></content>
			<author>
				<name><![CDATA[detkenn]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=45282</uri>
			</author>
			<updated>2021-01-09T20:21:25Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38893#p38893</id>
		</entry>
</feed>
