From 80facefa23205b5c617293f74af7219562dca95c Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 12 Jun 2014 09:13:51 +0200 Subject: [PATCH 1/5] =?UTF-8?q?Fix=20[=20bug=20#1454=20]=20Mention=20de=20?= =?UTF-8?q?bas=20de=20page=20erron=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChangeLog | 1 + htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 392de85a460..610c08a28ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ Fix: [ bug #1443 ] Payment conditions is erased after editing supplier invoice l limit date for payment Fix: Filter on status was not visible when selected from url. Fix: Filtering on status was last when asking to sort. +Fix: [ bug #1454 ] Mention de bas de page erroné ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index f48c6bc31a4..b0db46f033a 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -1092,7 +1092,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders */ function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext=0) { - return pdf_pagefoot($pdf,$outputlangs,'SUPPLIER_INVOICE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext); + return pdf_pagefoot($pdf,$outputlangs,'SUPPLIER_ORDER_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext); } } From f796a6408ef5bc6cd2528af44e16812feb382a13 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 12 Jun 2014 15:28:11 +0200 Subject: [PATCH 2/5] Do not display dictionnay for non activated module --- ChangeLog | 1 + htdocs/core/lib/admin.lib.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 610c08a28ad..b1f69e0e9fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ Fix: [ bug #1443 ] Payment conditions is erased after editing supplier invoice l Fix: Filter on status was not visible when selected from url. Fix: Filtering on status was last when asking to sort. Fix: [ bug #1454 ] Mention de bas de page erroné +Fix: Do not display dictionnay for non activated module ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 3cfb0adeb7d..40f7ba41447 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -937,6 +937,8 @@ function complete_dictionnary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsq $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod))); if ($objMod->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2 && ! $conf->global->$const_name) $modulequalified=0; if ($objMod->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1 && ! $conf->global->$const_name) $modulequalified=0; + //If module is not activated disqualified + if (empty($conf->global->$const_name)) $modulequalified=0; if ($modulequalified) { From 40a5d20cc885ea47fc62bfd940d8e91e56e18f03 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 12 Jun 2014 16:46:20 +0200 Subject: [PATCH 3/5] Do not reset index on product import !!! --- htdocs/core/modules/modProduct.class.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index c6e473f38e2..35b5f3d90b9 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -273,8 +273,6 @@ class modProduct extends DolibarrModules // Import product multiprice //-------- - $r=0; - $r++; $this->import_code[$r]=$this->rights_class.'_'.$r; $this->import_label[$r]="ProductsMultiPrice"; // Translation key From 0916d2cf3b1307db8d8e7612ae96f2e5ce71f67b Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 13 Jun 2014 15:54:37 +0200 Subject: [PATCH 4/5] Fix link element from project "associates object" pages http://www.dolibarr.fr/forum/527-bugs-sur-la-version-stable-courante/50687-objet-associes-au-projet --- ChangeLog | 1 + htdocs/core/class/html.formprojet.class.php | 7 ++++++- htdocs/projet/element.php | 7 ++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b1f69e0e9fe..fe25f447e6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,7 @@ Fix: Filter on status was not visible when selected from url. Fix: Filtering on status was last when asking to sort. Fix: [ bug #1454 ] Mention de bas de page erroné Fix: Do not display dictionnay for non activated module +Fix: Link element from element project pages ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index e090f2f6824..d668912faca 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -168,6 +168,7 @@ class FormProjets */ function select_element($table_element) { + global $conf; $projectkey="fk_projet"; switch ($table_element) @@ -195,7 +196,7 @@ class FormProjets if (!empty($this->societe->id)) { $sql.= " AND fk_soc=".$this->societe->id; } - $sql.= ' AND entity='.$conf->entity; + $sql.= ' AND entity='.getEntity('project'); $sql.= " ORDER BY ref DESC"; dol_syslog(get_class($this).'::select_element sql='.$sql,LOG_DEBUG); @@ -219,6 +220,10 @@ class FormProjets return $sellist ; $this->db->free($resql); + }else { + $this->error=$this->db->lasterror(); + dol_syslog(get_class($this) . "::select_element " . $errmsg, LOG_ERR); + return -1; } } diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 4947af8ba30..88330819349 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -209,13 +209,18 @@ foreach ($listofreferent as $key => $value) $classname=$value['class']; $tablename=$value['table']; $qualified=$value['test']; + if ($qualified) { print '
'; print_titre($langs->trans($title)); - + $selectList=$formproject->select_element($tablename); + if ($selectList<0) { + setEventMessage($formproject->error,'errors'); + } + if ($selectList) { print '
'; From 42e6727e5ddd75ba1261c81901a63794dc2526ed Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 13 Jun 2014 15:56:31 +0200 Subject: [PATCH 5/5] Better error return --- htdocs/core/class/html.formprojet.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index d668912faca..b3228278261 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -222,7 +222,7 @@ class FormProjets $this->db->free($resql); }else { $this->error=$this->db->lasterror(); - dol_syslog(get_class($this) . "::select_element " . $errmsg, LOG_ERR); + dol_syslog(get_class($this) . "::select_element " . $this->error, LOG_ERR); return -1; } }