Merge pull request #22767 from aspangaro/17b14

FIX Accountancy - Delete operation - Problem on SELECT
This commit is contained in:
Laurent Destailleur 2022-11-07 18:42:44 +01:00 committed by GitHub
commit 16b2467ef5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -592,7 +592,7 @@ class Lettering extends BookKeeping
$sql .= " WHERE bpn.entity IN (" . getEntity('accountancy') . ")";
$sql .= " AND bpn.doc_type = 'bank'";
$sql .= " AND bpn.fk_doc IN (" . $this->db->sanitize(implode(',', $bank_ids)) . ")";
$sql .= " AND bpn ON bpn.piece_num = ab.piece_num";
$sql .= " AND bpn.piece_num = ab.piece_num";
$sql .= " ) OR ";
}
$sql .= " EXISTS (";