feat(cartoes): exibe fatura atual e ajusta indicadores

This commit is contained in:
Felipe Coutinho
2026-05-21 13:47:30 +00:00
parent 4e8f9cc5fa
commit 6b044f3bc5
6 changed files with 154 additions and 70 deletions

View File

@@ -274,15 +274,14 @@ const buildPaymentStatusData = (
continue;
}
const target =
row.transactionType === TRANSACTION_TYPE_INCOME
? result.income
: result.expenses;
const isExpense = row.transactionType === TRANSACTION_TYPE_EXPENSE;
const target = isExpense ? result.expenses : result.income;
const displayAmount = isExpense ? Math.abs(amount) : amount;
if (row.isSettled === true) {
target.confirmed += amount;
target.confirmed += displayAmount;
} else {
target.pending += amount;
target.pending += displayAmount;
}
}