Skip to content
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: priority not working for multiple pricing rules (backport #41516) #41524

Merged

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 17, 2024

Issue

  • Create a Pricing Rule for item code, keep priority as blank and set the discount percentage as 10
  • Create another Pricing Rule item group, keep priority as 2 and set the discount percentage as 20
  • System will apply the first pricing rule and not second

Problem

image

Here if the apply multiple pricing rules has not enabled then system not consider the pricing rules set on the Item Group and Brand.

Solution

To fix the issue, added the "Has Priority" checkbox to know whether the Priority has to be consider or not

image
This is an automatic backport of pull request #41516 done by [Mergify](https://mergify.com).

(cherry picked from commit 5cf5b18)

# Conflicts:
#	erpnext/accounts/doctype/pricing_rule/pricing_rule.json
#	erpnext/accounts/doctype/pricing_rule/pricing_rule.py
#	erpnext/patches.txt
Copy link
Contributor Author

mergify bot commented May 17, 2024

Cherry-pick of 5cf5b18 has failed:

On branch mergify/bp/version-14-hotfix/pr-41516
Your branch is up to date with 'origin/version-14-hotfix'.

You are currently cherry-picking commit 5cf5b18aea.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py
	modified:   erpnext/accounts/doctype/pricing_rule/utils.py
	new file:   erpnext/patches/v14_0/enable_set_priority_for_pricing_rules.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   erpnext/accounts/doctype/pricing_rule/pricing_rule.json
	both modified:   erpnext/accounts/doctype/pricing_rule/pricing_rule.py
	both modified:   erpnext/patches.txt

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@rohitwaghchaure rohitwaghchaure merged commit 97fdda8 into version-14-hotfix May 20, 2024
9 of 10 checks passed
@rohitwaghchaure rohitwaghchaure deleted the mergify/bp/version-14-hotfix/pr-41516 branch May 20, 2024 08:09
frappe-pr-bot pushed a commit that referenced this pull request May 22, 2024
## [14.70.1](v14.70.0...v14.70.1) (2024-05-22)

### Bug Fixes

* minor Dr and Cr between Purchase Receipt and Purchase Invoice ([82d206b](82d206b))
* possible sql error on General Ledger ([dfb4c47](dfb4c47))
* print format bold for field "total" ([89d507e](89d507e))
* priority not working for multiple pricing rules (backport [#41516](#41516)) ([#41524](#41524)) ([97fdda8](97fdda8))
* typerror on hide_fields ([331a743](331a743))
* validate reorder group warehouse (backport [#41478](#41478)) ([#41479](#41479)) ([2659535](2659535))
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 14.70.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants