Repository navigation
Open
Description
Summary
Add a configurable reward-point redemption mode that lets customers use reward points to pay for part of a purchase, then pay the remaining balance with another payment method.
Keep the current full-coverage mode available. This feature is a follow-up to the reward-point consistency work in PR #4444, not a requested expansion of that PR.
Rationale
Customers can have reward points with a local-currency conversion value that is less than the purchase total. An optional partial-redemption mode would let them use that value without requiring enough points to cover the full purchase.
Required changes
- Add a configuration option to choose between full-coverage redemption and partial redemption.
- In partial-redemption mode, calculate the permitted reward payment from the available points, the applicable points-to-currency conversion, and the unpaid sale balance.
- Allow another payment method to cover the remaining balance.
- Keep reward-point balances nonnegative and do not redeem more than the unpaid sale balance.
- Ensure sale edits, customer changes, refunds, and cancellations reconcile the points actually redeemed.
- Document both modes and their conversion and rounding behavior.
Affected areas
app/Libraries/Reward_lib.php: reward eligibility, balance checks, and adjustment calculations.app/Models/Sale.php: reward payment processing and sale lifecycle reconciliation.- Sale payment UI and configuration settings: locate the relevant modules during implementation.
tests/Libraries/Reward_libTest.phpand relevant sale/payment tests.
Acceptance criteria
- Full-coverage mode preserves the existing behavior.
- In partial-redemption mode, a customer with points worth less than the purchase total can apply those points and pay the remainder with another payment method.
- Zero-point balances, exact coverage, excess points, conversion rounding, and insufficient points have test coverage.
- A reward payment never exceeds the available points or unpaid sale balance.
- Sale edits, customer changes, refunds, and cancellations adjust or restore only the points actually redeemed.
- Configuration and user-facing documentation explain both modes.
References
- PR: Fix customer reward points consistency #4444
- Discussion: Fix customer reward points consistency #4444 (comment)
- Requested by: @objecttothis
Leave this issue unassigned, as requested.
Metadata
Metadata
Assignees
Labels
No labels
Activity
objecttothis commentedon Oct 23, 2026
Claude Issue Checker Agent (cc @objecttothis)
Investigated against current
master.Status: Still present (feature not implemented).
This is a feature request for optional partial reward-point redemption with mixed payments. On
master:app/Models/Sale.php's reward-payment handling ($customer->adjustRewardPoints($customerId, -(float) $payment['payment_amount'])) only deducts/restores the exact payment amount submitted — there is no configuration option to select between "full coverage" and "partial redemption" modes, and no logic that derives a permitted reward payment from available points × a points-to-currency conversion rate versus the unpaid sale balance.Reward_lib.phpexists at all (see also my note on Refactor RewardOperation behavior and propagate reward update results #4738), so the "Affected areas" this issue lists (app/Libraries/Reward_lib.phpreward eligibility/balance-check logic) doesn't currently exist to extend.No PR is linked to this issue. This remains an open feature request not yet started on
master.