Skip to content

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

feat: add biweekly and semiannual recurrence (#685)

seraphblade201032cf993e35bb
diff --git a/backend/app/models/recurring_transaction.py b/backend/app/models/recurring_transaction.py
index 30607a83..b5bb61b3 100644
--- a/backend/app/models/recurring_transaction.py
+++ b/backend/app/models/recurring_transaction.py
@@ -38,7 +38,7 @@ class RecurringTransaction(Base):
amount: Mapped[Decimal] = mapped_column(Numeric(precision=15, scale=2))
currency: Mapped[str] = mapped_column(String(3), default="USD")
type: Mapped[str] = mapped_column(String(10)) # debit, credit
- frequency: Mapped[str] = mapped_column(String(20)) # weekly, monthly, quarterly, yearly
+ frequency: Mapped[str] = mapped_column(String(20)) # weekly, biweekly, monthly, quarterly, semiannual, yearly
weekend_adjustment: Mapped[str] = mapped_column(
String(20), default="none", server_default="none"
)
diff --git a/backend/app/schemas/recurring_transaction.py b/backend/app/schemas/recurring_transaction.py
index b37f0eb0..686c1d61 100644
--- a/backend/app/schemas/recurring_transaction.py
+++ b/backend/app/schemas/recurring_transaction.py
@@ -13,7 +13,7 @@ class RecurringTransactionCreate(BaseModel):
amount: Decimal
currency: str = "USD"
type: str # debit, credit
- frequency: str # weekly, monthly, quarterly, yearly
+ frequency: str # weekly, biweekly, monthly, quarterly, semiannual, yearly
weekend_adjustment: WeekendAdjustment = "none"
day_of_month: Optional[int] = None
start_date: _Date
@@ -29,7 +29,7 @@ class RecurringTransactionUpdate(BaseModel):
amount: Optional[Decimal] = None
currency: Optional[str] = None
type: Optional[str] = None
- frequency: Optional[str] = None # weekly, monthly, quarterly, yearly
+ frequency: Optional[str] = None # weekly, biweekly, monthly, quarterly, semiannual, yearly
weekend_adjustment: Optional[WeekendAdjustment] = None
day_of_month: Optional[int] = None
start_date: Optional[_Date] = None
diff --git a/backend/app/schemas/transaction.py b/backend/app/schemas/transaction.py
index fa4745e4..21645e84 100644
--- a/backend/app/schemas/transaction.py
+++ b/backend/app/schemas/transaction.py
@@ -130,7 +130,7 @@ class InstallmentSeriesCreate(BaseModel):
# Period between installments. Defaults to monthly. Matches the
# recurring-transaction frequencies so "repeat as installments" offers
# the same cadence choices as a recurring bill.
- frequency: Literal["monthly", "quarterly", "weekly", "yearly"] = "monthly"
+ frequency: Literal["monthly", "quarterly", "semiannual", "weekly", "biweekly", "yearly"] = "monthly"
@model_validator(mode="after")
def validate_amounts(self):
diff --git a/backend/app/services/recurring_transaction_service.py b/backend/app/services/recurring_transaction_service.py
index 2a509dc2..77bef087 100644
--- a/backend/app/services/recurring_transaction_service.py
+++ b/backend/app/services/recurring_transaction_service.py
@@ -155,19 +155,23 @@ def _advance_date(
) -> date:
"""Advance a date by the given frequency.
- For monthly, quarterly, and yearly recurrences, ``intended_day`` is the day
+ For monthly, quarterly, semiannual, and yearly recurrences, ``intended_day`` is the day
the user actually wants (e.g. 31). We cap it to the target month's length
so short months clamp, but subsequent occurrences recover to the intended
day when it exists again. Falls back to ``current.day`` when not provided.
"""
if frequency == "weekly":
return current + timedelta(weeks=1)
+ if frequency == "biweekly":
+ return current + timedelta(weeks=2)
target_day = intended_day if intended_day else current.day
if frequency == "monthly":
return _advance_months(current, 1, target_day)
if frequency == "quarterly":
return _advance_months(current, 3, target_day)
+ if frequency == "semiannual":
+ return _advance_months(current, 6, target_day)
if frequency == "yearly":
year = current.year + 1
day = min(target_day, calendar.monthrange(year, current.month)[1])
diff --git a/backend/app/services/transaction_service.py b/backend/app/services/transaction_service.py
index dd8b8077..baaca4fc 100644
--- a/backend/app/services/transaction_service.py
+++ b/backend/app/services/transaction_service.py
@@ -766,7 +766,7 @@ async def create_installment_series(
Repeats ``data.base`` ``data.installments`` times: every parcel stores
the base amount, date advanced by the given frequency (monthly/quarterly/
- weekly/yearly, matching recurring transactions), and the shared
+ semiannual/weekly/biweekly/yearly, matching recurring transactions), and the shared
installment fingerprint (account, installment_purchase_date,
total_installments, installment_total_amount = amount * installments)
plus its 1-based installment_number, so the existing sync dedup matches
diff --git a/backend/mcp_server/tools/proposals.py b/backend/mcp_server/tools/proposals.py
index ddb0bf3b..f0b548fa 100644
--- a/backend/mcp_server/tools/proposals.py
+++ b/backend/mcp_server/tools/proposals.py
@@ -612,8 +612,8 @@ async def propose_create_transaction(
+ (
"Build a preview for adding a recurring transaction / subscription "
"(e.g. 'Netflix R$55 every month on the 10th'). Frequency is one "
- "of weekly/monthly/quarterly/yearly. For monthly or quarterly use "
- "day_of_month (1-31)."
+ "of weekly/biweekly/monthly/quarterly/semiannual/yearly. For monthly, "
+ "quarterly, or semiannual use day_of_month (1-31)."
),
parameters={
"type": "object",
@@ -621,13 +621,13 @@ async def propose_create_transaction(
"description": {"type": "string", "minLength": 1, "maxLength": 500},
"amount": {"type": "number", "exclusiveMinimum": 0},
"type": {"type": "string", "enum": ["debit", "credit"]},
- "frequency": {"type": "string", "enum": ["weekly", "monthly", "quarterly", "yearly"]},
+ "frequency": {"type": "string", "enum": ["weekly", "biweekly", "monthly", "quarterly", "semiannual", "yearly"]},
"weekend_adjustment": {
"type": "string",
"enum": ["none", "previous_friday", "next_monday"],
"default": "none",
},
- "day_of_month": {"type": "integer", "minimum": 1, "maximum": 31, "description": "Required for monthly or quarterly"},
+ "day_of_month": {"type": "integer", "minimum": 1, "maximum": 31, "description": "Required for monthly, quarterly, or semiannual"},
"start_date": {"type": "string", "format": "date", "description": "Defaults to today"},
"end_date": {"type": "string", "format": "date"},
"account_id": {"type": "string", "format": "uuid"},
@@ -658,8 +658,8 @@ async def propose_create_recurring_transaction(
currency: str | None = None,
apply: bool = False,
) -> dict[str, Any]:
- if frequency in ("monthly", "quarterly") and not day_of_month:
- return {"error": "day_of_month is required for monthly or quarterly frequency"}
+ if frequency in ("monthly", "quarterly", "semiannual") and not day_of_month:
+ return {"error": "day_of_month is required for monthly, quarterly, or semiannual frequency"}
ws_id = await resolve_workspace_id(session, ctx)
acc = (
await session.execute(
@@ -745,7 +745,7 @@ async def propose_create_recurring_transaction(
"recurring_id": {"type": "string", "format": "uuid"},
"description": {"type": "string", "minLength": 1, "maxLength": 500},
"amount": {"type": "number", "exclusiveMinimum": 0},
- "frequency": {"type": "string", "enum": ["weekly", "monthly", "quarterly", "yearly"]},
+ "frequency": {"type": "string", "enum": ["weekly", "biweekly", "monthly", "quarterly", "semiannual", "yearly"]},
"weekend_adjustment": {
"type": "string",
"enum": ["none", "previous_friday", "next_monday"],
diff --git a/backend/tests/test_agents_mcp_tools.py b/backend/tests/test_agents_mcp_tools.py
index 5f2678c2..0409393c 100644
--- a/backend/tests/test_agents_mcp_tools.py
+++ b/backend/tests/test_agents_mcp_tools.py
@@ -74,6 +74,21 @@ def test_each_tool_has_input_schema():
assert "properties" in spec.parameters
+ "tool_name",
+ [
+ "propose_create_recurring_transaction",
+ "propose_update_recurring_transaction",
+ ],
+ ids=["create", "update"],
+)
+def test_recurring_proposal_frequency_schema_includes_new_values(tool_name):
+ advertised = set(
+ REGISTRY[tool_name].parameters["properties"]["frequency"]["enum"]
+ )
+ assert {"biweekly", "semiannual"} <= advertised
+
+
# --- Read tools (with real seeded data) -----------------------------------
async def test_list_transactions_returns_seeded_data(
@@ -464,6 +479,22 @@ async def test_propose_create_recurring_monthly_requires_day(
assert "day_of_month" in r.get("error", "")
+async def test_propose_create_recurring_semiannual_requires_day(
+ session: AsyncSession, ctx: CallContext, test_account
+):
+ handler = REGISTRY["propose_create_recurring_transaction"].handler
+ result = await handler(
+ session=session,
+ ctx=ctx,
+ description="Insurance",
+ amount=600.0,
+ type="debit",
+ frequency="semiannual",
+ account_id=str(test_account.id),
+ )
+ assert "day_of_month" in result.get("error", "")
+
+
async def test_propose_create_recurring_monthly_full(
session: AsyncSession, ctx: CallContext, test_account
):
diff --git a/backend/tests/test_recurring_api.py b/backend/tests/test_recurring_api.py
index 40221707..e82e70c2 100644
--- a/backend/tests/test_recurring_api.py
+++ b/backend/tests/test_recurring_api.py
@@ -103,6 +103,45 @@ async def test_create_recurring_skip_first_quarterly(client, auth_headers, test_
assert data["next_occurrence"] == "2026-04-30"
+ ("frequency", "start_date", "day_of_month", "expected_next"),
+ [
+ ("biweekly", "2026-01-05", None, "2026-01-19"),
+ ("semiannual", "2026-01-31", 31, "2026-07-31"),
+ ],
+ ids=["biweekly", "semiannual"],
+)
+async def test_create_recurring_skip_first_new_frequencies(
+ client,
+ auth_headers,
+ test_account,
+ frequency,
+ start_date,
+ day_of_month,
+ expected_next,
+):
+ response = await client.post(
+ "/api/recurring-transactions",
+ json={
+ "description": f"{frequency} regression",
+ "amount": 100.00,
+ "currency": "BRL",
+ "type": "debit",
+ "frequency": frequency,
+ "day_of_month": day_of_month,
+ "start_date": start_date,
+ "skip_first": True,
+ "account_id": str(test_account.id),
+ },
+ headers=auth_headers,
+ )
+ assert response.status_code == 201
+ data = response.json()
+ assert data["frequency"] == frequency
+ assert data["next_occurrence"] == expected_next
+
+
@pytest.mark.asyncio
async def test_generate_pending_creates_transactions(client, auth_headers, test_account):
"""Generate pending creates transactions and advances next_occurrence."""
diff --git a/backend/tests/test_recurring_match.py b/backend/tests/test_recurring_match.py
index 74fdcaef..faeb0d9b 100644
--- a/backend/tests/test_recurring_match.py
+++ b/backend/tests/test_recurring_match.py
@@ -85,6 +85,8 @@ def test_match_window():
assert rms._match_window("weekly") == (2, 2)
assert rms._match_window("monthly") == (3, 5)
assert rms._match_window("yearly") == (3, 5)
+ assert rms._match_window("biweekly") == (3, 5)
+ assert rms._match_window("semiannual") == (3, 5)
# ---------------------------------------------------------------------------
@@ -250,6 +252,38 @@ async def test_advance_past_moves_quarterly_pointer(session, test_user, test_wor
assert bill.next_occurrence == date(2025, 4, 30)
+ ("frequency", "start_date", "day_of_month", "expected_next"),
+ [
+ ("biweekly", date(2026, 1, 5), None, date(2026, 1, 19)),
+ ("semiannual", date(2026, 1, 31), 31, date(2026, 7, 31)),
+ ],
+ ids=["biweekly", "semiannual"],
+)
+async def test_advance_past_new_frequencies(
+ session,
+ test_user,
+ test_workspace,
+ account,
+ frequency,
+ start_date,
+ day_of_month,
+ expected_next,
+):
+ bill = await _make_bill(
+ session,
+ test_workspace,
+ test_user,
+ account,
+ frequency=frequency,
+ day_of_month=day_of_month,
+ start_date=start_date,
+ )
+ rms.advance_past(bill, start_date)
+ assert bill.next_occurrence == expected_next
+
+
@pytest.mark.asyncio
async def test_advance_past_deactivates_past_end_date(session, test_user, test_workspace, account):
bill = await _make_bill(
diff --git a/backend/tests/test_recurring_transaction_service.py b/backend/tests/test_recurring_transaction_service.py
index ba4c223b..7f888f34 100644
--- a/backend/tests/test_recurring_transaction_service.py
+++ b/backend/tests/test_recurring_transaction_service.py
@@ -222,6 +222,11 @@ def test_advance_date_weekly():
assert _advance_date(date(2025, 12, 29), "weekly") == date(2026, 1, 5)
+def test_advance_date_biweekly():
+ assert _advance_date(date(2026, 1, 5), "biweekly") == date(2026, 1, 19)
+ assert _advance_date(date(2026, 12, 28), "biweekly") == date(2027, 1, 11)
+
+
def test_advance_date_yearly():
assert _advance_date(date(2025, 3, 15), "yearly") == date(2026, 3, 15)
# Leap year: Feb 29 -> Feb 28 next year
@@ -283,6 +288,18 @@ def test_advance_date_quarterly_leap_year_clamping_recovers():
assert may == date(2024, 5, 30)
+def test_advance_date_semiannual_preserves_intended_day():
+ july = _advance_date(date(2026, 1, 31), "semiannual", intended_day=31)
+ assert july == date(2026, 7, 31)
+ january = _advance_date(july, "semiannual", intended_day=31)
+ assert january == date(2027, 1, 31)
+
+ february = _advance_date(date(2024, 8, 31), "semiannual", intended_day=31)
+ assert february == date(2025, 2, 28)
+ august = _advance_date(february, "semiannual", intended_day=31)
+ assert august == date(2025, 8, 31)
+
+
@pytest.mark.parametrize(
("nominal", "policy", "expected"),
[
@@ -354,6 +371,26 @@ def test_adjust_weekend_date_rejects_unsupported_policy_on_weekday():
(date(2026, 2, 28), date(2026, 2, 27)),
],
),
+ (
+ "biweekly",
+ date(2026, 8, 1),
+ 1,
+ [
+ (date(2026, 8, 1), date(2026, 7, 31)),
+ (date(2026, 8, 15), date(2026, 8, 14)),
+ (date(2026, 8, 29), date(2026, 8, 28)),
+ ],
+ ),
+ (
+ "semiannual",
+ date(2024, 8, 31),
+ 31,
+ [
+ (date(2024, 8, 31), date(2024, 8, 30)),
+ (date(2025, 2, 28), date(2025, 2, 28)),
+ (date(2025, 8, 31), date(2025, 8, 29)),
+ ],
+ ),
],
)
def test_weekend_adjustment_never_changes_nominal_cadence(
@@ -538,6 +575,41 @@ def test_get_occurrences_in_range_quarterly_respects_end_date():
assert occurrences == [date(2026, 1, 15), date(2026, 4, 15)]
+ ("frequency", "start", "range_start", "range_end", "intended_day", "expected"),
+ [
+ (
+ "biweekly",
+ date(2026, 1, 5),
+ date(2026, 1, 1),
+ date(2026, 2, 10),
+ None,
+ [date(2026, 1, 5), date(2026, 1, 19), date(2026, 2, 2)],
+ ),
+ (
+ "semiannual",
+ date(2024, 8, 31),
+ date(2024, 8, 1),
+ date(2025, 9, 1),
+ 31,
+ [date(2024, 8, 31), date(2025, 2, 28), date(2025, 8, 31)],
+ ),
+ ],
+ ids=["biweekly", "semiannual"],
+)
+def test_get_occurrences_in_range_new_frequencies(
+ frequency, start, range_start, range_end, intended_day, expected
+):
+ assert get_occurrences_in_range(
+ start=start,
+ frequency=frequency,
+ end_date=None,
+ range_start=range_start,
+ range_end=range_end,
+ intended_day=intended_day,
+ ) == expected
+
+
# ---------------------------------------------------------------------------
# generate_pending
# ---------------------------------------------------------------------------
@@ -667,6 +739,75 @@ async def test_generate_pending_quarterly_respects_end_date(
assert rec.is_active is False
+ (
+ "frequency",
+ "start",
+ "up_to",
+ "day_of_month",
+ "expected_dates",
+ "expected_next",
+ ),
+ [
+ (
+ "biweekly",
+ date(2026, 1, 5),
+ date(2026, 1, 19),
+ None,
+ [date(2026, 1, 5), date(2026, 1, 19)],
+ date(2026, 2, 2),
+ ),
+ (
+ "semiannual",
+ date(2024, 8, 31),
+ date(2025, 2, 28),
+ 31,
+ [date(2024, 8, 31), date(2025, 2, 28)],
+ date(2025, 8, 31),
+ ),
+ ],
+ ids=["biweekly", "semiannual"],
+)
+async def test_generate_pending_new_frequencies(
+ session: AsyncSession,
+ test_user,
+ test_workspace,
+ test_account_for_recurring,
+ frequency,
+ start,
+ up_to,
+ day_of_month,
+ expected_dates,
+ expected_next,
+):
+ recurring = await create_recurring_transaction(
+ session,
+ test_workspace.id,
+ test_user.id,
+ RecurringTransactionCreate(
+ description=f"{frequency} regression",
+ amount=Decimal("25"),
+ type="debit",
+ frequency=frequency,
+ day_of_month=day_of_month,
+ start_date=start,
+ account_id=test_account_for_recurring.id,
+ ),
+ )
+
+ await generate_pending(session, test_user.id, up_to=up_to)
+
+ result = await session.execute(
+ select(Transaction)
+ .where(Transaction.recurring_transaction_id == recurring.id)
+ .order_by(Transaction.date)
+ )
+ actual_dates = [transaction.date for transaction in result.scalars()]
+ await session.refresh(recurring)
+ assert (actual_dates, recurring.next_occurrence) == (expected_dates, expected_next)
+
+
@pytest.mark.asyncio
async def test_generate_pending_deactivates_past_end_date(
session: AsyncSession, test_user, test_workspace, test_account_for_recurring
diff --git a/backend/tests/test_transaction_installments.py b/backend/tests/test_transaction_installments.py
index c994ed69..f11d6b6e 100644
--- a/backend/tests/test_transaction_installments.py
+++ b/backend/tests/test_transaction_installments.py
@@ -193,6 +193,23 @@ async def test_create_installment_series_weekly(
]
+async def test_create_installment_series_biweekly(
+ session: AsyncSession, test_user, test_workspace, installment_account
+):
+ created = await create_installment_series(
+ session,
+ test_workspace.id,
+ test_user.id,
+ _series_payload(installment_account, installments=3, frequency="biweekly"),
+ )
+ assert [transaction.date for transaction in created] == [
+ date(2026, 1, 15),
+ date(2026, 1, 29),
+ date(2026, 2, 12),
+ ]
+
+
@pytest.mark.asyncio
async def test_create_installment_series_yearly(
session: AsyncSession, test_user, test_workspace, installment_account
@@ -248,6 +265,28 @@ async def test_create_installment_series_month_end_clamping(
]
+async def test_create_installment_series_semiannual_month_end(
+ session: AsyncSession, test_user, test_workspace, installment_account
+):
+ created = await create_installment_series(
+ session,
+ test_workspace.id,
+ test_user.id,
+ _series_payload(
+ installment_account,
+ base={"date": date(2024, 8, 31)},
+ installments=3,
+ frequency="semiannual",
+ ),
+ )
+ assert [transaction.date for transaction in created] == [
+ date(2024, 8, 31),
+ date(2025, 2, 28),
+ date(2025, 8, 31),
+ ]
+
+
@pytest.mark.asyncio
async def test_create_installment_series_first_status_pending(
session: AsyncSession, test_user, test_workspace, installment_account
diff --git a/backend/tests/test_transaction_schemas.py b/backend/tests/test_transaction_schemas.py
index d40a5896..444b26d6 100644
--- a/backend/tests/test_transaction_schemas.py
+++ b/backend/tests/test_transaction_schemas.py
@@ -272,6 +272,17 @@ class TestInstallmentSeriesCreate:
assert data.first_installment_status == "pending"
assert data.frequency == "yearly"
+
+ @pytest.mark.parametrize("frequency", ["biweekly", "semiannual"])
+ def test_installment_series_accepts_new_frequencies(self, frequency):
+ data = InstallmentSeriesCreate.model_validate({
+ "base": self.BASE,
+ "installments": 3,
+ "frequency": frequency,
+ })
+ assert data.frequency == frequency
+ assert data.model_dump(mode="json")["frequency"] == frequency
+
def test_rejects_single_installment(self):
with pytest.raises(ValidationError):
InstallmentSeriesCreate.model_validate(
diff --git a/frontend/src/components/transaction-dialog.tsx b/frontend/src/components/transaction-dialog.tsx
index ab457db2..233a66ac 100644
--- a/frontend/src/components/transaction-dialog.tsx
+++ b/frontend/src/components/transaction-dialog.tsx
@@ -1258,7 +1258,9 @@ function TransactionForm({
>
<option value="monthly">{t('recurring.monthly')}</option>
<option value="quarterly">{t('recurring.quarterly')}</option>
+ <option value="semiannual">{t('recurring.semiannual')}</option>
<option value="weekly">{t('recurring.weekly')}</option>
+ <option value="biweekly">{t('recurring.biweekly')}</option>
<option value="yearly">{t('recurring.yearly')}</option>
</select>
</div>
@@ -1284,7 +1286,9 @@ function TransactionForm({
>
<option value="monthly">{t('recurring.monthly')}</option>
<option value="quarterly">{t('recurring.quarterly')}</option>
+ <option value="semiannual">{t('recurring.semiannual')}</option>
<option value="weekly">{t('recurring.weekly')}</option>
+ <option value="biweekly">{t('recurring.biweekly')}</option>
<option value="yearly">{t('recurring.yearly')}</option>
</select>
</div>
diff --git a/frontend/src/lib/installment-series.test.ts b/frontend/src/lib/installment-series.test.ts
index 99ca6bc4..78c3373e 100644
--- a/frontend/src/lib/installment-series.test.ts
+++ b/frontend/src/lib/installment-series.test.ts
@@ -66,6 +66,12 @@ describe('buildInstallmentSeriesInput', () => {
expect(buildInstallmentSeriesInput({ ...base, installmentFrequency: 'quarterly' }).frequency).toBe('quarterly')
expect(buildInstallmentSeriesInput({ ...base, installmentFrequency: 'weekly' }).frequency).toBe('weekly')
expect(buildInstallmentSeriesInput({ ...base, installmentFrequency: 'yearly' }).frequency).toBe('yearly')
+ expect(buildInstallmentSeriesInput({ ...base, installmentFrequency: 'biweekly' }).frequency).toBe(
+ 'biweekly',
+ )
+ expect(
+ buildInstallmentSeriesInput({ ...base, installmentFrequency: 'semiannual' }).frequency,
+ ).toBe('semiannual')
})
it('omits currency when not set', () => {
diff --git a/frontend/src/lib/installment-series.ts b/frontend/src/lib/installment-series.ts
index 2f254ba8..a4ed17aa 100644
--- a/frontend/src/lib/installment-series.ts
+++ b/frontend/src/lib/installment-series.ts
@@ -23,7 +23,7 @@ export interface InstallmentSeriesFormInput {
fxFields: Pick<Partial<Transaction>, 'amount_primary' | 'fx_rate_used'>
splits: TransactionSplitsInput | null
installmentCount: string
- installmentFrequency: 'monthly' | 'quarterly' | 'weekly' | 'yearly'
+ installmentFrequency: 'monthly' | 'quarterly' | 'semiannual' | 'weekly' | 'biweekly' | 'yearly'
status: 'posted' | 'pending'
}
diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json
index 500f78fc..75c421fa 100644
--- a/frontend/src/locales/de.json
+++ b/frontend/src/locales/de.json
@@ -1074,7 +1074,9 @@
"frequency": "Häufigkeit",
"monthly": "Monatlich",
"quarterly": "Vierteljährlich",
+ "semiannual": "Alle 6 Monate",
"weekly": "Wöchentlich",
+ "biweekly": "Alle 2 Wochen",
"yearly": "Jährlich",
"dayOfMonth": "Tag des Monats",
"weekendAdjustment": "Wochenendanpassung",
diff --git a/frontend/src/locales/el.json b/frontend/src/locales/el.json
index 8b6aa969..f51835d1 100644
--- a/frontend/src/locales/el.json
+++ b/frontend/src/locales/el.json
@@ -1073,7 +1073,9 @@
"frequency": "Συχνότητα",
"monthly": "Μηνιαία",
"quarterly": "Τριμηνιαία",
+ "semiannual": "Κάθε 6 μήνες",
"weekly": "Εβδομαδιαία",
+ "biweekly": "Κάθε 2 εβδομάδες",
"yearly": "Ετήσια",
"dayOfMonth": "Ημέρα του μήνα",
"weekendAdjustment": "Προσαρμογή σαββατοκύριακου",
diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json
index b6c338c2..47a80cc8 100644
--- a/frontend/src/locales/en.json
+++ b/frontend/src/locales/en.json
@@ -1073,7 +1073,9 @@
"frequency": "Frequency",
"monthly": "Monthly",
"quarterly": "Quarterly",
+ "semiannual": "Every 6 months",
"weekly": "Weekly",
+ "biweekly": "Every 2 weeks",
"yearly": "Yearly",
"dayOfMonth": "Day of month",
"weekendAdjustment": "Weekend adjustment",
diff --git a/frontend/src/locales/es.json b/frontend/src/locales/es.json
index ebfeb42b..317cb49d 100644
--- a/frontend/src/locales/es.json
+++ b/frontend/src/locales/es.json
@@ -1074,7 +1074,9 @@
"frequency": "Frecuencia",
"monthly": "Mensual",
"quarterly": "Trimestral",
+ "semiannual": "Cada 6 meses",
"weekly": "Semanal",
+ "biweekly": "Cada 2 semanas",
"yearly": "Anual",
"dayOfMonth": "Día del mes",
"weekendAdjustment": "Ajuste de fin de semana",
diff --git a/frontend/src/locales/fr.json b/frontend/src/locales/fr.json
index dcb161d8..d9097d95 100644
--- a/frontend/src/locales/fr.json
+++ b/frontend/src/locales/fr.json
@@ -1074,7 +1074,9 @@
"frequency": "Fréquence",
"monthly": "Mensuelle",
"quarterly": "Trimestrielle",
+ "semiannual": "Tous les 6 mois",
"weekly": "Hebdomadaire",
+ "biweekly": "Toutes les 2 semaines",
"yearly": "Annuelle",
"dayOfMonth": "Jour du mois",
"weekendAdjustment": "Ajustement du week-end",
diff --git a/frontend/src/locales/i18n.test.ts b/frontend/src/locales/i18n.test.ts
index 98f317e5..1f714d8a 100644
--- a/frontend/src/locales/i18n.test.ts
+++ b/frontend/src/locales/i18n.test.ts
@@ -223,4 +223,16 @@ describe('i18n locale files', () => {
).toEqual([])
}
})
+
+ it('contains new recurrence labels in every locale', () => {
+ const required = ['recurring.biweekly', 'recurring.semiannual']
+
+ for (const locale of LOCALES) {
+ const keys = new Set(flattenKeys(JSON.parse(readRaw(locale))))
+ expect(
+ required.filter((key) => !keys.has(key)),
+ `Recurrence labels missing in ${locale}:`,
+ ).toEqual([])
+ }
+ })
})
diff --git a/frontend/src/locales/it.json b/frontend/src/locales/it.json
index bd329249..2870aae4 100644
--- a/frontend/src/locales/it.json
+++ b/frontend/src/locales/it.json
@@ -1074,7 +1074,9 @@
"frequency": "Frequenza",
"monthly": "Mensile",
"quarterly": "Trimestrale",
+ "semiannual": "Ogni 6 mesi",
"weekly": "Settimanale",
+ "biweekly": "Ogni 2 settimane",
"yearly": "Annuale",
"dayOfMonth": "Giorno del mese",
"weekendAdjustment": "Regolazione del fine settimana",
diff --git a/frontend/src/locales/nl.json b/frontend/src/locales/nl.json
index 12d2c81b..cba59901 100644
--- a/frontend/src/locales/nl.json
+++ b/frontend/src/locales/nl.json
@@ -1074,7 +1074,9 @@
"frequency": "Frequentie",
"monthly": "Maandelijks",
"quarterly": "Driemaandelijks",
+ "semiannual": "Elke 6 maanden",
"weekly": "Wekelijks",
+ "biweekly": "Elke 2 weken",
"yearly": "Jaarlijks",
"dayOfMonth": "Dag van de maand",
"weekendAdjustment": "Weekendaanpassing",
diff --git a/frontend/src/locales/pl.json b/frontend/src/locales/pl.json
index ba8bc806..a1fbbd6c 100644
--- a/frontend/src/locales/pl.json
+++ b/frontend/src/locales/pl.json
@@ -1124,7 +1124,9 @@
"frequency": "Częstotliwość",
"monthly": "Miesięcznie",
"quarterly": "Kwartalnie",
+ "semiannual": "Co 6 miesięcy",
"weekly": "Tygodniowo",
+ "biweekly": "Co 2 tygodnie",
"yearly": "Rocznie",
"dayOfMonth": "Dzień miesiąca",
"weekendAdjustment": "Korekta weekendowa",
diff --git a/frontend/src/locales/pt-BR.json b/frontend/src/locales/pt-BR.json
index 2ea87e46..0456c450 100644
--- a/frontend/src/locales/pt-BR.json
+++ b/frontend/src/locales/pt-BR.json
@@ -1074,7 +1074,9 @@
"frequency": "Frequência",
"monthly": "Mensal",
"quarterly": "Trimestral",
+ "semiannual": "A cada 6 meses",
"weekly": "Semanal",
+ "biweekly": "A cada 2 semanas",
"yearly": "Anual",
"dayOfMonth": "Dia do mês",
"weekendAdjustment": "Ajuste de fim de semana",
diff --git a/frontend/src/locales/pt-PT.json b/frontend/src/locales/pt-PT.json
index 685f1292..c6dc77fc 100644
--- a/frontend/src/locales/pt-PT.json
+++ b/frontend/src/locales/pt-PT.json
@@ -1074,7 +1074,9 @@
"frequency": "Frequência",
"monthly": "Mensal",
"quarterly": "Trimestral",
+ "semiannual": "A cada 6 meses",
"weekly": "Semanal",
+ "biweekly": "A cada 2 semanas",
"yearly": "Anual",
"dayOfMonth": "Dia do mês",
"weekendAdjustment": "Ajuste de fim de semana",
diff --git a/frontend/src/locales/ru.json b/frontend/src/locales/ru.json
index 2ce1674b..c8bb415d 100644
--- a/frontend/src/locales/ru.json
+++ b/frontend/src/locales/ru.json
@@ -1082,7 +1082,9 @@
"frequency": "Частота",
"monthly": "Ежемесячно",
"quarterly": "Ежеквартально",
+ "semiannual": "Каждые 6 месяцев",
"weekly": "Еженедельно",
+ "biweekly": "Каждые 2 недели",
"yearly": "Ежегодно",
"dayOfMonth": "День месяца",
"weekendAdjustment": "Корректировка на выходные",
diff --git a/frontend/src/locales/sk.json b/frontend/src/locales/sk.json
index f5f21a28..9723673f 100644
--- a/frontend/src/locales/sk.json
+++ b/frontend/src/locales/sk.json
@@ -1141,7 +1141,9 @@
"frequency": "Frekvencia",
"monthly": "Mesačne",
"quarterly": "Štvrťročne",
+ "semiannual": "Každých 6 mesiacov",
"weekly": "Týždenne",
+ "biweekly": "Každé 2 týždne",
"yearly": "Ročne",
"dayOfMonth": "Deň v mesiaci",
"weekendAdjustment": "Posun pri víkende",
diff --git a/frontend/src/locales/uk.json b/frontend/src/locales/uk.json
index 4201bb7f..c3c7db27 100644
--- a/frontend/src/locales/uk.json
+++ b/frontend/src/locales/uk.json
@@ -1082,7 +1082,9 @@
"frequency": "Частота",
"monthly": "Щомісяця",
"quarterly": "Щоквартально",
+ "semiannual": "Кожні 6 місяців",
"weekly": "Щотижня",
+ "biweekly": "Кожні 2 тижні",
"yearly": "Щороку",
"dayOfMonth": "День місяця",
"weekendAdjustment": "Коригування на вихідні",
diff --git a/frontend/src/pages/recurring.tsx b/frontend/src/pages/recurring.tsx
index a217502f..fa081c8e 100644
--- a/frontend/src/pages/recurring.tsx
+++ b/frontend/src/pages/recurring.tsx
@@ -147,7 +147,14 @@ function RecurringTab() {
})
const frequencyLabel = (f: string) => {
- const map: Record<string, string> = { monthly: t('recurring.monthly'), quarterly: t('recurring.quarterly'), weekly: t('recurring.weekly'), yearly: t('recurring.yearly') }
+ const map: Record<string, string> = {
+ monthly: t('recurring.monthly'),
+ quarterly: t('recurring.quarterly'),
+ semiannual: t('recurring.semiannual'),
+ weekly: t('recurring.weekly'),
+ biweekly: t('recurring.biweekly'),
+ yearly: t('recurring.yearly'),
+ }
return map[f] ?? f
}
@@ -391,11 +398,13 @@ function RecurringForm({
<select className={selectClass} value={frequency} onChange={(e) => setFrequency(e.target.value as RecurringTransaction['frequency'])}>
<option value="monthly">{t('recurring.monthly')}</option>
<option value="quarterly">{t('recurring.quarterly')}</option>
+ <option value="semiannual">{t('recurring.semiannual')}</option>
<option value="weekly">{t('recurring.weekly')}</option>
+ <option value="biweekly">{t('recurring.biweekly')}</option>
<option value="yearly">{t('recurring.yearly')}</option>
</select>
</div>
- {(frequency === 'monthly' || frequency === 'quarterly') && (
+ {(frequency === 'monthly' || frequency === 'quarterly' || frequency === 'semiannual') && (
<div className="space-y-2">
<Label>{t('recurring.dayOfMonth')}</Label>
<Input type="number" min="1" max="31" value={dayOfMonth} onChange={(e) => setDayOfMonth(e.target.value)} />
diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.ts
index df2260fe..f9d87556 100644
--- a/frontend/src/types/index.ts
+++ b/frontend/src/types/index.ts
@@ -315,7 +315,7 @@ export interface InstallmentSeriesInput {
}
installments: number
first_installment_status?: 'posted' | 'pending'
- frequency?: 'monthly' | 'quarterly' | 'weekly' | 'yearly'
+ frequency?: 'monthly' | 'quarterly' | 'semiannual' | 'weekly' | 'biweekly' | 'yearly'
}
export type ShareType = 'equal' | 'exact' | 'percent'
@@ -590,7 +590,7 @@ export interface RecurringTransaction {
amount: number
currency: string
type: 'debit' | 'credit'
- frequency: 'monthly' | 'quarterly' | 'weekly' | 'yearly'
+ frequency: 'monthly' | 'quarterly' | 'semiannual' | 'weekly' | 'biweekly' | 'yearly'
weekend_adjustment: 'none' | 'previous_friday' | 'next_monday'
day_of_month: number | null
start_date: string