Open-source personal finance manager. Self-hosted, privacy-first.
add hint to set up credit card close/due days when unconfigured
Tássio Noronha7eb78bc8c19f
diff --git a/backend/app/services/connection_service.py b/backend/app/services/connection_service.pyindex 5c2d0f29..9bb1cfc9 100644--- a/backend/app/services/connection_service.py+++ b/backend/app/services/connection_service.py@@ -375,12 +375,15 @@ async def sync_connection(account.balance = acc_data.balanceaccount.name = acc_data.nameif acc_data.type == "credit_card":- account.credit_limit = acc_data.credit_limit- # Preserve existing close/due days when the provider doesn't expose- # them. Pluggy's balanceCloseDate is intermittently null even on- # connectors that have it elsewhere, and users may have set these- # manually via the edit dialog. Treat user input + previously-synced- # values as the higher source of truth than a fresh None.+ # Preserve existing CC metadata when the provider doesn't+ # expose it. Pluggy's creditData fields (limit, close/due+ # dates, minimum payment, brand/level) are intermittently+ # null even on connectors that have them elsewhere, and+ # users may have filled them in manually via the edit+ # dialog. Treat user input + previously-synced values as+ # the higher source of truth than a fresh None.+ if acc_data.credit_limit is not None:+ account.credit_limit = acc_data.credit_limitif acc_data.statement_close_day is not None:account.statement_close_day = acc_data.statement_close_dayif acc_data.payment_due_day is not None:diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.jsonindex 2e3e36b8..f361ffaa 100644--- a/frontend/src/locales/en.json+++ b/frontend/src/locales/en.json@@ -313,6 +313,9 @@"dueIn": "Due in {{count}} days","dueToday": "Due today","overdue": "Overdue",+ "cycleMissing": "Set up cycle",+ "cycleMissingHint": "Fill in the statement close and due days to unlock cycle filtering, due-date alerts, and the bill view.",+ "ccSettingsHint": "These fields are optional, but filling them in unlocks cycle filtering, due-date alerts, and bucketing purchases into the correct bill.","created": "Account created","updated": "Account updated","deleted": "Account deleted",diff --git a/frontend/src/locales/pt-BR.json b/frontend/src/locales/pt-BR.jsonindex 28b76b50..42d29d3f 100644--- a/frontend/src/locales/pt-BR.json+++ b/frontend/src/locales/pt-BR.json@@ -313,6 +313,9 @@"dueIn": "Vence em {{count}} dias","dueToday": "Vence hoje","overdue": "Atrasado",+ "cycleMissing": "Configurar ciclo",+ "cycleMissingHint": "Preencha o dia de fechamento e vencimento para ativar filtros por fatura, alertas de vencimento e a visão por ciclo.",+ "ccSettingsHint": "Esses campos são opcionais, mas preenchê-los ativa filtros por ciclo, o alerta de vencimento e o bucketing de compras na fatura correta.","created": "Conta criada","updated": "Conta atualizada","deleted": "Conta excluída",diff --git a/frontend/src/pages/account-detail.tsx b/frontend/src/pages/account-detail.tsxindex 7334a71b..2ca57786 100644--- a/frontend/src/pages/account-detail.tsx+++ b/frontend/src/pages/account-detail.tsx@@ -569,6 +569,20 @@ export default function AccountDetailPage() {</>)})()}+ {isCreditCard && (!account.statement_close_day || !account.payment_due_day) && (+ <>+ <span className="text-muted-foreground text-xs">·</span>+ <button+ type="button"+ onClick={() => setCcSettingsOpen(true)}+ title={t('accounts.cycleMissingHint')}+ className="inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-bold bg-amber-100 dark:bg-amber-500/20 text-amber-700 dark:text-amber-400 hover:bg-amber-200 dark:hover:bg-amber-500/30 transition-colors cursor-pointer"+ >+ <HelpCircle className="h-3 w-3" />+ {t('accounts.cycleMissing')}+ </button>+ </>+ )}</div></div>{!account.is_closed && (@@ -1242,6 +1256,11 @@ function CreditCardSettingsDialog({}}className="space-y-4">+ {(!account.statement_close_day || !account.payment_due_day) && (+ <p className="text-xs text-muted-foreground leading-relaxed">+ {t('accounts.ccSettingsHint')}+ </p>+ )}<div className="space-y-2"><Label>{t('accounts.creditLimit')}</Label><Input