Exclude income transactions from budget transactions list
All checks were successful
Deploy to VPS / deploy (push) Successful in 16s

Salary/deposit transactions were showing in the "Efectivo y
Transferencias" tab on the Budget page with a negative sign,
which is confusing since that view is for expenses only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Carlos Escalante
2026-04-15 19:27:50 -06:00
parent d929ed6573
commit d4d0f65759

View File

@@ -68,7 +68,9 @@ export default function Budget() {
}
const { data } = await api.get<Transaction[]>('/transactions/', { params });
setTransactions(data);
const INCOME_TYPES = ['DEPOSITO', 'SALARY'];
const filtered = data.filter((tx) => !INCOME_TYPES.includes(tx.transaction_type));
setTransactions(filtered);
} finally {
setTxLoading(false);
}