From 403dad1660f3fd17cb6fcb999cf4e6121d70b615 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com> Date: Fri, 17 Oct 2025 13:56:07 +0200 Subject: [PATCH] FIX: expense report card: do not show bank account if user cannot see them --- htdocs/expensereport/card.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 2776b1e6aa6..4697586a885 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1929,9 +1929,10 @@ if ($action == 'create') { print ''; // List of payments already done + $canSeeBankAccount = isModEnabled('banque') && $user->hasRight('banque', 'lire'); $nbcols = 3; $nbrows = 0; - if (isModEnabled("banque")) { + if ($canSeeBankAccount) { $nbrows++; $nbcols++; } @@ -1942,7 +1943,7 @@ if ($action == 'create') { print ''.$langs->trans('Payments').''; print ''.$langs->trans('Date').''; print ''.$langs->trans('Type').''; - if (isModEnabled("banque")) { + if ($canSeeBankAccount) { print ''.$langs->trans('BankAccount').''; } print ''.$langs->trans('Amount').''; @@ -1984,7 +1985,7 @@ if ($action == 'create') { $labeltype = $langs->trans("PaymentType".$objp->payment_code) != ("PaymentType".$objp->payment_code) ? $langs->trans("PaymentType".$objp->payment_code) : $objp->payment_type; print "".$labeltype.' '.$objp->num_payment."\n"; // Bank account - if (isModEnabled("banque")) { + if ($canSeeBankAccount) { $bankaccountstatic->id = $objp->baid; $bankaccountstatic->ref = $objp->baref; $bankaccountstatic->label = $objp->baref;