From b116a7ab08b1a6aa268c16ffa4632c729e072f66 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 12 May 2025 19:46:05 +0200 Subject: [PATCH] FIX Various payment - List - Can't see payment with subledger account (#34101) Co-authored-by: Laurent Destailleur --- htdocs/compta/bank/various_payment/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index 96e5af1cef5..47f5486fe7e 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -312,7 +312,7 @@ if ($search_bank_entry > 0) { if ($search_accountancy_account > 0) { $sql .= " AND v.accountancy_code = ".((int) $search_accountancy_account); } -if (getDolGlobalString('ACCOUNTANCY_COMBO_FOR_AUX')) { +if (getDolGlobalString('ACCOUNTANCY_COMBO_FOR_AUX') && ($search_accountancy_subledger > 0)) { $sql .= " AND v.subledger_account = '".$db->escape($search_accountancy_subledger)."'"; } else { if ($search_accountancy_subledger != '' && $search_accountancy_subledger != '-1') {