Conversation
This patch makes sure we are not leaving unsettled balance on the FBO account.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR refactors promotional credit purchase settlement handling by adding settlement-type-aware branching to the ledger transaction template assembly. For promotional settlements, it now appends receivable funding and wash settlement templates; other settlement types receive error handling or deferred processing. Tests are updated to verify the new wash-based accounting behavior. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Overview
Fix promotional credit grants so they settle immediately through wash instead of leaving open customer receivable.
Previously promotional credit purchases reused the shared issuance flow and stopped after issuing +FBO / -open receivable. Because promotional grants do not have later payment lifecycle events, that left an unsettled balance on the promotional receivable route. This change keeps the shared issuance logic but, for promotional
settlement types, appends the existing receivable funding and settlement templates so the receivable is cleared immediately.
What Changed
Behavioral Impact
For promotional credit grants:
External and invoice-backed credit purchase flows are unchanged.
Summary by CodeRabbit
Release Notes
Bug Fixes
Tests