From da5c8f674d768c694613376c8cd3094367e052c1 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 29 Oct 2007 21:13:31 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20on=20exclus=20le=20contact=20de=20la=20l?= =?UTF-8?q?iste=20d=E9roulante=20lorsqu'il=20est=20s=E9lectionn=E9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/commande/contact.php | 8 ++++++-- htdocs/compta/facture/contact.php | 8 ++++++-- htdocs/contrat/contact.php | 8 ++++++-- htdocs/fichinter/contact.php | 8 ++++++-- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index 958ae3f4aa2..5305d52d0b4 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -232,7 +232,9 @@ if ($id > 0) print ''; print ''; - $html->select_users($user->id,'contactid'); + // On récupère les id des users déjà sélectionnés + $userAlreadySelected = $commande->getListContactId('internal'); + $html->select_users($user->id,'contactid',0,$userAlreadySelected); print ''; print ''; $commande->selectTypeContact($commande, '', 'type','internal'); @@ -261,7 +263,9 @@ if ($id > 0) print ''; print ''; - $html->select_contacts($selectedCompany, $selected = '', $htmlname = 'contactid'); + // On récupère les id des contacts déjà sélectionnés + $contactAlreadySelected = $commande->getListContactId('external'); + $html->select_contacts($selectedCompany, $selected = '', $htmlname = 'contactid',0,$contactAlreadySelected); print ''; print ''; $commande->selectTypeContact($commande, '', 'type','external'); diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index 0dcc5fbdf9d..898a38353e2 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -212,7 +212,9 @@ if ($id > 0) print ''; print ''; - $html->select_users($user->id,'contactid'); + // On récupère les id des users déjà sélectionnés + $userAlreadySelected = $facture->getListContactId('internal'); + $html->select_users($user->id,'contactid',0,$userAlreadySelected); print ''; print ''; $facture->selectTypeContact($facture, '', 'type','internal'); @@ -241,7 +243,9 @@ if ($id > 0) print ''; print ''; - $html->select_contacts($selectedCompany, $selected = '', $htmlname = 'contactid'); + // On récupère les id des contacts déjà sélectionnés + $contactAlreadySelected = $facture->getListContactId('external'); + $html->select_contacts($selectedCompany, $selected = '', $htmlname = 'contactid',0,$contactAlreadySelected); print ''; print ''; $facture->selectTypeContact($facture, '', 'type','external'); diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index d821dd02381..c434afa230f 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -233,7 +233,9 @@ if ($id > 0) print ''; print ''; - $html->select_users($user->id,'contactid'); + // On récupère les id des users déjà sélectionnés + $userAlreadySelected = $contrat->getListContactId('internal'); + $html->select_users($user->id,'contactid',0,$userAlreadySelected); print ''; print ''; $contrat->selectTypeContact($contrat, '', 'type','internal'); @@ -262,7 +264,9 @@ if ($id > 0) print ''; print ''; - $html->select_contacts($selectedCompany, $selected = '', $htmlname = 'contactid'); + // On récupère les id des contacts déjà sélectionnés + $contactAlreadySelected = $contrat->getListContactId('external'); + $html->select_contacts($selectedCompany, $selected = '', $htmlname = 'contactid',0,$contactAlreadySelected); print ''; print ''; $contrat->selectTypeContact($contrat, '', 'type','external'); diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php index 74baf05f534..aa4612436d1 100644 --- a/htdocs/fichinter/contact.php +++ b/htdocs/fichinter/contact.php @@ -218,7 +218,9 @@ if ($id > 0) print ''; print ''; - $html->select_users($user->id,'contactid'); + // On récupère les id des users déjà sélectionnés + $userAlreadySelected = $fichinter->getListContactId('internal'); + $html->select_users($user->id,'contactid',0,$userAlreadySelected); print ''; print ''; $fichinter->selectTypeContact($fichinter, '', 'type','internal'); @@ -247,7 +249,9 @@ if ($id > 0) print ''; print ''; - $html->select_contacts($selectedCompany, $selected = '', $htmlname = 'contactid'); + // On récupère les id des contacts déjà sélectionnés + $contactAlreadySelected = $fichinter->getListContactId('external'); + $html->select_contacts($selectedCompany, $selected = '', $htmlname = 'contactid',0,$contactAlreadySelected); print ''; print ''; $fichinter->selectTypeContact($fichinter, '', 'type','external');