From 3adb4316e26bb3751a00730f8cf3ec4c0fd5770f Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 30 Jun 2006 14:23:57 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20si=20il=20y=20avait=20une=20adresse=20de?= =?UTF-8?q?=20livraison=20de=20cr=E9=E9e=20on=20n'=E9tait=20oblig=E9=20de?= =?UTF-8?q?=20la=20s=E9lectionner?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/comm/addpropal.php | 2 +- htdocs/commande/fiche.php | 2 +- htdocs/html.form.class.php | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) 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)