Skip to content

Conversation

mjavurek
Copy link
Contributor

@mjavurek mjavurek commented Jan 2, 2025

Currently, financial links can only be created for bank transactions. In this PR, a "add finance link" button is added to the invoice view unless there is already a finance link.
grafik

This is useful if invoices are not paid from the bank account of the foodcoop, but from a foodcoop member (e.g. by credit card). In this case, a foodcoop transaction is required instead of a bank transaction to pay the invoice by crediting the invoice amount to the foodcoop member. After creating a finance link for the invoice, a foodcoop transaction can be easily generated and linked to the invoice. The following screenshot is from another invoice with a different amount than the invoice in the previous screenshot.

grafik

@mjavurek mjavurek changed the title create fincancial link for invoice create financial link for invoice Jan 2, 2025
@lentschi
Copy link
Contributor

lentschi commented Apr 6, 2025

Thank you for your contribution, @mjavurek - looks reasonable!

Just a general observation:

There are currently no unit tests whatsoever for FinancialLinksController, right? (If there were, I'd ask you to add one for this use case.)

Since I'm not too deep into all of this BankTransactions/FinancialTransactions logic, I'm finding it hard to review such changes. Maybe someone knowing their way around them can find the time to add tests before we review/merge this?

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.

2 participants