<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Displaying the Sales group ID; sales/manage/sales_groups.php]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=1406&amp;type=atom" />
	<updated>2010-06-26T16:52:20Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=1406</id>
		<entry>
			<title type="html"><![CDATA[Re: Displaying the Sales group ID; sales/manage/sales_groups.php]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=6315#p6315" />
			<content type="html"><![CDATA[<p>Great !</p><p>Thanks Joe</p><p>Gaston</p>]]></content>
			<author>
				<name><![CDATA[huotg01]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=983</uri>
			</author>
			<updated>2010-06-26T16:52:20Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=6315#p6315</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Displaying the Sales group ID; sales/manage/sales_groups.php]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=6314#p6314" />
			<content type="html"><![CDATA[<p>Hello Gaston,</p><p>This change is made in 2.3. The id is presented before the description.<br />When editing an existing, the id is also presented read-only.</p><p>Thanks for your proposal.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2010-06-26T16:21:52Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=6314#p6314</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Displaying the Sales group ID; sales/manage/sales_groups.php]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=6312#p6312" />
			<content type="html"><![CDATA[<p>Hello</p><p>Sales groups don&#039;t have Id, or short name. There is just a description.<br />Would it be possible to also display the table Id ? That would help to point out a specific record, because the description can change.<br />I have modified the module to load customers, adding many fields including the sales group and I wanted the ID of the sales group instead of the description.</p><p>In sales/manage/sales_groups.php,<br />one line to change:</p><p>&nbsp; &nbsp; &nbsp; &nbsp; $th = array(_(&quot;Group Name&quot;),&quot;&quot;, &quot;&quot;, &quot;id&quot;);</p><p>and one line to add:</p><p> &nbsp; &nbsp; label_cell($myrow[&quot;id&quot;]);</p><p>The full code is:</p><div class="codebox"><pre><code>//-------------------------------------------------------------------------------------------------

$sql = &quot;SELECT * FROM &quot;.TB_PREF.&quot;groups&quot;;
if (!check_value(&#039;show_inactive&#039;)) $sql .= &quot; WHERE !inactive&quot;;
$sql .= &quot; ORDER BY description&quot;;
$result = db_query($sql,&quot;could not get groups&quot;);

start_form();
start_table(&quot;$table_style width=30%&quot;);
$th = array(_(&quot;Group Name&quot;),&quot;&quot;, &quot;&quot;, &quot;id&quot;);
inactive_control_column($th);

table_header($th);
$k = 0; 

while ($myrow = db_fetch($result)) 
{
    
    alt_table_row_color($k);
        
    label_cell($myrow[&quot;description&quot;]);
    inactive_control_cell($myrow[&quot;id&quot;], $myrow[&quot;inactive&quot;], &#039;groups&#039;, &#039;id&#039;);
     edit_button_cell(&quot;Edit&quot;.$myrow[&quot;id&quot;], _(&quot;Edit&quot;));
     delete_button_cell(&quot;Delete&quot;.$myrow[&quot;id&quot;], _(&quot;Delete&quot;));
     label_cell($myrow[&quot;id&quot;]);
    end_row();
}

inactive_control_row($th);
end_table();

echo &#039;&lt;br&gt;&#039;;

//-------------------------------------------------------------------------------------------------</code></pre></div><p>Gaston</p>]]></content>
			<author>
				<name><![CDATA[huotg01]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=983</uri>
			</author>
			<updated>2010-06-26T16:05:03Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=6312#p6312</id>
		</entry>
</feed>
