Merge pull request #407 from simnandez/develop
[ task #104 ] Possibilité de facturer plusieurs commandes. Working
This commit is contained in:
commit
cf4be61349
@ -503,7 +503,8 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs))
|
||||
$sql.= ', '.MAIN_DB_PREFIX.'commande as c';
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= ' WHERE c.fk_soc = s.rowid';
|
||||
// Which invoice to show
|
||||
|
||||
/*
|
||||
if ($viewstatut <> '')
|
||||
{
|
||||
if ($viewstatut < 4 && $viewstatut > -2)
|
||||
@ -524,6 +525,11 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs))
|
||||
$sql.= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// Which invoice to show
|
||||
$sql.= " AND c.fk_statut in (1, 2) AND c.facture = 0";
|
||||
|
||||
$sql.= ' AND s.entity = '.$conf->entity;
|
||||
if ($socid) $sql.= ' AND s.rowid = '.$socid;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user