Skip to content

Allow to edit a manual transaction's date (fix #1165)

Nicolas Frandeboeuf requested to merge nicofrand/allow-date-edition-for-1165 into main

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:

  1. when creating a transaction we automatically set the budget date to the date
  2. 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?

  1. Do nothing
  2. Adjust the budget date in a basic way: budgetDate += (previousDate - newDate)
  3. 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

Merge request reports