diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 21223f69353..1d5c06ac180 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -737,6 +737,11 @@ else if ($_GET['action'] != 'editdelivery_adress' && $commande->brouillon) print 'soc_id.'&id='.$commande->id.'">'.img_edit($langs->trans('SetDeliveryAddress'),1).''; print ''; print ''; + + //permet de revenir à la fiche commande une fois l'adresse de livraison modifiée + $origin = commande; + $originid = $commande->id; + if ($_GET['action'] == 'editdelivery_adress') { $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->adresse_livraison_id,$_GET['socid'],'adresse_livraison_id','commande',$commande->id); diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index e2071aee82c..5680c2c027f 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -1614,7 +1614,7 @@ class Form require_once(DOL_DOCUMENT_ROOT ."/comm/adresse_livraison.class.php"); $livraison=new Livraison($this->db); $livraison->fetch_adresse($selected); - print 'socid.'&idl='.$livraison->idl.'&action=edit>'.$livraison->label.''; + print 'socid.'&idl='.$livraison->idl.'&action=edit&origin='.$origin.'&originid='.$originid.'>'.$livraison->label.''; } else {