-
Notifications
You must be signed in to change notification settings - Fork 122
Open
Description
Bug Description
Wallet balance calculation subtracts pending wallet payments in a way that includes already-submitted usage, even though submitted usage is already reflected in posted state.
The reservation pass also does not appear to be scoped consistently by company.
Expected Behavior
Wallet availability should:
- reserve only draft / truly pending wallet usage
- remain scoped to the correct company
- not subtract submitted wallet consumption twice
Actual Behavior
Available wallet balance can be understated because submitted usage is counted again as pending, and reservations may leak across companies.
Steps to Reproduce
- Set up wallet usage for a customer in a multi-company or repeated-sale scenario
- Submit a wallet-backed sale
- Check the reported wallet availability for the same customer afterward
- Compare the result with actual posted wallet consumption
Impact
- valid wallet payments may be rejected
- available wallet balance can appear lower than it really is
- multi-company setups risk cross-company contamination of wallet reservations
Suggested Fix
- exclude submitted invoices from pending wallet reservation logic
- scope wallet reservation queries by company
- align wallet availability with actual posted state instead of double-reserving
Notes
This looks independent of coupon and partial-payment issues and affects wallet-backed checkout accuracy directly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels