add a config option "use_financial_links" for activating both finance links and foodcoop transaction features
add migration: set this option to true if any financial link or foodcoop transaction exists
add options to create a financial link and/or foodcoop transaction when balancing an order
show links to finance links only to users with finance role (required anyway, but links were shown in home/ordergroup)
add note column when adding a financial transaction to a link
financial transactions: show link to group_order only in home/ordergroup and (additionally) dashboard; replace with link to order's balancing page in finance views
finance link: show link in financial transaction note to respective order's balancing page (also when adding a financial transaction)
finance link: replace misleading "delete" button for removing a transaction with "remove from link", also adapt confirm message
I wonder if the additional if/else conditions per row (in multiple views) will have a noticeable effect on performance if there are a lot of rows. I couldn't test this as the performance is horrible anyway in my local docker environment.
Foodcoop transactions don't show links to the respective order since they don't belong to a group_order and don't have a relation to order either. I thought about adding the relation, but I think it's unnecessary to add a column in the db just for foodcoop transactions, as you can go to the order with one additional click (by opening the financial link and clicking on a non-foodcoop transaction).
I tried to outsource the code for the transaction note with order link to a new template finance/financial_transactions/_order_note, but I couldn't call it from financial_links_controller. See comment for details.
home/ordergroup
and (additionally) dashboard; replace with link to order's balancing page in finance viewsNotes:
order
either. I thought about adding the relation, but I think it's unnecessary to add a column in the db just for foodcoop transactions, as you can go to the order with one additional click (by opening the financial link and clicking on a non-foodcoop transaction).finance/financial_transactions/_order_note
, but I couldn't call it from financial_links_controller. See comment for details.Implementation of #848 Replaces #860