fix: expense edit form — restore description value, use event's exchange rate
This commit is contained in:
parent
10e6b78940
commit
949d4f277c
2 changed files with 3 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
<div class="form-group">
|
||||
<label for="description">Description *</label>
|
||||
<textarea id="description" name="description" placeholder="Required notes..." required></textarea>
|
||||
<textarea id="description" name="description" placeholder="Required notes..." required>{{.Description}}</textarea>
|
||||
</div>
|
||||
|
||||
{{if .BaseCurrency}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue