Topic: Displaying the Sales group ID; sales/manage/sales_groups.php
Hello
Sales groups don't have Id, or short name. There is just a description.
Would it be possible to also display the table Id ? That would help to point out a specific record, because the description can change.
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.
In sales/manage/sales_groups.php,
one line to change:
$th = array(_("Group Name"),"", "", "id");
and one line to add:
label_cell($myrow["id"]);
The full code is:
//-------------------------------------------------------------------------------------------------
$sql = "SELECT * FROM ".TB_PREF."groups";
if (!check_value('show_inactive')) $sql .= " WHERE !inactive";
$sql .= " ORDER BY description";
$result = db_query($sql,"could not get groups");
start_form();
start_table("$table_style width=30%");
$th = array(_("Group Name"),"", "", "id");
inactive_control_column($th);
table_header($th);
$k = 0;
while ($myrow = db_fetch($result))
{
alt_table_row_color($k);
label_cell($myrow["description"]);
inactive_control_cell($myrow["id"], $myrow["inactive"], 'groups', 'id');
edit_button_cell("Edit".$myrow["id"], _("Edit"));
delete_button_cell("Delete".$myrow["id"], _("Delete"));
label_cell($myrow["id"]);
end_row();
}
inactive_control_row($th);
end_table();
echo '<br>';
//-------------------------------------------------------------------------------------------------
Gaston