mirror of
https://github.com/escalante29/WealthySmart.git
synced 2026-05-19 09:28:47 +02:00
Exclude DEPOSITO transactions from budget projections
All checks were successful
Deploy to VPS / deploy (push) Successful in 12s
All checks were successful
Deploy to VPS / deploy (push) Successful in 12s
Salary deposits were being counted as expenses in uncovered actuals, causing negative balances. DEPOSITO transactions are income tracked separately in the Salarios page. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -93,6 +93,7 @@ def compute_actuals_by_source(
|
|||||||
Transaction.date >= start,
|
Transaction.date >= start,
|
||||||
Transaction.date < end,
|
Transaction.date < end,
|
||||||
Transaction.source == source,
|
Transaction.source == source,
|
||||||
|
Transaction.transaction_type != TransactionType.DEPOSITO,
|
||||||
)
|
)
|
||||||
).one()
|
).one()
|
||||||
|
|
||||||
@@ -124,6 +125,7 @@ def compute_actuals_by_category(
|
|||||||
Transaction.date >= start,
|
Transaction.date >= start,
|
||||||
Transaction.date < end,
|
Transaction.date < end,
|
||||||
Transaction.category_id.is_not(None), # type: ignore[union-attr]
|
Transaction.category_id.is_not(None), # type: ignore[union-attr]
|
||||||
|
Transaction.transaction_type != TransactionType.DEPOSITO,
|
||||||
)
|
)
|
||||||
.group_by(Transaction.category_id, Transaction.transaction_type)
|
.group_by(Transaction.category_id, Transaction.transaction_type)
|
||||||
).all()
|
).all()
|
||||||
@@ -217,6 +219,7 @@ def compute_monthly_projection(
|
|||||||
Transaction.date >= start,
|
Transaction.date >= start,
|
||||||
Transaction.date < end,
|
Transaction.date < end,
|
||||||
Transaction.category_id.is_(None), # type: ignore[union-attr]
|
Transaction.category_id.is_(None), # type: ignore[union-attr]
|
||||||
|
Transaction.transaction_type != TransactionType.DEPOSITO,
|
||||||
)
|
)
|
||||||
.group_by(Transaction.transaction_type)
|
.group_by(Transaction.transaction_type)
|
||||||
).all()
|
).all()
|
||||||
|
|||||||
Reference in New Issue
Block a user