From 1a43ba3810d4fe7bc754f86d8bda6f377bb9afcd Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Fri, 14 Nov 2025 16:55:12 +0100 Subject: [PATCH] Bank transfer: Auto-ignore all 0-valued transactions (fixes #5168) --- src/pretix/plugins/banktransfer/tasks.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pretix/plugins/banktransfer/tasks.py b/src/pretix/plugins/banktransfer/tasks.py index f4fbc7d4ed..27aca3123f 100644 --- a/src/pretix/plugins/banktransfer/tasks.py +++ b/src/pretix/plugins/banktransfer/tasks.py @@ -395,6 +395,11 @@ def process_banktransfers(self, job: int, data: list) -> None: ) for trans in transactions: + if trans.amount == Decimal("0.00"): + # Ignore all zero-valued transactions + trans.state = BankTransaction.STATE_DISCARDED + trans.save() + continue # Whitespace in references is unreliable since linebreaks and spaces can occur almost anywhere, e.g. # DEMOCON-123\n45 should be matched to DEMOCON-12345. However, sometimes whitespace is important, # e.g. when there are two references. "DEMOCON-12345 DEMOCON-45678" would otherwise be parsed as