FIX Various payment - List - Can't see payment with subledger account (#34101)

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Alexandre SPANGARO 2025-05-12 19:46:05 +02:00 committed by GitHub
parent 73d369d8e9
commit b116a7ab08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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') {