mirror of
https://github.com/escalante29/WealthySmart.git
synced 2026-07-17 11:28:47 +02:00
Fix dashboard data findings from browser verification
- Próximas cuotas: headline is the upcoming billing batch (sum of every active plan's next cuota, using the rounding-absorbing last cuota when it's the pending one) — the in-cycle formula was ~always zero since cuotas bill on the 19th, day one of the next cycle. - useAgent must name the 'wealthysmart' agent (default crashed the page). - /transactions/recent excludes future-dated Tasa Cero cuotas. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -253,9 +253,15 @@ def recent_transactions(
|
||||
session: Session = Depends(get_session),
|
||||
_user: str = Depends(get_current_user),
|
||||
):
|
||||
from app.timeutil import utcnow
|
||||
|
||||
query = (
|
||||
select(Transaction)
|
||||
.where(Transaction.source == TransactionSource.CREDIT_CARD)
|
||||
.where(
|
||||
Transaction.source == TransactionSource.CREDIT_CARD,
|
||||
# Tasa Cero generates future-dated cuotas; "recent" means billed.
|
||||
Transaction.date <= utcnow(),
|
||||
)
|
||||
.order_by(col(Transaction.date).desc(), col(Transaction.id).desc())
|
||||
.limit(limit)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user