From 949d4f277c78aecd1bc3346f6e5fff3bdc972ed0 Mon Sep 17 00:00:00 2001 From: cclohmar Date: Tue, 14 Jul 2026 10:26:28 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20expense=20edit=20form=20=E2=80=94=20rest?= =?UTF-8?q?ore=20description=20value,=20use=20event's=20exchange=20rate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/handlers/expenses.go | 4 ++-- templates/receipt_form.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/handlers/expenses.go b/internal/handlers/expenses.go index a061f13..54c0b9c 100644 --- a/internal/handlers/expenses.go +++ b/internal/handlers/expenses.go @@ -398,8 +398,8 @@ func (h *ExpenseHandler) EditExpense(w http.ResponseWriter, r *http.Request) { "Category": expense.Category, "Date": expense.Date, "Description": expense.Description, - "BaseCurrency": expense.BaseCurrency, - "ExchangeRate": 0.0, + "BaseCurrency": event.BaseCurrency, + "ExchangeRate": event.ExchangeRate, "ConvertedAmount": strconv.FormatFloat(expense.ConvertedAmount, 'f', 2, 64), "EditID": expense.ID, "ID": expense.ID, diff --git a/templates/receipt_form.html b/templates/receipt_form.html index 6abcba3..938f4a2 100644 --- a/templates/receipt_form.html +++ b/templates/receipt_form.html @@ -75,7 +75,7 @@
- +
{{if .BaseCurrency}}