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: maintain existing discounts in get_pricing_rule_for_item #45345

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Sanket322
Copy link
Contributor

closes : Support Ticket - 29277

Related PR: #44708

Issue:
Previously, when the get_pricing_rule_for_item method was triggered due to a change in quantity, it reset both discount_amount and discount_percentage to 0, regardless of existing values.

Fix:
The method now checks if the first argument contains discount_amount and discount_percentage. If available, it uses those values; otherwise, it defaults to 0.

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Jan 20, 2025
@Sanket322 Sanket322 force-pushed the set_discount_properly branch from 16352d3 to e2a32b7 Compare January 20, 2025 12:31
@Sanket322 Sanket322 marked this pull request as draft January 20, 2025 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant