Skip to content

OUT-3620: correct deposit retry date, status filter, and null validation#230

Draft
SandipBajracharya wants to merge 1 commit intoOUT-3617from
OUT-3620
Draft

OUT-3620: correct deposit retry date, status filter, and null validation#230
SandipBajracharya wants to merge 1 commit intoOUT-3617from
OUT-3620

Conversation

@SandipBajracharya
Copy link
Copy Markdown
Collaborator

@SandipBajracharya SandipBajracharya commented Apr 20, 2026

Summary

  • Post the bank deposit on the PAID sync log's date, not the fee-retry log's createdAt — prevents dating the deposit on the retry day instead of the payment day.
  • Filter the PAID sync log lookup by status = SUCCESS so we don't match an in-flight or failed PAID log whose quickbooksId may not exist in QBO yet.
  • Validate expenseAccountRef via z.string().parse(...) in the deposit path, matching the expense path — surfaces a clear error on null instead of an opaque downstream Zod failure.

Test plan

  • Unit: deposit retry uses paidSyncLog.createdAt for TxnDate given differing record.createdAt and paidSyncLog.createdAt.
  • Unit: deposit retry rejects when no PAID log exists with status = SUCCESS (only FAILED/in-flight present).
  • Unit: deposit retry throws clean "expected string, received null" when expenseAccountRef is null.
  • Manual: retry a payment in the deposit A/B group on sandbox and confirm the deposit in QBO posts on the invoice payment date.

Testing Criteria

https://www.loom.com/share/3ab767c5b9724c81bbe42c80dfba2ac2

🤖 Generated with Claude Code

@linear-code
Copy link
Copy Markdown

linear-code Bot commented Apr 20, 2026

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
quickbooks-sync Ready Ready Preview, Comment Apr 21, 2026 10:13am
quickbooks-sync (dev) Ready Ready Preview, Comment Apr 21, 2026 10:13am

Request Review

@SandipBajracharya SandipBajracharya changed the title fix(OUT-3620): correct deposit retry date, status filter, and null validation OUT-3620: correct deposit retry date, status filter, and null validation Apr 20, 2026
…lidation

Post the bank deposit on the PAID log date (not the retry date), filter the
PAID sync log lookup to SUCCESS only, and validate expenseAccountRef the same
way the expense path does.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@priosshrsth priosshrsth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@SandipBajracharya SandipBajracharya added enhancement New feature or request Don't merge labels Apr 27, 2026
@SandipBajracharya SandipBajracharya marked this pull request as draft April 27, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Don't merge enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants