Merge pull request #20934 from atm-maxime/fix_er_right_to_pay

Fix wrong right test to show button
This commit is contained in:
Laurent Destailleur 2022-05-21 00:23:51 +02:00 committed by GitHub
commit e2c411b224
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2648,7 +2648,7 @@ if ($action != 'create' && $action != 'edit')
}
// If bank module is not used
if (($user->rights->expensereport->to_paid || empty($conf->banque->enabled)) && $object->status == ExpenseReport::STATUS_APPROVED)
if (($user->rights->expensereport->to_paid && empty($conf->banque->enabled)) && $object->status == ExpenseReport::STATUS_APPROVED)
{
//if ((round($remaintopay) == 0 || empty($conf->banque->enabled)) && $object->paid == 0)
if ($object->paid == 0)