From 4c90ba1a64f2f21c8b9dbd7a2da777043bd843c4 Mon Sep 17 00:00:00 2001 From: atm-arnaud Date: Thu, 9 May 2019 12:11:18 +0200 Subject: [PATCH 01/10] FIX attached files list with link file was broked --- htdocs/core/class/html.formfile.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index da2f697d5d4..73aa32ece79 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -833,7 +833,7 @@ class FormFile { $out.=''; $out.=''; - $out.=''; + $out.=''; $out.=$file->label; $out.=''; $out.=''; From bf3de83c5d1ff49c088e62f889b897c969125ed6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 12:45:14 +0200 Subject: [PATCH 02/10] Fix typo --- build/makepack-dolibarr.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 16b4f64a0d2..0f1f98ea08b 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -357,7 +357,7 @@ if ($nboftargetok) { } else { - print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog. But you can regenerate it with command:'\n"; + print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog'. But you can regenerate it with command:\n"; } if (! $BUILD || $BUILD eq '0-rc') # For a major version { From d53117da3f7d755c68a2460ed1eddfb27e75b897 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 15:34:42 +0200 Subject: [PATCH 03/10] Update log --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index b92b23a0748..e09192752d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -35,6 +35,7 @@ FIX: Total per day shows 00:00 if the total time spent is equal to 12:00 FIX: Update/delete currency on same languages FIX: Wrong variable name make contact of supplier order not used on PDF. FIX: Add hidden option MAIN_PDF_HIDE_SITUATION to hide situation (quick hack to fix output pb). +FIX: attached files list with link file was broked ***** ChangeLog for 9.0.2 compared to 9.0.1 ***** FIX: #10822 From 2b182c1cc15281bc64a43a18342b3e82d42d5afb Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Thu, 9 May 2019 20:39:30 +0200 Subject: [PATCH 04/10] FIX: #11097 --- htdocs/admin/holiday.php | 6 +++--- htdocs/core/modules/holiday/mod_holiday_immaculate.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php index 82037fa85d1..6b65f168137 100644 --- a/htdocs/admin/holiday.php +++ b/htdocs/admin/holiday.php @@ -1,8 +1,8 @@ +/* Copyright (C) 2011-2019 Juanjo Menent * Copyright (C) 2011-2018 Philippe Grand * Copyright (C) 2018 Charlene Benke - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018 Frédéric France * * 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 @@ -55,7 +55,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; if ($action == 'updateMask') { - $maskconst = GETPOST('maskconstholidaty','alpha'); + $maskconst = GETPOST('maskconstholiday','alpha'); $maskvalue = GETPOST('maskholiday','alpha'); if ($maskconst) $res = dolibarr_set_const($db,$maskconst,$maskvalue,'chaine',0,'',$conf->entity); diff --git a/htdocs/core/modules/holiday/mod_holiday_immaculate.php b/htdocs/core/modules/holiday/mod_holiday_immaculate.php index 338b553166e..fb95b08a5e0 100644 --- a/htdocs/core/modules/holiday/mod_holiday_immaculate.php +++ b/htdocs/core/modules/holiday/mod_holiday_immaculate.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018 Charlene Benke +/* Copyright (C) 2011-2019 Juanjo Menent + * Copyright (C) 2018 Charlene Benke * * 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 @@ -72,7 +72,7 @@ class mod_holiday_immaculate extends ModelNumRefHolidays $texte.= '
'; $texte.= ''; $texte.= ''; - $texte.= ''; + $texte.= ''; $texte.= ''; $tooltip=$langs->trans("GenericMaskCodes",$langs->transnoentities("Holiday"),$langs->transnoentities("Holiday")); From 2df026b903ed8d983f474ae7071915a7bdba44a5 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Thu, 9 May 2019 20:59:22 +0200 Subject: [PATCH 05/10] FIX: #11032 --- htdocs/product/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 22767b69cda..03163989094 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012-2016 Marcos García - * Copyright (C) 2013-2018 Juanjo Menent + * Copyright (C) 2013-2019 Juanjo Menent * Copyright (C) 2013-2015 Raphaël Doursenaud * Copyright (C) 2013 Jean Heimburger * Copyright (C) 2013 Cédric Salvador @@ -269,7 +269,7 @@ else $sql = 'SELECT DISTINCT p.rowid, p.ref, p.label, p.fk_product_type, p.barcode, p.price, p.price_ttc, p.price_base_type, p.entity,'; $sql.= ' p.fk_product_type, p.duration, p.weight, p.length, p.surface, p.volume, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock,'; $sql.= ' p.tobatch, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy,'; -$sql.= ' p.datec as date_creation, p.tms as date_update, p.pmp,'; +$sql.= ' p.datec as date_creation, p.tms as date_update, p.pmp, p.stock,'; $sql.= ' MIN(pfp.unitprice) as minsellprice'; if (!empty($conf->variants->enabled) && (!empty($conf->global->PRODUIT_ATTRIBUTES_HIDECHILD) && ! $show_childproducts )) { $sql .= ', pac.rowid prod_comb_id'; From 5625c94c44b9f28474584835b603dcbba184f800 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 May 2019 14:39:05 +0200 Subject: [PATCH 06/10] Fix missing label on project tooltip --- htdocs/comm/propal/list.php | 25 +++++++++++++------------ htdocs/commande/list.php | 17 ++++++++++------- htdocs/compta/facture/list.php | 5 ++--- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index f87a73b5288..1bb81c88ec4 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -265,13 +265,12 @@ $sql.= " ava.rowid as availability,"; $sql.= " state.code_departement as state_code, state.nom as state_name,"; $sql.= ' p.rowid, p.entity, p.note_private, p.total_ht, p.tva as total_vat, p.total as total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,'; $sql.= ' p.datec as date_creation, p.tms as date_update,'; -$sql.= " pr.rowid as project_id, pr.ref as project_ref,"; -if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,"; +$sql.= " pr.rowid as project_id, pr.ref as project_ref, p.title as project_label,"; $sql.= ' u.login'; +if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user,"; if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc"; - // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook @@ -760,6 +759,12 @@ if ($resql) $objectstatic->id=$obj->rowid; $objectstatic->ref=$obj->ref; + $companystatic->id=$obj->socid; + $companystatic->name=$obj->name; + $companystatic->client=$obj->client; + $companystatic->code_client=$obj->code_client; + $companystatic->email=$obj->email; + print ''; if (! empty($arrayfields['p.ref']['checked'])) @@ -812,20 +817,16 @@ if ($resql) { // Project ref print ''; if (! $i) $totalarray['nbfield']++; } - $companystatic->id=$obj->socid; - $companystatic->name=$obj->name; - $companystatic->client=$obj->client; - $companystatic->code_client=$obj->code_client; - $companystatic->email=$obj->email; - // Thirdparty if (! empty($arrayfields['s.nom']['checked'])) { diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 91aee2e6bdc..06175069f37 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -243,11 +243,10 @@ $sql.= " state.code_departement as state_code, state.nom as state_name,"; $sql.= ' c.rowid, c.ref, c.total_ht, c.tva as total_tva, c.total_ttc, c.ref_client,'; $sql.= ' c.date_valid, c.date_commande, c.note_private, c.date_livraison as date_delivery, c.fk_statut, c.facture as billed,'; $sql.= ' c.date_creation as date_creation, c.tms as date_update,'; -$sql.= " p.rowid as project_id, p.ref as project_ref"; +$sql.= " p.rowid as project_id, p.ref as project_ref, p.title as project_label"; if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc"; - // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook @@ -957,10 +956,14 @@ if ($resql) // Project if (! empty($arrayfields['p.project_ref']['checked'])) { - $projectstatic->id=$obj->project_id; - $projectstatic->ref=$obj->project_ref; - print ''; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index e24c0dc23d4..d5acdbfb30c 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -370,9 +370,8 @@ $sql.= " p.rowid as project_id, p.ref as project_ref, p.title as project_label"; // TODO Better solution to be able to sort on already payed or remain to pay is to store amount_payed in a denormalized field. if (! $sall) $sql.= ', SUM(pf.amount) as dynamount_payed'; if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc"; - // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook @@ -1022,7 +1021,7 @@ if ($resql) // Project if (! empty($arrayfields['p.ref']['checked'])) { - print '
'; - if ($obj->project_id) { - $projectstatic->fetch($obj->project_id); + if ($obj->project_id > 0) { + $projectstatic->id=$obj->project_id; + $projectstatic->ref=$obj->project_ref; + $projectstatic->title=$obj->project_label; print $projectstatic->getNomUrl(1); } print ''; - if ($obj->project_id > 0) print $projectstatic->getNomUrl(1); + print ''; + if ($obj->project_id > 0) + { + $projectstatic->id=$obj->project_id; + $projectstatic->ref=$obj->project_ref; + $projectstatic->title=$obj->project_label; + print $projectstatic->getNomUrl(1); + } print ''; + print ''; if ($obj->project_id > 0) { $projectstatic->id=$obj->project_id; From 14b11b3cc5578233c81576a0f3955ef1a2489643 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 May 2019 14:43:01 +0200 Subject: [PATCH 07/10] Prepare 9.0.4 --- htdocs/filefunc.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 3ad0cfa96e4..3804dad9a86 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -31,7 +31,7 @@ */ if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr'); -if (! defined('DOL_VERSION')) define('DOL_VERSION','9.0.3'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c +if (! defined('DOL_VERSION')) define('DOL_VERSION','9.0.4'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c if (! defined('EURO')) define('EURO',chr(128)); From 22c548e80b2d350c963e4f2d36a3cb974129e558 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 May 2019 14:46:43 +0200 Subject: [PATCH 08/10] Fix sql --- htdocs/comm/propal/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 1bb81c88ec4..893a3935cba 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -265,7 +265,7 @@ $sql.= " ava.rowid as availability,"; $sql.= " state.code_departement as state_code, state.nom as state_name,"; $sql.= ' p.rowid, p.entity, p.note_private, p.total_ht, p.tva as total_vat, p.total as total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,'; $sql.= ' p.datec as date_creation, p.tms as date_update,'; -$sql.= " pr.rowid as project_id, pr.ref as project_ref, p.title as project_label,"; +$sql.= " pr.rowid as project_id, pr.ref as project_ref, pr.title as project_label,"; $sql.= ' u.login'; if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user,"; if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc"; From 95326c3d63883e829311108b7427d2373e260a67 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 May 2019 16:27:38 +0200 Subject: [PATCH 09/10] Update list.php --- htdocs/product/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 03163989094..a85c4686ca9 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -330,7 +330,7 @@ $reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // No $sql.=$hookmanager->resPrint; $sql.= " GROUP BY p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price_base_type,"; $sql.= " p.fk_product_type, p.duration, p.weight, p.length, p.surface, p.volume, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock,"; -$sql.= ' p.datec, p.tms, p.entity, p.tobatch, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy, p.pmp'; +$sql.= ' p.datec, p.tms, p.entity, p.tobatch, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy, p.pmp, p.stock'; if (!empty($conf->variants->enabled) && (!empty($conf->global->PRODUIT_ATTRIBUTES_HIDECHILD) && ! $show_childproducts )) { $sql .= ', pac.rowid'; From 069df823805f8fec1a5519ea13ce37d82685b169 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 May 2019 17:40:34 +0200 Subject: [PATCH 10/10] FIX javascript error when ckeditor module not enabled --- htdocs/core/class/doleditor.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index 548721be05f..405aa04456a 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -177,7 +177,7 @@ class DolEditor $out.= $this->content; $out.= ''; - if ($this->tool == 'ckeditor' && ! empty($conf->use_javascript_ajax)) + if ($this->tool == 'ckeditor' && ! empty($conf->use_javascript_ajax) && ! empty($conf->fckeditor->enabled)) { if (! defined('REQUIRE_CKEDITOR')) define('REQUIRE_CKEDITOR','1');