<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Restricting sales Invoice price edition for unauthorized users]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=9143</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=9143&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Restricting sales Invoice price edition for unauthorized users.]]></description>
		<lastBuildDate>Sun, 28 Feb 2021 17:58:43 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Restricting sales Invoice price edition for unauthorized users]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=39191#p39191</link>
			<description><![CDATA[<p>Any Updates?</p>]]></description>
			<author><![CDATA[null@example.com (detkenn)]]></author>
			<pubDate>Sun, 28 Feb 2021 17:58:43 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=39191#p39191</guid>
		</item>
		<item>
			<title><![CDATA[Re: Restricting sales Invoice price edition for unauthorized users]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=38898#p38898</link>
			<description><![CDATA[<p>I will ask Janusz to take a look at thisl</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sun, 10 Jan 2021 06:52:11 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=38898#p38898</guid>
		</item>
		<item>
			<title><![CDATA[Re: Restricting sales Invoice price edition for unauthorized users]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=38896#p38896</link>
			<description><![CDATA[<p>@joe: Does this warrant a commit? Is the hidden price field safe as is? The patch is attached for current repo.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sun, 10 Jan 2021 04:51:26 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=38896#p38896</guid>
		</item>
		<item>
			<title><![CDATA[Restricting sales Invoice price edition for unauthorized users]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=38893#p38893</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (detkenn)]]></author>
			<pubDate>Sat, 09 Jan 2021 20:21:25 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=38893#p38893</guid>
		</item>
	</channel>
</rss>
