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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user