Skip to content

Arithmetic expressions not allowed in balance assertions created with editor #1877

Open
@s-truax

Description

When using the "add transaction" function of the editor to add a balance assertion, arithmetic expressions are not considered valid input.

For example, the following balance assertion is well-formed and raises no errors with bean-check but can't be entered using the fava editor.

2024-10-01 balance Expenses:Fees (10 + 0.25) USD

See screenshot for another example:

Screenshot 2024-10-19 152527

This can probably be fixed by changing this line in fava/frontend/src/entry-forms /Balance.svelte

    <input
      type="tel"
      pattern="-?[0-9.,]*"
      placeholder={_("Number")}
      size={10}
      bind:value={entry.amount.number}
    />

Activity

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions