Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git in…
Browse files Browse the repository at this point in the history
…to develop
  • Loading branch information
eldy committed Jan 21, 2014
2 parents 8cdd050 + f3774cc commit 8666524
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions htdocs/compta/facture.php
Expand Up @@ -2805,6 +2805,7 @@
$formquestion=array(
//'text' => $langs->trans("ConfirmClone"),
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1)
array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company('','socid','(s.client=1 OR s.client=2 OR s.client=3)',1))
);
// Paiement incomplet. On demande si motif = escompte ou autre
$formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes',1);
Expand Down
5 changes: 3 additions & 2 deletions htdocs/fourn/class/fournisseur.class.php
Expand Up @@ -180,15 +180,16 @@ function CreateCategory($user, $name)
function ListArray()
{
global $conf;
global $user;

$arr = array();

$sql = "SELECT s.rowid, s.nom";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
if (!$this->user->rights->societe->client->voir && !$this->user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE s.fournisseur = 1";
$sql.= " AND s.entity IN (".getEntity('societe', 1).")";
if (!$this->user->rights->societe->client->voir && !$this->user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$this->user->id;
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;

$resql=$this->db->query($sql);

Expand Down

0 comments on commit 8666524

Please sign in to comment.