diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index a63976dd0bb..4b9f6b0c322 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -47,6 +47,7 @@ class Commande var $cond_reglement_code; var $mode_reglement_id; var $mode_reglement_code; + var $adresse_livraison_id; // Pour board var $nbtodo; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 3c7e820d07e..fabf0362ee2 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -84,17 +84,18 @@ if ($_POST['action'] == 'add' && $user->rights->commande->creer) $commande = new Commande($db); - $commande->soc_id = $_POST['soc_id']; - $commande->date_commande = $datecommande; - $commande->note = $_POST['note']; - $commande->source = $_POST['source_id']; - $commande->projetid = $_POST['projetid']; - $commande->remise_percent = $_POST['remise_percent']; - $commande->ref_client = $_POST['ref_client']; - $commande->modelpdf = $_POST['model']; - $commande->cond_reglement_id = $_POST['cond_reglement_id']; - $commande->mode_reglement_id = $_POST['mode_reglement_id']; - $commande->date_livraison = $datelivraison; + $commande->soc_id = $_POST['soc_id']; + $commande->date_commande = $datecommande; + $commande->note = $_POST['note']; + $commande->source = $_POST['source_id']; + $commande->projetid = $_POST['projetid']; + $commande->remise_percent = $_POST['remise_percent']; + $commande->ref_client = $_POST['ref_client']; + $commande->modelpdf = $_POST['model']; + $commande->cond_reglement_id = $_POST['cond_reglement_id']; + $commande->mode_reglement_id = $_POST['mode_reglement_id']; + $commande->date_livraison = $datelivraison; + $commande->adresse_livraison_id = $_POST['adresse_livraison_id']; $commande->add_product($_POST['idprod1'],$_POST['qty1'],$_POST['remise_percent1']); $commande->add_product($_POST['idprod2'],$_POST['qty2'],$_POST['remise_percent2']); diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index c6f129fbca3..cc18ebb1852 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -1595,7 +1595,7 @@ class Form print ''; print '
| '; - $this->select_adresse_livraison($selected, $_POST['socid'], $htmlname); + $this->select_adresse_livraison($selected, $_GET['socid'], $htmlname); print ' | '; print ''; print ' |