From c2eb67f405e06035b1d8bbb4cf8d9e6564fc6919 Mon Sep 17 00:00:00 2001 From: Frank Cools Date: Thu, 2 Oct 2025 23:08:03 +0200 Subject: [PATCH] =?UTF-8?q?Move=20DeclarationTVA=20menu=20to=20Comptabilit?= =?UTF-8?q?=C3=A9=20(Accounting)=20menu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed: - Removed top menu entry for DeclarationTVA - Moved module link to Comptabilité (Accounting) left menu - Changed mainmenu from 'declarationtva' to 'accountancy' - Changed fk_menu to 'fk_mainmenu=accountancy' - Module now appears under Accounting menu where it belongs --- core/modules/modDeclarationTVA.class.php | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/core/modules/modDeclarationTVA.class.php b/core/modules/modDeclarationTVA.class.php index 1361d5a..7c62ecb 100644 --- a/core/modules/modDeclarationTVA.class.php +++ b/core/modules/modDeclarationTVA.class.php @@ -323,30 +323,17 @@ class modDeclarationTVA extends DolibarrModules $r = 0; // Add here entries to declare new menus /* BEGIN MODULEBUILDER TOPMENU */ - $this->menu[$r++] = array( - 'fk_menu' => '', // Will be stored into mainmenu + leftmenu. Use '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode - 'type' => 'top', // This is a Top menu entry - 'titre' => 'ModuleDeclarationTVAName', - 'prefix' => img_picto('', $this->picto, 'class="pictofixedwidth valignmiddle"'), - 'mainmenu' => 'declarationtva', - 'leftmenu' => '', - 'url' => '/declarationtva/declarationtvaindex.php', - 'langs' => 'declarationtva@declarationtva', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position' => 1000 + $r, - 'enabled' => 'isModEnabled("declarationtva")', // Define condition to show or hide menu entry. Use 'isModEnabled("declarationtva")' if entry must be visible if module is enabled. - 'perms' => '$user->hasRight("declarationtva", "declarationtva", "read")', // Use 'perms'=>'$user->hasRight("declarationtva", "declarationtva", "read")' if you want your menu with a permission rules - 'target' => '', - 'user' => 2, // 0=Menu for internal users, 1=external users, 2=both - ); + // Top menu removed - module will be under Comptabilité (Accounting) menu instead /* END MODULEBUILDER TOPMENU */ /* BEGIN MODULEBUILDER LEFTMENU DECLARATIONTVA */ + // Add DeclarationTVA under Comptabilité (Accounting) menu $this->menu[$r++]=array( - 'fk_menu' => 'fk_mainmenu=declarationtva', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode + 'fk_menu' => 'fk_mainmenu=accountancy', // Add under Comptabilité (accountancy) menu 'type' => 'left', // This is a Left menu entry 'titre' => 'DeclarationTVAMainInterface', 'prefix' => img_picto('', $this->picto, 'class="pictofixedwidth valignmiddle paddingright"'), - 'mainmenu' => 'declarationtva', + 'mainmenu' => 'accountancy', 'leftmenu' => 'declarationtva_main', 'url' => '/custom/declarationtva/declarationtvaindex.php', 'langs' => 'declarationtva@declarationtva', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.