feat: Transfer-Schlagwort mit festem Zielkonto (z. B. REVOLUT -> Konto Revolut)

- Transfer-Regel kann direkt ein Zielkonto tragen (target_account_id); ohne ->
  weiterhin Auto-Erkennung aus dem Buchungstext (Konto-Texte)
- Migration 0010; Endpunkt aktualisiert bestehendes Wort statt Konflikt
- Import bevorzugt das feste Zielkonto, sonst _guess_target_account
- Konten-Seite: Transfer-Erkennung mit Zielkonto-Auswahl + Anzeige am Chip
- Test: festes Zielkonto greift ohne Konto-Texte (75 grün)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Guido
2026-08-20 19:06:24 +02:00
co-authored by Claude Opus 4.8
parent 794a6aeb91
commit c44892ff72
9 changed files with 96 additions and 12 deletions
+5 -1
View File
@@ -300,7 +300,11 @@ def detect_rows(db: Session, user: User, account: Account, candidates: list[dict
matched_rule_id = rule.id
if rule.is_transfer:
ttype = "transfer"
to_account_id = _guess_target_account(text_idents, payee or "", purpose or "", account.id)
# Festes Zielkonto der Regel bevorzugen, sonst aus dem Text raten.
if rule.target_account_id and rule.target_account_id != account.id:
to_account_id = rule.target_account_id
else:
to_account_id = _guess_target_account(text_idents, payee or "", purpose or "", account.id)
else:
category_id = rule.category_id