diff --git a/db/expense.go b/db/expense.go index 5ea3184..24651bd 100644 --- a/db/expense.go +++ b/db/expense.go @@ -85,7 +85,7 @@ func (e *Expense) BeforeUpdate(tx *gorm.DB) (err error) { if oldCard.UserID != e.UserID { return ERROR_EXPENSE_INVALID_USERID } - oldCard.Balance += e.Value + oldCard.Balance += original.Value if err := tx.Save(oldCard).Error; err != nil { return err }