Allow to edit a manual transaction's date (fix #1165)
I only allowed to edit the dates of transactions created by the user (to avoid duplicates etc.).
This works fine for me but there is one thing we should discuss:
- when creating a transaction we automatically set the budget date to the date
- the budget date icon is displayed if the budget date is different from the date.
When modifying a date, what should we do with the budget date?
- Do nothing
- Adjust the budget date in a basic way:
budgetDate += (previousDate - newDate)
- Adjust the budget date:
if (budgetDate < previousDate)
budgetDate = previousMonth of newDate;
else if (budgetDate > previousDate)
budgetDate = next month of new date;
else
budgetDate = newDate
How we set the budget date when clicking on the buttons: https://framagit.org/kresusapp/kresus/-/blob/main/client/components/transactions/budget-date.tsx#L34
Edited by Nicolas Frandeboeuf