-
Notifications
You must be signed in to change notification settings - Fork 7.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: only highest eligible coupon applied #38416
fix: only highest eligible coupon applied #38416
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #38416 +/- ##
===========================================
- Coverage 60.16% 60.16% -0.01%
===========================================
Files 759 759
Lines 69475 69480 +5
===========================================
Hits 41800 41800
- Misses 27675 27680 +5
|
fix: only highest eligible coupon code applied Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
fix: only highest eligible coupon code applied Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
@Mergifyio update |
❌ Pull request can't be updated with latest base branch changesMergify needs the author permission to update the base branch of the pull request. |
@sandratridz can you merge latest develop branch. And also please raise PRs from personal accounts in future. https://github.com/frappe/erpnext/wiki/Pull-Request-Checklist#maintainer-edits |
* fix: application of pricing rule when coupon is used (cherry picked from commit d34787c)
# [15.6.0](v15.5.0...v15.6.0) (2023-12-12) ### Bug Fixes * `split_invoices_based_on_payment_terms` (backport [#37859](#37859)) ([#38488](#38488)) ([4b76cc4](4b76cc4)) * 1st row depr. sch. value of asset put to less than 180 days acc. to I.T. S. 32 (backport [#38696](#38696)) ([#38703](#38703)) ([2bd9671](2bd9671)) * auto delete draft serial and batch bundle (backport [#38637](#38637)) ([#38654](#38654)) ([b0675f6](b0675f6)) * close PO on SCO close (backport [#38667](#38667)) ([#38681](#38681)) ([4055543](4055543)) * format only if searched text contain link value text ([d79e6e3](d79e6e3)) * get customers for leaderboard ([9d5c79d](9d5c79d)) * get items for leaderboard ([7cb38a8](7cb38a8)) * get sales partner for leaderboard ([3845d42](3845d42)) * get sales person for leaderboard ([2fcfebe](2fcfebe)) * get suppliers for leaderboard ([e205772](e205772)) * ignore non-existing regional customizations (backport [#38621](#38621)) ([#38624](#38624)) ([c70e6f2](c70e6f2)) * limit end date to current date ([dbdb971](dbdb971)) * negative batch issue (backport [#38688](#38688)) ([#38694](#38694)) ([a75081b](a75081b)) * not able to make serial and batch using csv import (backport [#38659](#38659)) ([#38662](#38662)) ([dd07eca](dd07eca)) * only highest eligible coupon applied ([#38416](#38416)) ([aa66ee6](aa66ee6)) * serial and batch bundle permission (backport [#38618](#38618)) ([#38619](#38619)) ([ce2bd15](ce2bd15)) * serial no filter in the Serial No Ledger report (backport [#38669](#38669)) ([#38682](#38682)) ([d188c8e](d188c8e)) * Shipping Address Link Showing in Buying (backport [#38634](#38634)) ([#38646](#38646)) ([4150ed9](4150ed9)) * show stock qty in popup (backport [#38698](#38698)) ([#38699](#38699)) ([6e2cde4](6e2cde4)) * typeerror on new sites ([#38692](#38692)) ([9239e73](9239e73)) * typo in unittest ([#38673](#38673)) ([14ee13c](14ee13c)) * **ux:** don't update qty blindly (backport [#38608](#38608)) ([#38639](#38639)) ([0b2e2a2](0b2e2a2)) ### Features * add employee number to client user bootinfo (backport [#38477](#38477)) ([#38603](#38603)) ([c7dbcbc](c7dbcbc))
In POS and E-commerce of ERPNext, it only applies the pricing rule from the highest eligible coupon code entered by the user. Any other lower-value coupon codes entered have no effect.
For example, if a user enters the 20% off coupon code for orders over the value of 1000 when placing an order worth 2000, that 20% off coupon is ignored and no discount is applied. Only if the user specifically enters the code for the 30% off coupon eligible for orders over the value of 1500 will a discount be applied.
Steps to reproduce the coupon bug
Create two coupons in the system:
Coupon code "20OFF" that gives 20% off orders over value of 1000.
Coupon code "30OFF" that gives 30% off orders over value of 1500.
Add an items to the cart/invoice over the threshold for both coupons (ex: 2,000)
Apply the lower value coupon code on the checkout page (enter "20OFF" in the coupon code field)
The subtotal does not change/no discount is applied.
Enter the higher value coupon code instead (enter "30OFF")
The appropriate 30% discount based on the order subtotal is now applied.
Confirm that when only the lower value coupon code is applied, no discount is given.
Confirm that a discount is only applied when the higher value eligible coupon code is used.