Skip to content

Allow negative values (on CSV import, and in UI)#5376

Closed
aanno wants to merge 52 commits intoportfolio-performance:masterfrom
aanno:aanno/negative
Closed

Allow negative values (on CSV import, and in UI)#5376
aanno wants to merge 52 commits intoportfolio-performance:masterfrom
aanno:aanno/negative

Conversation

@aanno
Copy link

@aanno aanno commented Jan 25, 2026

This PR is a WIP/Draft for relaxing the restriction of providing positive values for the most input and CSV fields.

Here are some relevant links for discussion why this might be useful:

What works now:

  • Importing CSV with negative values now works
  • number of shares, fees, taxes and the (net) amount could be negative now (CSV, UI)
  • 0 (zero) for gross (amount) now works

What does not work (needs improvements):

  • Negative value for gross (amount) and dividendAmount does not work so far
  • I have broken the tests, especially in name.abuchen.portfolio.tests and name.abuchen.portfolio.ui.tests

This is a draft implementation not ready for merging. It's main purpose is to find out if such a contribution would be accepted. The real implementation should

  • fix the missing parts (see above)
  • fix the tests (see above)
  • make this feature an experimental function that could be switched on in the settings

@aanno aanno marked this pull request as draft January 25, 2026 19:38
@aanno
Copy link
Author

aanno commented Feb 7, 2026

What works now:

  • importing CSV with negative values
  • number of shares, fees, taxes and the (net) amount could be negative (CSV, UI)
  • negative value for gross (amount) and dividendAmount
  • 0 (zero) for gross (amount)
  • all tests

Closed in favour of #5445

@aanno aanno closed this Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant