From d7cb64c7e6f6222cf5b453955794c79fc5953ac3 Mon Sep 17 00:00:00 2001 From: Tecneo <42748615+t3cneo@users.noreply.github.com> Date: Sat, 20 Jul 2024 11:27:25 +0200 Subject: [PATCH] Fix #20527 --- htdocs/accountancy/journal/bankjournal.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index ba963e78d6efa..33076f76493c3 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -358,7 +358,8 @@ // Now loop on each link of record in bank (code similar to bankentries_list.php) foreach ($links as $key => $val) { - if ($links[$key]['type'] == 'user' && !$is_sc && !$is_salary && !$is_expensereport) { + // Skip user link when processing social charge to avoid unbalanced entry + if ($links[$key]['type'] == 'user' && $is_sc) { // We must avoid as much as possible this "continue". If we want to jump to next loop, it means we don't want to process // the case the link is user (often because managed by hard coded code into another link), and we must avoid this. continue;