Fix: List of customers to build invoice or order

This commit is contained in:
eldy 2013-03-23 12:33:25 +01:00
parent 3af7ca5ac8
commit c8d6e9e44a
4 changed files with 4 additions and 4 deletions

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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";