From 728b64e334dc999fa965d61e2cfe1c4e65bd8747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 12 Apr 2015 20:24:22 +0200 Subject: [PATCH 01/12] Fix Bug #2583: Unable to create a bank transfer with localized numbers --- ChangeLog | 1 + htdocs/compta/bank/virement.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 31e0bad5a16..e299da9a8e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ Fix: [ bug #1757 ] Sorting breaks product/service statistics Fix: [ bug #1797 ] Tulip supplier invoice module takes creation date instead of invoice date Fix: [ bug #1792 ] Users are not allowed to see margins module index page when no product view permission is enabled Fix: [ bug #1846 ] Browser IE11 not detected +Fix: [ bug #2583 ] Unable to create a bank transfer with localized numbers ***** ChangeLog for 3.5.6 compared to 3.5.5 ***** Fix: Avoid missing class error for fetch_thirdparty method #1973 diff --git a/htdocs/compta/bank/virement.php b/htdocs/compta/bank/virement.php index bea66e6a47d..07541732bb0 100644 --- a/htdocs/compta/bank/virement.php +++ b/htdocs/compta/bank/virement.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2008 Laurent Destailleur * Copytight (C) 2005-2009 Regis Houssin * Copytight (C) 2012 Juanjo Menent + * Copyright (C) 2015 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 @@ -48,7 +49,7 @@ if ($action == 'add') $mesg=''; $dateo = dol_mktime(12,0,0,GETPOST('remonth','int'),GETPOST('reday','int'),GETPOST('reyear','int')); $label = GETPOST('label','alpha'); - $amount= GETPOST('amount','int'); + $amount= GETPOST('amount'); if (! $label) { From bbd01c0c8d0f238a642e26b5078d593571670879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 12 Apr 2015 20:59:58 +0200 Subject: [PATCH 02/12] Fix: Bug #2577 Incorrect invoice status in "Linked objects" page of a project --- ChangeLog | 1 + htdocs/projet/element.php | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 31e0bad5a16..4681b1bbd41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ Fix: [ bug #1757 ] Sorting breaks product/service statistics Fix: [ bug #1797 ] Tulip supplier invoice module takes creation date instead of invoice date Fix: [ bug #1792 ] Users are not allowed to see margins module index page when no product view permission is enabled Fix: [ bug #1846 ] Browser IE11 not detected +Fix: [ bug #2577 ] Incorrect invoice status in "Linked objects" page of a project ***** ChangeLog for 3.5.6 compared to 3.5.5 ***** Fix: Avoid missing class error for fetch_thirdparty method #1973 diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 62bbf9ae642..4d54123ae4a 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2015 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 @@ -281,7 +282,14 @@ foreach ($listofreferent as $key => $value) if (empty($value['disableamount'])) print ''.(isset($element->total_ttc)?price($element->total_ttc):' ').''; // Status - print ''.$element->getLibStatut(5).''; + print ''; + if ($element instanceof CommonInvoice) { + //This applies for Facture and FactureFournisseur + print $element->getLibStatut(5, $element->getSommePaiement()); + } else { + print $element->getLibStatut(5); + } + print ''; print ''; From 9cfb295675bebb049bbc367e902c571f1b9a27c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 12 Apr 2015 21:05:26 +0200 Subject: [PATCH 03/12] Fix: Bug #2576 Unable to edit a dictionary entry that has # in its ref --- ChangeLog | 1 + htdocs/admin/dict.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 31e0bad5a16..b59da631ee6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ Fix: [ bug #1757 ] Sorting breaks product/service statistics Fix: [ bug #1797 ] Tulip supplier invoice module takes creation date instead of invoice date Fix: [ bug #1792 ] Users are not allowed to see margins module index page when no product view permission is enabled Fix: [ bug #1846 ] Browser IE11 not detected +Fix: [ bug #2576 ] Unable to edit a dictionary entry that has # in its ref ***** ChangeLog for 3.5.6 compared to 3.5.5 ***** Fix: Avoid missing class error for fetch_thirdparty method #1973 diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 62e78ae95e2..391782199e7 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -6,7 +6,7 @@ * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2011 Philippe Grand * Copyright (C) 2011 Remy Younes - * Copyright (C) 2012-2013 Marcos García + * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2011-2012 Alexandre Spangaro * @@ -1104,7 +1104,7 @@ if ($id) if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) $iserasable=0; - $url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&code='.(! empty($obj->code)?$obj->code:'').'&id='.$id.'&'; + $url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&code='.(! empty($obj->code)?urlencode($obj->code):'').'&id='.$id.'&'; // Active print ''; From 6173706531ac4a19e0c5b66d3f066e6b98cc2c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 12 Apr 2015 21:55:20 +0200 Subject: [PATCH 04/12] Fix: [ bug #1906 ] Deplacement does not allow translated decimal format --- ChangeLog | 1 + htdocs/compta/deplacement/fiche.php | 27 +++++++++++++++++---------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 31e0bad5a16..89e358f1fcf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ Fix: [ bug #1757 ] Sorting breaks product/service statistics Fix: [ bug #1797 ] Tulip supplier invoice module takes creation date instead of invoice date Fix: [ bug #1792 ] Users are not allowed to see margins module index page when no product view permission is enabled Fix: [ bug #1846 ] Browser IE11 not detected +Fix: [ bug #1906 ] Deplacement does not allow translated decimal format ***** ChangeLog for 3.5.6 compared to 3.5.5 ***** Fix: Avoid missing class error for fetch_thirdparty method #1973 diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php index 808d9163222..65328ff6bfb 100644 --- a/htdocs/compta/deplacement/fiche.php +++ b/htdocs/compta/deplacement/fiche.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2013 Florian Henry + * Copyright (C) 2015 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 @@ -123,8 +124,14 @@ else if ($action == 'add' && $user->rights->deplacement->creer) { $error=0; + $km = GETPOST('km'); + + if ($km) { + $km = price2num($km); + } + $object->date = dol_mktime(12, 0, 0, GETPOST('remonth','int'), GETPOST('reday','int'), GETPOST('reyear','int')); - $object->km = GETPOST('km','int'); + $object->km = $km; $object->type = GETPOST('type','alpha'); $object->socid = GETPOST('socid','int'); $object->fk_user = GETPOST('fk_user','int'); @@ -182,8 +189,14 @@ else if ($action == 'update' && $user->rights->deplacement->creer) { $result = $object->fetch($id); + $km = GETPOST('km'); + + if ($km) { + $km = price2num($km); + } + $object->date = dol_mktime(12, 0, 0, GETPOST('remonth','int'), GETPOST('reday','int'), GETPOST('reyear','int')); - $object->km = GETPOST('km','int'); + $object->km = $km; $object->type = GETPOST('type','alpha'); $object->socid = GETPOST('socid','int'); $object->fk_user = GETPOST('fk_user','int'); @@ -225,12 +238,6 @@ else if ($action == 'setdated' && $user->rights->deplacement->creer) $result=$object->setValueFrom('dated',$dated,'','','date'); if ($result < 0) dol_print_error($db, $object->error); } -else if ($action == 'setkm' && $user->rights->deplacement->creer) -{ - $object->fetch($id); - $result=$object->setValueFrom('km',GETPOST('km','int')); - if ($result < 0) dol_print_error($db, $object->error); -} else if ($action == 'setnote_public' && $user->rights->deplacement->creer) { $object->fetch($id); @@ -385,7 +392,7 @@ else if ($id) // Km print ''.$langs->trans("FeesKilometersOrAmout").''; - print ''; + print ''; print ''; // Where @@ -477,7 +484,7 @@ else if ($id) print ''; print $form->editfieldkey("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); print ''; - print $form->editfieldval("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); + print $form->editfieldval("FeesKilometersOrAmout",'km',price($object->km),$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); print ""; // Where From 8f0c41dbd21e48fa61164a6794958a7ad6c1e752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 12 Apr 2015 22:02:25 +0200 Subject: [PATCH 05/12] Fix: [ bug #1905 ] Custom deplacement types do not get translated in deplacement card --- ChangeLog | 1 + htdocs/compta/deplacement/fiche.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 89e358f1fcf..c80a9ecc08b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ Fix: [ bug #1797 ] Tulip supplier invoice module takes creation date instead of Fix: [ bug #1792 ] Users are not allowed to see margins module index page when no product view permission is enabled Fix: [ bug #1846 ] Browser IE11 not detected Fix: [ bug #1906 ] Deplacement does not allow translated decimal format +Fix: [ bug #1905 ] Custom deplacement types do not get translated in deplacement card ***** ChangeLog for 3.5.6 compared to 3.5.5 ***** Fix: Avoid missing class error for fetch_thirdparty method #1973 diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php index 65328ff6bfb..752ffafa357 100644 --- a/htdocs/compta/deplacement/fiche.php +++ b/htdocs/compta/deplacement/fiche.php @@ -460,10 +460,12 @@ else if ($id) print ''; // Type + $form->load_cache_types_fees(); + print ''; print $form->editfieldkey("Type",'type',$langs->trans($object->type),$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); print ''; - print $form->editfieldval("Type",'type',$langs->trans($object->type),$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); + print $form->editfieldval("Type",'type', $form->cache_types_fees[$object->type],$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); print ''; // Who From 54b8aa8a0b79528aaf45e11e495d4dfef45002f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Tue, 14 Apr 2015 18:45:43 +0200 Subject: [PATCH 06/12] Fixed typo in task export Closes #2607, #2609 --- htdocs/core/modules/modProjet.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index 0d8a09aa7e5..db0b0d765c3 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -182,7 +182,7 @@ class modProjet extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='ProjectsAndTasksLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("projet","export")); - $this->export_dependencies_array[$r]=array('task_time'=>'ppt.rowid'); + $this->export_dependencies_array[$r]=array('task_time'=>'pt.rowid'); $this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle', 's.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text', From 3073aab48bbb26a4080696deb1105c12caa8d3c5 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 17 Apr 2015 23:31:51 +0200 Subject: [PATCH 07/12] Fix : discount were not working anymore on supplier order and bill --- htdocs/core/tpl/objectline_create.tpl.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index a51a6505416..7262a3b3bd9 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -201,9 +201,9 @@ else { - "> + "> - remise_percent); ?>" name="remise_percent">% + remise_percent); ?>">% Date: Sat, 18 Apr 2015 11:24:55 +0200 Subject: [PATCH 08/12] Fix : shipment model selection --- htdocs/expedition/class/expedition.class.php | 2 -- htdocs/expedition/fiche.php | 9 +++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index e5dbb540b85..fa25c48366d 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -164,8 +164,6 @@ class Expedition extends CommonObject $now=dol_now(); - if (empty($this->model_pdf)) $this->model_pdf=$conf->global->EXPEDITION_ADDON_PDF; - require_once DOL_DOCUMENT_ROOT .'/product/stock/class/mouvementstock.class.php'; $error = 0; diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 4743ad5f25b..6200f2c3c5f 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -113,6 +113,7 @@ if ($action == 'add') $object->socid = $objectsrc->socid; $object->ref_customer = $objectsrc->ref_client; + $object->model_pdf = GETPOST('model'); $object->date_delivery = $date_delivery; // Date delivery planed $object->fk_delivery_address = $objectsrc->fk_delivery_address; $object->shipping_method_id = GETPOST('shipping_method_id','int'); @@ -662,6 +663,14 @@ if ($action == 'create') print ''; print ''; print "\n"; + + // Document model + print "".$langs->trans("Model").""; + print ''; + include_once DOL_DOCUMENT_ROOT . '/core/modules/expedition/modules_expedition.php'; + $liste = ModelePdfExpedition::liste_modeles($db); + print $form->selectarray('model', $liste, $conf->global->EXPEDITION_ADDON_PDF); + print "\n"; // Other attributes $parameters=array('colspan' => ' colspan="3"'); From e0af2feced0795c627439a2a3e62d3d6885b1423 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 18 Apr 2015 18:06:02 +0200 Subject: [PATCH 09/12] Fix : on impayees remain to pay did not include deposits --- htdocs/compta/facture/impayees.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index 467d2b0636a..b0001e706a9 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -649,13 +649,12 @@ if ($resql) print ''.price($objp->total_ttc).''; print ''; $cn=$facturestatic->getSumCreditNotesUsed(); - if (! empty($objp->am)) print price($objp->am); - if (! empty($objp->am) && ! empty($cn)) print '+'; - if (! empty($cn)) print price($cn); + $dep=$facturestatic->getSumDepositsUsed(); + print price($objp->am + $cn + $dep); print ''; // Remain to receive - print ''.((! empty($objp->am) || ! empty($cn))?price($objp->total_ttc-$objp->am-$cn):' ').''; + print ''.price($objp->total_ttc-$objp->am-$cn-$dep).''; // Status of invoice print ''; @@ -685,7 +684,7 @@ if ($resql) $total_ht+=$objp->total_ht; $total_tva+=($objp->total_tva + $tx1 + $tx2 + $revenuestamp); $total_ttc+=$objp->total_ttc; - $total_paid+=$objp->am + $cn; + $total_paid+=$objp->am + $cn + $dep; $i++; } From 8b307aac56b3f19147c13b75b3e8f3b24356d209 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 18 Apr 2015 18:06:27 +0200 Subject: [PATCH 10/12] Fix : customer outstanding was not calculated properly --- htdocs/societe/class/societe.class.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 2cb3e634841..99d76411239 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3091,7 +3091,7 @@ class Societe extends CommonObject $alreadypayed=price2num($paiement + $creditnotes + $deposits,'MT'); $remaintopay=price2num($invoice->total_ttc - $paiement - $creditnotes - $deposits,'MT'); */ - $sql = "SELECT sum(total) as amount FROM ".MAIN_DB_PREFIX."facture as f"; + $sql = "SELECT rowid, total_ttc FROM ".MAIN_DB_PREFIX."facture as f"; $sql .= " WHERE fk_soc = ". $this->id; $sql .= " AND paye = 0"; $sql .= " AND fk_statut <> 0"; // Not a draft @@ -3102,8 +3102,17 @@ class Societe extends CommonObject $resql=$this->db->query($sql); if ($resql) { - $obj=$this->db->fetch_object($resql); - return ($obj->amount); + $outstandingBill = 0; + $facturestatic=new Facture($this->db); + while($obj=$this->db->fetch_object($resql)) { + $facturestatic->id=$obj->rowid; + $paiement = $facturestatic->getSommePaiement(); + $creditnotes = $facturestatic->getSumCreditNotesUsed(); + $deposits = $facturestatic->getSumDepositsUsed(); + + $outstandingBill+= $obj->total_ttc - $paiement - $creditnotes - $deposits; + } + return $outstandingBill; } else return 0; From 51522decf34daf43afbf0a6b03added6cd9b6e7b Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 18 Apr 2015 18:33:46 +0200 Subject: [PATCH 11/12] Fix : price in editkeyval function was forcing a price rounding --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index ee28ec6a495..ad6db774d3f 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -203,7 +203,7 @@ class Form else { if ($typeofdata == 'email') $ret.=dol_print_email($value,0,0,0,0,1); - elseif ($typeofdata == 'amount') $ret.=($value != '' ? price($value,'',$langs,0,0,-1,$conf->currency) : ''); + elseif ($typeofdata == 'amount') $ret.=($value != '' ? price($value,'',$langs,0,-1,-1,$conf->currency) : ''); elseif (preg_match('/^text/',$typeofdata) || preg_match('/^note/',$typeofdata)) $ret.=dol_htmlentitiesbr($value); elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') $ret.=dol_print_date($value,'day'); elseif ($typeofdata == 'datehourpicker') $ret.=dol_print_date($value,'dayhour'); From 7b035d3b5fe7a3ed5af70e7be718a0e4fdfb80d7 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 18 Apr 2015 20:11:19 +0200 Subject: [PATCH 12/12] Fix : menu financial was not displayed when only supplier module is activated --- htdocs/core/menus/standard/eldy.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 273ea7f6336..92489cd9d61 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -134,8 +134,8 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0) } // Financial - $tmpentry=array('enabled'=>(! empty($conf->comptabilite->enabled) || ! empty($conf->accounting->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->don->enabled) || ! empty($conf->tax->enabled) || ! empty($conf->salaries->enabled)), - 'perms'=>(! empty($user->rights->compta->resultat->lire) || ! empty($user->rights->accounting->plancompte->lire) || ! empty($user->rights->facture->lire) || ! empty($user->rights->don->lire) || ! empty($user->rights->tax->charges->lire) || ! empty($user->rights->salaries->read)), + $tmpentry=array('enabled'=>(! empty($conf->comptabilite->enabled) || ! empty($conf->accounting->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->don->enabled) || ! empty($conf->tax->enabled) || ! empty($conf->salaries->enabled) || ! empty($conf->fournisseur->enabled)), + 'perms'=>(! empty($user->rights->compta->resultat->lire) || ! empty($user->rights->accounting->plancompte->lire) || ! empty($user->rights->facture->lire) || ! empty($user->rights->don->lire) || ! empty($user->rights->tax->charges->lire) || ! empty($user->rights->salaries->read) || ! empty($user->rights->fournisseur->facture->lire)), 'module'=>'comptabilite|accounting|facture|don|tax|salaries'); $showmode=dol_eldy_showmenu($type_user, $tmpentry, $listofmodulesforexternal); if ($showmode)