From ecbb62d286dbf1ec553973c62eb3812deb4f9773 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Tue, 24 Mar 2026 00:02:07 +0100 Subject: [PATCH] FIX Accountancy - Need more information about mandatory step in various journal (#37573) * FIX Accountancy - Need more information about mandatory step in various journal * Fix menu * Revert "Fix menu" This reverts commit 1bb314f225020ea92cb0b13d8d258398716f8bdb. --- htdocs/accountancy/journal/variousjournal.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/htdocs/accountancy/journal/variousjournal.php b/htdocs/accountancy/journal/variousjournal.php index 94d8c471695..3644d4ccd6b 100644 --- a/htdocs/accountancy/journal/variousjournal.php +++ b/htdocs/accountancy/journal/variousjournal.php @@ -1,7 +1,7 @@ - * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2021-2026 Alexandre Spangaro + * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024 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 @@ -189,7 +189,17 @@ if ($reload) { $form = new Form($db); -if ($object->nature == 2) { +if ($object->nature == 1) { + $some_mandatory_steps_of_setup_were_not_done = getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER') == "" || getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER') == '-1' + || getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER') == "" || getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER') == '-1' + || !getDolGlobalString('SALARIES_ACCOUNTING_ACCOUNT_PAYMENT') || getDolGlobalString('SALARIES_ACCOUNTING_ACCOUNT_PAYMENT') == '-1' + || !getDolGlobalString('ACCOUNTING_ACCOUNT_DISCOUNT_GRANTED') || getDolGlobalString('ACCOUNTING_ACCOUNT_DISCOUNT_GRANTED') == '-1' + || !getDolGlobalString('ACCOUNTING_ACCOUNT_DISCOUNT_RECEIVED') || getDolGlobalString('ACCOUNTING_ACCOUNT_DISCOUNT_RECEIVED') == '-1'; + $account_accounting_not_defined = getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER') == "" || getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER') == '-1' + || getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER') == "" || getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER') == '-1' + || !getDolGlobalString('ACCOUNTING_ACCOUNT_DISCOUNT_GRANTED') || getDolGlobalString('ACCOUNTING_ACCOUNT_DISCOUNT_GRANTED') == '-1' + || !getDolGlobalString('ACCOUNTING_ACCOUNT_DISCOUNT_RECEIVED') || getDolGlobalString('ACCOUNTING_ACCOUNT_DISCOUNT_RECEIVED') == '-1'; +} elseif ($object->nature == 2) { $some_mandatory_steps_of_setup_were_not_done = getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER') == "" || getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER') == '-1'; $account_accounting_not_defined = getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER') == "" || getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER') == '-1'; } elseif ($object->nature == 3) {