Skip to content

Cross-currency envelope activity uses month/dynamic FX rate instead of transaction-date rate #206

Description

@osipxd

Summary

If a transaction currency differs from the envelope/category currency, amounts are converted using a month-level (dynamic) FX rate, not the rate effective on the transaction date.

Expected

Historical transaction values in envelopes/categories should be converted using transaction-date FX (or another stable historical policy), so past totals don’t change when rates update.

Actual

Past envelope/category activity can be revalued as FX changes.

Code references

  • src/5-entities/envBalances/3 - envMetrics.ts
    uses convertFx(selfAvailableRaw, currency, month)
  • src/2-pages/Budgets/EnvelopePreview/EnvelopeInfo.tsx
    converts totals with convertFx(a, currency, month)

Impact

Historical envelope/category totals are unstable for transactions with currency different from the category currency. Because of that I never have categories with available = 0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions