mirror of
https://github.com/escalante29/WealthySmart.git
synced 2026-05-19 08:48:48 +02:00
Add Electronics category and fix DEPOSITO shown as expense
All checks were successful
Deploy to VPS / deploy (push) Successful in 24s
All checks were successful
Deploy to VPS / deploy (push) Successful in 24s
DEPOSITO transactions (salaries) were displaying with negative sign and red styling. Flipped logic so only COMPRA is negative; DEPOSITO and DEVOLUCION both show as positive income. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -43,15 +43,15 @@ export function getTransactionColumns({
|
||||
<div
|
||||
className={cn(
|
||||
'w-6 h-6 rounded flex items-center justify-center shrink-0',
|
||||
tx.transaction_type === 'DEVOLUCION'
|
||||
? 'bg-primary/10 text-primary'
|
||||
: 'bg-destructive/10 text-destructive',
|
||||
tx.transaction_type === 'COMPRA'
|
||||
? 'bg-destructive/10 text-destructive'
|
||||
: 'bg-primary/10 text-primary',
|
||||
)}
|
||||
>
|
||||
{tx.transaction_type === 'DEVOLUCION' ? (
|
||||
<TrendingUp className="w-3 h-3" />
|
||||
) : (
|
||||
{tx.transaction_type === 'COMPRA' ? (
|
||||
<TrendingDown className="w-3 h-3" />
|
||||
) : (
|
||||
<TrendingUp className="w-3 h-3" />
|
||||
)}
|
||||
</div>
|
||||
<span className="truncate">{tx.merchant}</span>
|
||||
@@ -90,10 +90,10 @@ export function getTransactionColumns({
|
||||
<span
|
||||
className={cn(
|
||||
'font-mono font-medium',
|
||||
tx.transaction_type === 'DEVOLUCION' && 'text-primary',
|
||||
tx.transaction_type !== 'COMPRA' && 'text-primary',
|
||||
)}
|
||||
>
|
||||
{tx.transaction_type === 'DEVOLUCION' ? '+' : '-'}
|
||||
{tx.transaction_type === 'COMPRA' ? '-' : '+'}
|
||||
{formatAmount(tx.amount, tx.currency)}
|
||||
</span>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user