From e957e0a945be76d6bcdb7d5657822b068d20864b Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sat, 25 Feb 2023 07:16:19 +0100 Subject: [PATCH 1/3] v17 Merge problem - Restore #22762 - Accountancy - Better warning for situation invoice in index --- htdocs/accountancy/index.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index 628dceafd12..8cda6a5c6e5 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -83,12 +83,7 @@ $help_url = 'EN:Module_Double_Entry_Accounting#Setup'; llxHeader('', $langs->trans("AccountancyArea"), $help_url); -if (!empty($conf->global->INVOICE_USE_SITUATION) && $conf->global->INVOICE_USE_SITUATION == 1) { - print load_fiche_titre($langs->trans("AccountancyArea"), '', 'accountancy'); - - print ''.$langs->trans("SorryThisModuleIsNotCompatibleWithTheExperimentalFeatureOfSituationInvoices")."\n"; - print "
"; -} elseif (isModEnabled('accounting')) { +if (isModEnabled('accounting')) { $step = 0; $resultboxes = FormOther::getBoxesArea($user, "27"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb) @@ -120,6 +115,11 @@ if (!empty($conf->global->INVOICE_USE_SITUATION) && $conf->global->INVOICE_USE_S print "
"; } + if (!empty($conf->global->INVOICE_USE_SITUATION) && $conf->global->INVOICE_USE_SITUATION == 1) { + print info_admin($langs->trans("SorryThisModuleIsNotCompatibleWithTheExperimentalFeatureOfSituationInvoices")); + print "
"; + } + print '
'; // hideobject is to start hidden print "
\n"; print ''.$langs->trans("AccountancyAreaDescIntro")."
\n"; From 15987bc46f660377fded7c86bb51353b7463aaac Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sat, 25 Feb 2023 07:22:20 +0100 Subject: [PATCH 2/3] v17 Merge problem - Restore #22762 - Accountancy - Better warning for situation invoice in index --- htdocs/accountancy/index.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index 8cda6a5c6e5..f5feef4a0f2 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -115,11 +115,6 @@ if (isModEnabled('accounting')) { print "
"; } - if (!empty($conf->global->INVOICE_USE_SITUATION) && $conf->global->INVOICE_USE_SITUATION == 1) { - print info_admin($langs->trans("SorryThisModuleIsNotCompatibleWithTheExperimentalFeatureOfSituationInvoices")); - print "
"; - } - print '
'; // hideobject is to start hidden print "
\n"; print ''.$langs->trans("AccountancyAreaDescIntro")."
\n"; From 8c0a79b1a304b62be92bd3e089158562a11ba001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 2 Mar 2023 18:16:20 +0100 Subject: [PATCH 3/3] fix bad right --- htdocs/categories/viewcat.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index f494dddb082..b1ba563da95 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -176,7 +176,7 @@ if ($elemid && $action == 'addintocategory' && ($type == Categorie::TYPE_SUPPLIER && $user->rights->societe->creer) || ($type == Categorie::TYPE_TICKET && $user->rights->ticket->write) || ($type == Categorie::TYPE_PROJECT && $user->rights->projet->creer) || - ($type == Categorie::TYPE_MEMBER && $user->rights->projet->creer) || + ($type == Categorie::TYPE_MEMBER && $user->hasRight('adherent', 'creer')) || ($type == Categorie::TYPE_CONTACT && $user->rights->societe->creer) || ($type == Categorie::TYPE_USER && $user->rights->user->user->creer) || ($type == Categorie::TYPE_ACCOUNT && $user->rights->banque->configurer)