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(pricing rule): consider child tables in condition #33469

Merged
merged 1 commit into from
Dec 28, 2022

Conversation

rtdany10
Copy link
Contributor

Peek.2022-12-28.15-15.mp4

On save, the doctype passed to the python function is Sales Invoice, but on qty change of individual item, it is Sales Invoice Item. On the function to fetch applicable pricing rules, buying = 1 was added to the condition since Sales Invoice Item was missing from

if args.get("doctype") in [
"Quotation",
"Sales Order",
"Delivery Note",
"Sales Invoice",
"POS Invoice",
]:
conditions += """ and ifnull(`tabPricing Rule`.selling, 0) = 1"""
else:
conditions += """ and ifnull(`tabPricing Rule`.buying, 0) = 1"""

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Dec 28, 2022
@codecov
Copy link

codecov bot commented Dec 28, 2022

Codecov Report

Merging #33469 (d6b74e6) into develop (882f92e) will decrease coverage by 0.00%.
The diff coverage is n/a.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #33469      +/-   ##
===========================================
- Coverage    64.07%   64.07%   -0.01%     
===========================================
  Files          818      818              
  Lines        58740    58740              
===========================================
- Hits         37640    37639       -1     
- Misses       21100    21101       +1     
Impacted Files Coverage Δ
erpnext/accounts/doctype/pricing_rule/utils.py 75.24% <ø> (ø)
...xt/accounts/doctype/sales_invoice/sales_invoice.py 81.75% <0.00%> (-0.09%) ⬇️

@deepeshgarg007 deepeshgarg007 added the backport version-14-hotfix backport to version 14 label Dec 28, 2022
@deepeshgarg007 deepeshgarg007 merged commit cabaed9 into frappe:develop Dec 28, 2022
mergify bot pushed a commit that referenced this pull request Dec 28, 2022
deepeshgarg007 pushed a commit that referenced this pull request Dec 29, 2022
… (#33470)

fix(pricing rule): consider child tables in condition (#33469)

(cherry picked from commit cabaed9)

Co-authored-by: Dany Robert <rtdany10@gmail.com>
frappe-pr-bot pushed a commit that referenced this pull request Jan 4, 2023
# [14.12.0](v14.11.1...v14.12.0) (2023-01-04)

### Bug Fixes

* [concurrency issue] incorrect picked qty in sales order ([e7254fd](e7254fd))
* `fg_item_qty` in non-subcontracted PO ([6e15331](6e15331))
* `shipping_address` for non-drop shipping item ([a7a3654](a7a3654))
* `shipping_address` in PO ([448fbe5](448fbe5))
* add missing 'ordered_qty' to get_bin_details ([55e8e45](55e8e45))
* consider child nodes while getting bin details ([e296408](e296408))
* Conversion factor error for invoices without item code (petty expenses) ([#32714](#32714)) ([ba5a149](ba5a149))
* Customer Primary Contact (backport [#33424](#33424)) ([#33440](#33440)) ([73c9820](73c9820))
* Default dimensions on fetching items from BOM (backport [#33439](#33439)) ([#33459](#33459)) ([a332b22](a332b22))
* Deferred revenue date comparison ([#33515](#33515)) ([027510b](027510b))
* ERR journals reported in AR/AP ([823b352](823b352))
* Get payment entry button not visible in Bank Clearance doc (backport [#33518](#33518)) ([#33525](#33525)) ([fcf052d](fcf052d))
* Missing opening entry in general ledger (backport [#33519](#33519)) ([#33526](#33526)) ([8e375db](8e375db))
* Multi-currency issues in Bank Reconciliation Tool ([#33488](#33488)) ([d030852](d030852))
* Multiple rows for same warehouse and batches in pick list (backport [#33456](#33456)) ([#33458](#33458)) ([a166a76](a166a76))
* payment terms and sales partner filter issue in AR/AP report ([0f6790b](0f6790b))
* **pricing rule:** consider child tables in condition (backport [#33469](#33469)) ([#33470](#33470)) ([3bceb47](3bceb47))
* Random behaviour while picking items using picklist (backport [#33449](#33449)) ([#33450](#33450)) ([1edde9c](1edde9c))
* set `supplier` details while mapping SE(Send to Subcontractor) ([06e13b6](06e13b6))
* timeout error while submitting stock entry ([f30f77c](f30f77c))
* typerror on multi warehouse in Packed Items ([9b24940](9b24940))
* use base_net_amount in case of missing stock qty ([#33457](#33457)) ([88ca780](88ca780))

### Features

* Accounting Dimension updation in Payment Request and Entry ([#33411](#33411)) ([e7704b2](e7704b2))
@barredterra barredterra mentioned this pull request Mar 7, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14 needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants