Skip to content

Bug: model_price field limited to 2 decimal places in investment transaction form #1323

@HugoleDino

Description

@HugoleDino

Before you start (required)

General checklist

  • I have removed personal / sensitive data from screenshots and logs
  • I have searched existing issues and discussions to ensure this is not a duplicate issue

How are you using Sure?

  • I was a paying Maybe customer (hosted version)
  • I use it on PikaPod, Umbrel or similar (VPS included)
  • I am a self-hosted user (local only)

Self hoster checklist

  • Self hosted app commit SHA (find in user menu): [91b7905]
    • I have confirmed that my app's commit is the latest version of Sure
  • Where are you hosting?
    • Render
    • Docker Compose
    • Umbrel
    • PikaPod
    • Other (please specify)

Bug description

The model_price field in the "Add transaction" form for an investment account is limited to a step of 0.01.

However, in real-world financial markets, asset prices (stocks, ETFs, crypto, etc.) can have more precision (commonly 3 or 4 decimal places, sometimes more).

This restriction prevents users from entering accurate transaction prices and may lead to rounding errors or incorrect portfolio tracking.

To Reproduce

  1. Go to an investment account
  2. Click on "Add transaction"
  3. Locate the model_price input field
  4. Try to enter a value with more than 2 decimal places (e.g. 123.4567)
  5. Observe that the input is either rounded or blocked due to the step=0.01 constraint

Expected behavior

The model_price field should allow higher precision values.

Possible fixes:

  • Remove the step restriction entirely, or
  • Increase precision (e.g. step=0.0001)

This would allow users to input realistic market prices without losing accuracy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions