Skip to content

Open-source personal finance manager. Self-hosted, privacy-first.

feat(transactions): link to the other side of a transfer (#1005)

Tássio Noronhab591c71f07f6
diff --git a/frontend/src/components/transaction-dialog.tsx b/frontend/src/components/transaction-dialog.tsx
index 60f8b1ee..7078f49b 100644
--- a/frontend/src/components/transaction-dialog.tsx
+++ b/frontend/src/components/transaction-dialog.tsx
@@ -1,6 +1,7 @@
import { useState, useEffect, useCallback, useMemo, useRef } from 'react'
import { getAccountLabel, getAccountName, sortAccountsByDisplayName } from '@/lib/account-utils'
import { useTranslation } from 'react-i18next'
+import { Link } from 'react-router-dom'
import { useDateLocale, useDisplayLocale } from '@/hooks/use-display-locale'
import { formatAmountInput, formatCurrency, parseAmountInput } from '@/lib/format'
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
@@ -870,7 +871,20 @@ function TransactionForm({
return (
<p className="text-xs text-blue-600 dark:text-blue-300 truncate">
<span className="font-medium">{t('transactions.transferLinkedTo')}</span>{' '}
- {pairAccount ? getAccountName(pairAccount) : '—'}
+ {pairAccount ? (
+ <Link
+ to={`/accounts/${pairAccount.id}`}
+ onClick={(e) => {
+ // A modified click opens a new tab; keep the dialog and its edits.
+ if (e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return
+ onCancel()
+ }}
+ title={t('transactions.transferOpenAccount', { account: getAccountName(pairAccount) })}
+ className="underline underline-offset-2 hover:text-blue-800 dark:hover:text-blue-100"
+ >
+ {getAccountName(pairAccount)}
+ </Link>
+ ) : '—'}
{' · '}
{new Date(transferPair.date + 'T00:00:00').toLocaleDateString(dateLocale)}
{' · '}
diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json
index c901e201..5875c6ab 100644
--- a/frontend/src/locales/de.json
+++ b/frontend/src/locales/de.json
@@ -888,6 +888,7 @@
"transferNotes": "Notizen",
"transferInfo": "Dies ist eine Umbuchung — Änderungen an Beschreibung, Datum und Notizen wirken sich auf beide Seiten aus",
"transferLinkedTo": "Verknüpft mit:",
+ "transferOpenAccount": "Konto {{account}} öffnen",
"transferTooltip": "Umbuchungen sind von den Berichts- und Dashboard-Summen ausgeschlossen",
"installmentTooltip": "Ratenzahlung — {{count}} Belastungen von insgesamt {{total}}",
"billOverrideTooltip": "Verschoben auf die Abrechnung fällig am {{date}}",
diff --git a/frontend/src/locales/el.json b/frontend/src/locales/el.json
index ba785d04..458c22c1 100644
--- a/frontend/src/locales/el.json
+++ b/frontend/src/locales/el.json
@@ -1071,6 +1071,7 @@
"transferNotes": "Σημειώσεις",
"transferInfo": "Αυτή είναι μεταφορά — οι αλλαγές σε περιγραφή, ημερομηνία και σημειώσεις θα εφαρμοστούν και στις δύο πλευρές",
"transferLinkedTo": "Συνδεδεμένο με:",
+ "transferOpenAccount": "Άνοιγμα του λογαριασμού {{account}}",
"transferTooltip": "Οι μεταφορές εξαιρούνται από τα σύνολα αναφορών και πίνακα ελέγχου",
"installmentTooltip": "Πλάνο δόσεων — {{count}} χρεώσεις συνολικού ποσού {{total}}",
"billOverrideTooltip": "Μεταφέρθηκε στον λογαριασμό που λήγει στις {{date}}",
diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json
index dadb7112..3aff81cf 100644
--- a/frontend/src/locales/en.json
+++ b/frontend/src/locales/en.json
@@ -888,6 +888,7 @@
"transferNotes": "Notes",
"transferInfo": "This is a transfer — changes to description, date, and notes will apply to both sides",
"transferLinkedTo": "Linked to:",
+ "transferOpenAccount": "Open {{account}}",
"transferTooltip": "Transfers are excluded from report and dashboard totals",
"installmentTooltip": "Installment plan — {{count}} charges totaling {{total}}",
"billOverrideTooltip": "Moved to the bill due {{date}}",
diff --git a/frontend/src/locales/es.json b/frontend/src/locales/es.json
index a8095867..f99dac18 100644
--- a/frontend/src/locales/es.json
+++ b/frontend/src/locales/es.json
@@ -885,6 +885,7 @@
"transferNotes": "Notas",
"transferInfo": "Esto es una transferencia — los cambios en descripción, fecha y notas se aplicarán a ambos lados",
"transferLinkedTo": "Vinculada a:",
+ "transferOpenAccount": "Abrir la cuenta {{account}}",
"transferTooltip": "Las transferencias están excluidas de los informes y totales del panel",
"installmentTooltip": "Plan de cuotas — {{count}} cargos por un total de {{total}}",
"billOverrideTooltip": "Movido a la factura con vencimiento {{date}}",
diff --git a/frontend/src/locales/fr.json b/frontend/src/locales/fr.json
index fb6e53d6..807c6cb3 100644
--- a/frontend/src/locales/fr.json
+++ b/frontend/src/locales/fr.json
@@ -888,6 +888,7 @@
"transferNotes": "Notes",
"transferInfo": "Il s'agit d'un virement — les modifications de la description, de la date et des notes s'appliqueront aux deux côtés",
"transferLinkedTo": "Liée à :",
+ "transferOpenAccount": "Ouvrir le compte {{account}}",
"transferTooltip": "Les virements sont exclus des totaux des rapports et du tableau de bord",
"installmentTooltip": "Paiement échelonné — {{count}} prélèvements pour un total de {{total}}",
"billOverrideTooltip": "Déplacée vers la facture due le {{date}}",
diff --git a/frontend/src/locales/hi.json b/frontend/src/locales/hi.json
index 452aa4e3..9353b499 100644
--- a/frontend/src/locales/hi.json
+++ b/frontend/src/locales/hi.json
@@ -888,6 +888,7 @@
"transferNotes": "नोट्स",
"transferInfo": "यह एक ट्रांसफ़र है — विवरण, तिथि और नोट्स में बदलाव दोनों तरफ़ लागू होंगे",
"transferLinkedTo": "इससे जुड़ा:",
+ "transferOpenAccount": "{{account}} खाता खोलें",
"transferTooltip": "ट्रांसफ़र रिपोर्ट और डैशबोर्ड के कुल से बाहर रखे जाते हैं",
"installmentTooltip": "किश्त योजना — {{count}} शुल्क, कुल {{total}}",
"billOverrideTooltip": "{{date}} को देय बिल में ले जाया गया",
diff --git a/frontend/src/locales/it.json b/frontend/src/locales/it.json
index 9bc93c19..6f53fffd 100644
--- a/frontend/src/locales/it.json
+++ b/frontend/src/locales/it.json
@@ -885,6 +885,7 @@
"transferNotes": "Note",
"transferInfo": "Questo è un trasferimento — le modifiche a descrizione, data e note si applicheranno a entrambi i lati",
"transferLinkedTo": "Collegata a:",
+ "transferOpenAccount": "Apri il conto {{account}}",
"transferTooltip": "I trasferimenti sono esclusi dai totali dei report e della dashboard",
"installmentTooltip": "Piano rateale — {{count}} addebiti per un totale di {{total}}",
"billOverrideTooltip": "Spostato all'estratto conto in scadenza il {{date}}",
diff --git a/frontend/src/locales/ja.json b/frontend/src/locales/ja.json
index 0e1ddf86..2b241e47 100644
--- a/frontend/src/locales/ja.json
+++ b/frontend/src/locales/ja.json
@@ -888,6 +888,7 @@
"transferNotes": "メモ",
"transferInfo": "これは振替です — 摘要・日付・メモの変更は両方の取引に適用されます",
"transferLinkedTo": "紐付け先:",
+ "transferOpenAccount": "{{account}} 口座を開く",
"transferTooltip": "振替はレポートやダッシュボードの合計から除外されます",
"installmentTooltip": "分割払いプラン — {{count}}回の請求、合計{{total}}",
"billOverrideTooltip": "支払期日{{date}}の請求に移動しました",
diff --git a/frontend/src/locales/nl.json b/frontend/src/locales/nl.json
index 2ffb2248..a38beff1 100644
--- a/frontend/src/locales/nl.json
+++ b/frontend/src/locales/nl.json
@@ -888,6 +888,7 @@
"transferNotes": "Opmerkingen",
"transferInfo": "Dit is een overdracht. Wijzigingen in de beschrijving, datum en opmerkingen zijn van toepassing op beide partijen",
"transferLinkedTo": "Gekoppeld aan:",
+ "transferOpenAccount": "Rekening {{account}} openen",
"transferTooltip": "Overboekingen zijn uitgesloten van de rapport- en dashboardtotalen",
"installmentTooltip": "Afbetalingsplan — {{count}} brengt in totaal {{total}} in rekening",
"billOverrideTooltip": "Verplaatst naar de rekening met verschuldigde waarde {{date}}",
diff --git a/frontend/src/locales/pl.json b/frontend/src/locales/pl.json
index 0836e828..7c7e2a28 100644
--- a/frontend/src/locales/pl.json
+++ b/frontend/src/locales/pl.json
@@ -916,6 +916,7 @@
"transferNotes": "Notatki",
"transferInfo": "To transfer — zmiany opisu, daty i notatek obejmą obie strony",
"transferLinkedTo": "Powiązana z:",
+ "transferOpenAccount": "Otwórz konto {{account}}",
"transferTooltip": "Transfery są wyłączone z sum w raportach i na pulpicie",
"installmentTooltip_one": "Plan ratalny — {{count}} obciążenie na łączną kwotę {{total}}",
"installmentTooltip_few": "Plan ratalny — {{count}} obciążenia na łączną kwotę {{total}}",
diff --git a/frontend/src/locales/pt-BR.json b/frontend/src/locales/pt-BR.json
index 40dd3f48..01de6f3f 100644
--- a/frontend/src/locales/pt-BR.json
+++ b/frontend/src/locales/pt-BR.json
@@ -885,6 +885,7 @@
"transferNotes": "Notas",
"transferInfo": "Esta é uma transferência — alterações na descrição, data e notas serão aplicadas em ambos os lados",
"transferLinkedTo": "Vinculada a:",
+ "transferOpenAccount": "Abrir a conta {{account}}",
"transferTooltip": "Transferências são excluídas dos totais de relatórios e dashboard",
"installmentTooltip": "Compra parcelada — {{count}} parcelas totalizando {{total}}",
"billOverrideTooltip": "Movida para a fatura com vencimento em {{date}}",
diff --git a/frontend/src/locales/pt-PT.json b/frontend/src/locales/pt-PT.json
index 69a3d870..c35bfa7d 100644
--- a/frontend/src/locales/pt-PT.json
+++ b/frontend/src/locales/pt-PT.json
@@ -885,6 +885,7 @@
"transferNotes": "Notas",
"transferInfo": "Esta é uma transferência — alterações na descrição, data e notas serão aplicadas em ambos os lados",
"transferLinkedTo": "Associada a:",
+ "transferOpenAccount": "Abrir a conta {{account}}",
"transferTooltip": "Transferências são excluídas dos totais de relatórios e do painel",
"installmentTooltip": "Compra a prestações — {{count}} prestações totalizando {{total}}",
"billOverrideTooltip": "Movida para a fatura com vencimento em {{date}}",
diff --git a/frontend/src/locales/ru.json b/frontend/src/locales/ru.json
index 9709f1c7..ccfc6db8 100644
--- a/frontend/src/locales/ru.json
+++ b/frontend/src/locales/ru.json
@@ -898,6 +898,7 @@
"transferNotes": "Примечания",
"transferInfo": "Это перевод — изменения в описании, дате и примечаниях будут применены к обеим сторонам",
"transferLinkedTo": "Связана с:",
+ "transferOpenAccount": "Открыть счёт {{account}}",
"transferTooltip": "Переводы исключаются из отчётов и итогов панели",
"installmentTooltip": "План рассрочки — {{count}} платежей на сумму {{total}}",
"billOverrideTooltip": "Перенесено на оплату {{date}}",
diff --git a/frontend/src/locales/sk.json b/frontend/src/locales/sk.json
index 7315155f..48a33306 100644
--- a/frontend/src/locales/sk.json
+++ b/frontend/src/locales/sk.json
@@ -928,6 +928,7 @@
"transferNotes": "Poznámka",
"transferInfo": "Toto je prevod — zmeny popisu, dátumu a poznámky sa prejavia na oboch stranách",
"transferLinkedTo": "Prepojené s:",
+ "transferOpenAccount": "Otvoriť účet {{account}}",
"transferTooltip": "Prevody sú vylúčené zo súčtov v reportoch a v prehľade",
"installmentTooltip": "Splátkový plán — {{count}} splátok v celkovej výške {{total}}",
"installmentTooltip_one": "Splátkový plán — {{count}} splátka v celkovej výške {{total}}",
diff --git a/frontend/src/locales/uk.json b/frontend/src/locales/uk.json
index 8f625caf..e23b89f2 100644
--- a/frontend/src/locales/uk.json
+++ b/frontend/src/locales/uk.json
@@ -898,6 +898,7 @@
"transferNotes": "Примітки",
"transferInfo": "Це переказ — зміни в описі, даті та примітках буде застосовано до обох сторін",
"transferLinkedTo": "Пов'язана з:",
+ "transferOpenAccount": "Відкрити рахунок {{account}}",
"transferTooltip": "Перекази виключаються зі звітів та підсумків панелі",
"installmentTooltip": "План розстрочки — {{count}} платежів на суму {{total}}",
"billOverrideTooltip": "Перенесено на оплату {{date}}",