From 6d83882a5d355b0c3b6a09a4e8047ff039e5505f Mon Sep 17 00:00:00 2001 From: Alexis Algoud Date: Tue, 8 Jul 2014 09:00:41 +0200 Subject: [PATCH 01/10] FIX : Bad rank when a bill was made by multiple orders --- htdocs/commande/orderstoinvoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 5ea4e5b72cbee..7411d3a93689f 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -285,7 +285,7 @@ 'HT', 0, $product_type, - $lines[$i]->rang, + $ii, $lines[$i]->special_code, $object->origin, $lines[$i]->rowid, From 0598bb611429f53d8cf2d05ab312f2b61f05f73b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 20:21:32 +0200 Subject: [PATCH 02/10] Fix: travis file for 3.5 --- .travis.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 96395a4b32f9e..26e09482f80f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -88,10 +88,6 @@ script: - date - php upgrade.php 3.4.0 3.5.0 > upgrade.log - php upgrade2.php 3.4.0 3.5.0 > upgrade2.log - - php upgrade.php 3.5.0 3.6.0 >> upgrade.log - - php upgrade2.php 3.5.0 3.6.0 >> upgrade2.log - - php upgrade.php 3.6.0 3.7.0 >> upgrade.log - - php upgrade2.php 3.6.0 3.7.0 >> upgrade2.log # - cat upgrade.log # - cat upgrade2.log - cd ../.. From 3f23b116c6a5f58d4fad3b9b1f0acb8408066382 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 11 Jul 2014 11:44:54 +0200 Subject: [PATCH 03/10] =?UTF-8?q?[=20bug=20#1522=20]=20Liste=20des=20propo?= =?UTF-8?q?sitions=20commerciales=20non=20filt=C3=A9e=20depuis=20un=20proj?= =?UTF-8?q?et?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/core/class/html.formprojet.class.php | 7 ++++--- htdocs/projet/element.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index b32282782614f..7b8eefdbbae22 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -164,9 +164,10 @@ function select_projects($socid=-1, $selected='', $htmlname='projectid', $maxlen * Build Select List of element associable to a project * * @param string $table_element Table of the element to update + * @param int $socid socid to filter * @return string The HTML select list of element */ - function select_element($table_element) + function select_element($table_element,$socid=0) { global $conf; @@ -193,8 +194,8 @@ function select_element($table_element) $sql.= " FROM ".MAIN_DB_PREFIX.$table_element; $sql.= " WHERE ".$projectkey." is null"; - if (!empty($this->societe->id)) { - $sql.= " AND fk_soc=".$this->societe->id; + if (!empty($socid)) { + $sql.= " AND fk_soc=".$socid; } $sql.= ' AND entity='.getEntity('project'); $sql.= " ORDER BY ref DESC"; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 8833081934975..4075113d625fe 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -216,7 +216,7 @@ print_titre($langs->trans($title)); - $selectList=$formproject->select_element($tablename); + $selectList=$formproject->select_element($tablename,$project->societe->id); if ($selectList<0) { setEventMessage($formproject->error,'errors'); } From 7d77772820307ada5407807da695f63514b00b71 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 11 Jul 2014 11:45:59 +0200 Subject: [PATCH 04/10] changelog --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index cfe4950e2f1ee..502cbc4053682 100644 --- a/ChangeLog +++ b/ChangeLog @@ -44,6 +44,7 @@ Fix: [ bug #1461 ] LINEORDER_SUPPLIER_CREATE does not intercept supplier order l Fix: [ bug #1484 ] BILL_SUPPLIER_PAYED trigger action does not intercept failure under some circumstances Fix: [ bug #1482 ] Several supplier invoice triggers do not show trigger error messages Fix: [ bug #1486 ] LINEBILL_SUPPLIER_CREATE and LINEBILL_SUPPLIER_UPDATE triggers do not intercept trigger action +Fix: [ bug #1522 ] Element list into associate object into project are no more filterd by project thirdparty ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. From ff5ea31452e1796ba2022cf73915e42f417d2139 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Jul 2014 12:40:30 +0200 Subject: [PATCH 05/10] Fix: Date error --- build/rpm/dolibarr_fedora.spec | 2 +- build/rpm/dolibarr_generic.spec | 2 +- build/rpm/dolibarr_mandriva.spec | 2 +- build/rpm/dolibarr_opensuse.spec | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index 9bcb450bb44e4..fb1deb610c576 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -331,7 +331,7 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Tue July 1 2014 Laurent Destailleur 3.5.4-0.3 +* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release * Fri May 2 2014 Laurent Destailleur 3.5.3-0.3 diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index bf844b8c76602..f5532934b353c 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -567,7 +567,7 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Tue July 1 2014 Laurent Destailleur 3.5.4-0.3 +* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release * Fri May 2 2014 Laurent Destailleur 3.5.3-0.3 diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index 68c6c505b6574..da1aa858535a3 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -336,7 +336,7 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Tue July 1 2014 Laurent Destailleur 3.5.4-0.3 +* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release * Fri May 2 2014 Laurent Destailleur 3.5.3-0.3 diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index 3da1b2003ec33..9ae11b015f8af 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -347,7 +347,7 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Tue July 1 2014 Laurent Destailleur 3.5.4-0.3 +* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release * Fri May 2 2014 Laurent Destailleur 3.5.3-0.3 From b9df48d48c72558aff58d826158e42fc6cb774c3 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 11 Jul 2014 15:53:31 +0200 Subject: [PATCH 06/10] Fix http://www.dolibarr.fr/forum/527-bugs-sur-la-version-stable-courante/50854-multi-societe-options-cookies --- htdocs/core/class/cookie.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/cookie.class.php b/htdocs/core/class/cookie.class.php index a45aaeb24235a..39d27d9a332b1 100644 --- a/htdocs/core/class/cookie.class.php +++ b/htdocs/core/class/cookie.class.php @@ -91,7 +91,9 @@ function decryptCookie() $num = (count($this->cookiearray) - 2); for ($f = 0; $f <= $num; $f++) { - $this->myValue .= strval(chr($this->cookiearray[$f]/$this->myKey)); + if (!empty($this->myKey)) { + $this->myValue .= strval(chr($this->cookiearray[$f]/$this->myKey)); + } } return(base64_decode($this->myValue)); From 4bc8e026b69b58becd91bc924d1cf4a0755824c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 13 Jul 2014 19:51:44 +0200 Subject: [PATCH 07/10] [ bug #1526 ] Thumbs of files uploaded with dots in their names do not load correctly --- ChangeLog | 1 + htdocs/core/class/html.formfile.class.php | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 502cbc4053682..d9c0706eb5448 100644 --- a/ChangeLog +++ b/ChangeLog @@ -45,6 +45,7 @@ Fix: [ bug #1484 ] BILL_SUPPLIER_PAYED trigger action does not intercept failure Fix: [ bug #1482 ] Several supplier invoice triggers do not show trigger error messages Fix: [ bug #1486 ] LINEBILL_SUPPLIER_CREATE and LINEBILL_SUPPLIER_UPDATE triggers do not intercept trigger action Fix: [ bug #1522 ] Element list into associate object into project are no more filterd by project thirdparty +Fix: [ bug #1526 ] Thumbs of files uploaded with dots in their names do not load correctly ***** 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.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 9ce484e5d43fd..d2cba220bcf19 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -4,6 +4,7 @@ * Copyright (c) 2010 Juanjo Menent * Copyright (c) 2013 Charles-Fr BENKE * Copyright (C) 2013 Cédric Salvador + * Copyright (c) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -800,9 +801,10 @@ function list_of_documents($filearray,$object,$modulepart,$param='',$forcedownlo // Preview if (empty($useinecm)) { + $fileinfo = pathinfo($file['name']); + print ''; - $tmp=explode('.',$file['name']); - $minifile=$tmp[0].'_mini.'.strtolower($tmp[1]); // Thumbs are created with filename in lower case + $minifile=$fileinfo['filename'].'_mini.'.$fileinfo['extension']; // Thumbs are created with filename in lower case if (image_format_supported($file['name']) > 0) print ''; else print ' '; print ''; From b0ae2fe2aaf069a4a9893d09ae3d588742862318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 14 Jul 2014 01:32:57 +0200 Subject: [PATCH 08/10] Fixed a bug introduced in commit 0916d2cf3b --- htdocs/projet/element.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 4075113d625fe..edc633a7fc84d 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -217,12 +217,10 @@ print_titre($langs->trans($title)); $selectList=$formproject->select_element($tablename,$project->societe->id); - if ($selectList<0) { + + if (!$selectList || ($selectList<0)) { setEventMessage($formproject->error,'errors'); - } - - if ($selectList) - { + } else { print '
'; print ''; print ''; From 3930c8829ef5a8cb6e305ca2d828e4f4a019525c Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Mon, 14 Jul 2014 19:38:00 +0200 Subject: [PATCH 09/10] Fix: Import ProfId1 to siren and ProfId2 to siret --- htdocs/core/modules/modSociete.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 753e1a0892b9d..ab80004b0c793 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2013 Regis Houssin - * Copyright (C) 2012-2013 Juanjo Menent + * Copyright (C) 2012-2014 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -382,7 +382,7 @@ function __construct($db) $this->import_icon[$r]='company'; $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'societe','extra'=>MAIN_DB_PREFIX.'societe_extrafields'); // List of tables to insert into (insert done in same order) - $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_departement'=>"StateId",'s.fk_pays'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); + $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_departement'=>"StateId",'s.fk_pays'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity = ".$conf->entity; $resql=$this->db->query($sql); From 3816e0fe1485bdbe73cdf29b340a5c40ebf0e749 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Mon, 14 Jul 2014 19:39:08 +0200 Subject: [PATCH 10/10] Fix: Import ProfId1 to siren and ProfId2 to siret --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 502cbc4053682..666a9ffd68aff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -45,6 +45,7 @@ Fix: [ bug #1484 ] BILL_SUPPLIER_PAYED trigger action does not intercept failure Fix: [ bug #1482 ] Several supplier invoice triggers do not show trigger error messages Fix: [ bug #1486 ] LINEBILL_SUPPLIER_CREATE and LINEBILL_SUPPLIER_UPDATE triggers do not intercept trigger action Fix: [ bug #1522 ] Element list into associate object into project are no more filterd by project thirdparty +Fix: Import ProfId1 to siren and ProfId2 to siret ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices.