Fix: List of customers to build invoice or order
This commit is contained in:
parent
3af7ca5ac8
commit
c8d6e9e44a
@ -1487,7 +1487,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
|
||||
else
|
||||
{
|
||||
print '<td colspan="2">';
|
||||
print $form->select_company('','socid','s.client = 1',1);
|
||||
print $form->select_company('','socid','s.client = 1 OR s.client = 3',1);
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>'."\n";
|
||||
|
||||
@ -1916,7 +1916,7 @@ if ($action == 'create')
|
||||
else
|
||||
{
|
||||
print '<td colspan="2">';
|
||||
print $form->select_company('','socid','s.client = 1',1);
|
||||
print $form->select_company('','socid','s.client = 1 OR s.client = 3',1);
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>'."\n";
|
||||
|
||||
@ -827,7 +827,7 @@ if ($action == 'create')
|
||||
else
|
||||
{
|
||||
print '<td colspan="2">';
|
||||
print $form->select_company('','socid','s.client = 1',1);
|
||||
print $form->select_company('','socid','s.client = 1 OR s.client = 3',1);
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>'."\n";
|
||||
|
||||
@ -678,7 +678,7 @@ class Form
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE s.entity IN (".getEntity('societe', 1).")";
|
||||
if (! empty($user->societe_id)) $sql.= " AND s.rowid = ".$user->societe_id;
|
||||
if ($filter) $sql.= " AND ".$filter;
|
||||
if ($filter) $sql.= " AND (".$filter.")";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
$sql.= " ORDER BY nom ASC";
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user