diff --git a/ChangeLog b/ChangeLog index 8835f045e87..148e8fa1df3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,8 @@ For users: - Fix: Customer code was not correct on PDF it if contains special characters. - Fix: Can update price even with "NPR" VAT rates. +- Fix: When product type is missing, description is not lost when adding + new product lines. For translators: - Update some language files. diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index e992c1ea1b5..12342673dc8 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1608,12 +1608,12 @@ if ($id > 0 || ! empty($ref)) if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS) { require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('dp_desc','',100,'dolibarr_details'); + $doleditor=new DolEditor('dp_desc',$_POST["dp_desc"],100,'dolibarr_details'); $doleditor->Create(); } else { - print ''; + print ''; } print ''; print ''; @@ -1680,12 +1680,12 @@ if ($id > 0 || ! empty($ref)) if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS) { require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('np_desc','',100,'dolibarr_details'); + $doleditor=new DolEditor('np_desc',$_POST["np_desc"],100,'dolibarr_details'); $doleditor->Create(); } else { - print ''; + print ''; } print ''; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index b250014b8e5..4dd13d3be9a 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1793,12 +1793,12 @@ else if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS) { require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('dp_desc','',100,'dolibarr_details'); + $doleditor=new DolEditor('dp_desc',$_POST["dp_desc"],100,'dolibarr_details'); $doleditor->Create(); } else { - print ''; + print ''; } print ''; print ''; @@ -1870,12 +1870,12 @@ else if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS) { require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('np_desc','',100,'dolibarr_details'); + $doleditor=new DolEditor('np_desc',$_POST["np_desc"],100,'dolibarr_details'); $doleditor->Create(); } else { - print ''; + print ''; } print ''; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index a7247a4b7a7..b8934c8e296 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3018,12 +3018,12 @@ else if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS) { require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('dp_desc','',100,'dolibarr_details'); + $doleditor=new DolEditor('dp_desc',$_POST["dp_desc"],100,'dolibarr_details'); $doleditor->Create(); } else { - print ''; + print ''; } print ''; print ''; @@ -3080,11 +3080,11 @@ else // multiprix if($conf->global->PRODUIT_MULTIPRICES) { - $html->select_produits('','idprod','',$conf->produit->limit_size,$soc->price_level); + $html->select_produits((! empty($_POST['idprod'])?$_POST['idprod']:''),'idprod','',$conf->produit->limit_size,$soc->price_level); } else { - $html->select_produits('','idprod','',$conf->produit->limit_size); + $html->select_produits((! empty($_POST['idprod'])?$_POST['idprod']:''),'idprod','',$conf->produit->limit_size); } if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '
'; @@ -3093,12 +3093,12 @@ else if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS) { require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('np_desc','',100,'dolibarr_details'); + $doleditor=new DolEditor('np_desc',$_POST["np_desc"],100,'dolibarr_details'); $doleditor->Create(); } else { - print ''; + print ''; } print ''; diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 29f93b54cd7..027932fc779 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -751,12 +751,12 @@ elseif ($_GET["id"] > 0) if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS) { require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('np_desc','',100,'dolibarr_details'); + $doleditor=new DolEditor('np_desc',$_POST["np_desc"],100,'dolibarr_details'); $doleditor->Create(); } else { - print ''; + print ''; } print ''; diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index ad0b57245eb..83ffb0de972 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -856,12 +856,12 @@ if ($id > 0 || ! empty($ref)) if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS) { require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('dp_desc','',100,'dolibarr_details'); + $doleditor=new DolEditor('dp_desc',$_POST["dp_desc"],100,'dolibarr_details'); $doleditor->Create(); } else { - print ''; + print ''; } print ''; print ''; @@ -913,12 +913,12 @@ if ($id > 0 || ! empty($ref)) if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS) { require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('np_desc','',100,'dolibarr_details'); + $doleditor=new DolEditor('np_desc',$_POST["np_desc"],100,'dolibarr_details'); $doleditor->Create(); } else { - print ''; + print ''; } print ''; diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 202342b8274..45fc5940d0b 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -969,12 +969,12 @@ else if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS) { require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('label','',100,'dolibarr_details'); + $doleditor=new DolEditor('label',$_POST["label"],100,'dolibarr_details'); $doleditor->Create(); } else { - print ''; + print ''; } print ''; print ''; diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 102c81840f0..6f5bcf4f8d1 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -864,7 +864,9 @@ class Form if ( $resultd ) $objtp = $this->db->fetch_object($resultd); // on charge la traduction suivante } } - $opt = '