Skip to content

Commit

Permalink
Fix: getting wrong amount in totals tab when update expense/payment date
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-nirali-s committed Dec 5, 2024
1 parent 18c16c5 commit 16bed55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Splito/UI/Home/Expense/AddExpenseViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ extension AddExpenseViewModel {
private func hasExpenseChanged(_ expense: Expense, oldExpense: Expense) -> Bool {
return oldExpense.amount != expense.amount || oldExpense.paidBy != expense.paidBy ||
oldExpense.splitTo != expense.splitTo || oldExpense.splitType != expense.splitType ||
oldExpense.splitData != expense.splitData || oldExpense.isActive != expense.isActive
oldExpense.splitData != expense.splitData || oldExpense.isActive != expense.isActive ||
oldExpense.date != expense.date
}

private func updateGroupMemberBalance(expense: Expense, updateType: ExpenseUpdateType) async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ class GroupPaymentViewModel: BaseViewModel, ObservableObject {

private func hasTransactionChanged(_ transaction: Transactions, oldTransaction: Transactions) -> Bool {
return oldTransaction.payerId != transaction.payerId || oldTransaction.receiverId != transaction.receiverId ||
oldTransaction.amount != transaction.amount || oldTransaction.isActive != transaction.isActive
oldTransaction.amount != transaction.amount || oldTransaction.isActive != transaction.isActive ||
oldTransaction.date != transaction.date
}

private func updateGroupMemberBalance(updateType: TransactionUpdateType) async {
Expand Down

0 comments on commit 16bed55

Please sign in to comment.