diff --git a/htdocs/comm/addpropal.php b/htdocs/comm/addpropal.php index 0c9b763adfc..fa9f5de6091 100644 --- a/htdocs/comm/addpropal.php +++ b/htdocs/comm/addpropal.php @@ -209,7 +209,7 @@ if ($_GET["action"] == 'create') { print ''.$langs->trans('DeliveryAddress').''; print ''; - $numaddress = $html->select_adresse_livraison($soc->adresse_livraison_id, $_GET['socidp'],'adresse_livraison_id'); + $numaddress = $html->select_adresse_livraison($soc->adresse_livraison_id, $_GET['socidp'],'adresse_livraison_id',1); if ($numaddress==0) { print '   id.'&action=create>'.$langs->trans("AddAddress").''; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 3871a98b97c..c461e88d451 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -660,7 +660,7 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer) // Adresse de livraison print ''.$langs->trans('DeliveryAddress').''; - $numaddress = $html->select_adresse_livraison($soc->adresse_livraison_id, $_GET['socidp'],'adresse_livraison_id'); + $numaddress = $html->select_adresse_livraison($soc->adresse_livraison_id, $_GET['socidp'],'adresse_livraison_id',1); if ($numaddress==0) { diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 92ae94b5f99..fd6f3309c5e 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -911,7 +911,7 @@ class Form * \param selected Id contact pré-sélectionn * \param htmlname Nom champ formulaire */ - function select_adresse_livraison($selected='', $socid, $htmlname='adresse_livraison_id') + function select_adresse_livraison($selected='', $socid, $htmlname='adresse_livraison_id',$showempty=0) { // On recherche les utilisateurs $sql = "SELECT a.rowid, a.label"; @@ -922,6 +922,7 @@ class Form if ($this->db->query($sql)) { print ''; print ''; print ''; print '
'; - $numaddress = $this->select_adresse_livraison($selected, $socid, $htmlname); + $numaddress = $this->select_adresse_livraison($selected, $socid, $htmlname, 1); print ''; if ($numaddress==0)