Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 93bd729ba2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // problemas de fuso horário ao comparar apenas a data. | ||
| const dataSegura = dateStr.includes("T") | ||
| ? dateStr | ||
| : dateStr.replace(/(\d{2})\/(\d{2})\/(\d{4})/, "$3-$2-$1") + "T12:00:00"; |
There was a problem hiding this comment.
Handle DD-MM-YYYY due dates before comparison
This normalization only rewrites DD/MM/YYYY; if data_vencimento arrives as hyphenated day-first (for example 10-04-2026, a format the previous logic explicitly parsed), dataSegura becomes 10-04-2026T12:00:00, which produces Invalid Date, and the filter silently drops that invoice because venc < now is false. In those payloads, overdue invoices are omitted from totalGeralDivida, so the debt alert banner can disappear even when there is pending debt.
Useful? React with 👍 / 👎.
No description provided.