From 28115689e8c293f0296d4b4b2dede9fc179b2667 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 26 Jan 2017 08:46:39 +0100 Subject: [PATCH 1/5] fix : wrong $formproject->select_projects call on model invoice --- htdocs/compta/facture/fiche-rec.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 584d3915430..41fe096d974 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -983,7 +983,7 @@ if ($action == 'create') $projectid = GETPOST('projectid')?GETPOST('projectid'):$object->fk_project; $langs->load('projects'); print '' . $langs->trans('Project') . ''; - $numprojet = $formproject->select_projects($socid, $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, $forceaddid=0, $morecss=''); + $numprojet = $formproject->select_projects($object->thirdparty->id, $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, ''); print '   thirdparty->id.(!empty($id)?'&id='.$id:'')).'">' . $langs->trans("AddProject") . ''; print ''; } From f0ba5cdba8d3c000341f55b31fc3cd87c6676f01 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 26 Jan 2017 09:02:47 +0100 Subject: [PATCH 2/5] fix travais --- htdocs/bookmarks/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index b89dbf291b7..0583c45bdab 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -219,7 +219,7 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '' , '', 0, '', '', 0); + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '', '', 0, '', '', 0); print '
'; print ''; From 32ebe8f4d72dba3893f595f17b2c9328b4fa2177 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 26 Jan 2017 14:38:49 +0100 Subject: [PATCH 3/5] fix : ressource extrafield in list --- htdocs/resource/class/dolresource.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index 2cf93493739..6e418e2e649 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -460,7 +460,7 @@ class Dolresource extends CommonObject $extrafields=new ExtraFields($this->db); $extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true); if (is_array($extralabels) && count($extralabels)>0) { - foreach($extralabels as $label=>$code) { + foreach($extralabels as $code=>$label) { $sql.= " ef.".$code." as extra_".$code.","; } } From deceeea8ffed662c8c76acdbbeaeabc7515999d6 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 26 Jan 2017 15:44:09 +0100 Subject: [PATCH 4/5] fix extrafield list of fileds --- htdocs/resource/list.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index b2ef82cf8c1..2c97b68f7ed 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -119,12 +119,15 @@ $arrayfields = array( // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { foreach ( $extrafields->attribute_label as $key => $val ) { - $arrayfields["ef." . $key] = array( - 'label' => $extrafields->attribute_label[$key], - 'checked' => $extrafields->attribute_list[$key], - 'position' => $extrafields->attribute_pos[$key], - 'enabled' => $extrafields->attribute_perms[$key] - ); + $typeofextrafield=$extrafields->attribute_type[$key]; + if ($typeofextrafield!='separate') { + $arrayfields["ef." . $key] = array( + 'label' => $extrafields->attribute_label[$key], + 'checked' => $extrafields->attribute_list[$key], + 'position' => $extrafields->attribute_pos[$key], + 'enabled' => $extrafields->attribute_perms[$key] + ); + } } } From a333a328d834d4ac6de6d9b98c61ff7ff217d96c Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 26 Jan 2017 16:32:36 +0100 Subject: [PATCH 5/5] FIX #6338 --- htdocs/contrat/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 849a466e18d..6c6b55ee949 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -272,7 +272,7 @@ $sql.= " state.code_departement, state.nom"; // Add where from extra fields foreach ($extrafields->attribute_label as $key => $val) { - $sql .= ', ef.'.$val; + $sql .= ', ef.'.$key; } // Add where from hooks $parameters=array();