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: incorrect logic for "Reserved Qty for Production" #28880

Merged
merged 2 commits into from
Dec 14, 2021

Conversation

ankush
Copy link
Member

@ankush ankush commented Dec 14, 2021

The query uses case to decide what fields to compute reservation on,
this case is outermost statement hence the very first Work order's "Skip
transfer" is considered for ALL work orders.

Solution: move the case inside Sum.

Steps to reproduce:

  1. Make work orders for more than 1 qty (with and without skip transfer)
  2. Create manufacture and transfer entries.
  3. Keep checking reserved production quantities on Bin doctype during this process.

The query uses case to decide what fields to compute reservation on,
this case is outermost case hence the very first Work order's "Skip
transfer" is considered for ALL work orders.

Solution: move the case inside Sum.

Steps to reproduce:
1. Make work order for more than 1 qty (with | without skip transfer)
2. Create manufacture and transfer entries.
3. Keep checking reserved quantities during this process.
@ankush ankush merged commit 80f1a8c into frappe:develop Dec 14, 2021
mergify bot pushed a commit that referenced this pull request Dec 14, 2021
* fix: reservation for production incorrect

The query uses case to decide what fields to compute reservation on,
this case is outermost case hence the very first Work order's "Skip
transfer" is considered for ALL work orders.

Solution: move the case inside Sum.

Steps to reproduce:
1. Make work order for more than 1 qty (with | without skip transfer)
2. Create manufacture and transfer entries.
3. Keep checking reserved quantities during this process.

* test: use default warehouse for testing reservation

(cherry picked from commit 80f1a8c)

# Conflicts:
#	erpnext/stock/doctype/bin/bin.py
@ankush ankush added this to the v13.18 milestone Dec 14, 2021
ankush added a commit that referenced this pull request Dec 14, 2021
* fix: reservation for production incorrect

The query uses case to decide what fields to compute reservation on,
this case is outermost case hence the very first Work order's "Skip
transfer" is considered for ALL work orders.

Solution: move the case inside Sum.

Steps to reproduce:
1. Make work order for more than 1 qty (with | without skip transfer)
2. Create manufacture and transfer entries.
3. Keep checking reserved quantities during this process.

* test: use default warehouse for testing reservation

(cherry picked from commit 80f1a8c)
ankush added a commit that referenced this pull request Dec 14, 2021
* fix: reservation for production incorrect

The query uses case to decide what fields to compute reservation on,
this case is outermost case hence the very first Work order's "Skip
transfer" is considered for ALL work orders.

Solution: move the case inside Sum.

Steps to reproduce:
1. Make work order for more than 1 qty (with | without skip transfer)
2. Create manufacture and transfer entries.
3. Keep checking reserved quantities during this process.

* test: use default warehouse for testing reservation

(cherry picked from commit 80f1a8c)
conncampbell pushed a commit to conncampbell/erpnext that referenced this pull request Jan 9, 2022
* fix: reservation for production incorrect

The query uses case to decide what fields to compute reservation on,
this case is outermost case hence the very first Work order's "Skip
transfer" is considered for ALL work orders.

Solution: move the case inside Sum.

Steps to reproduce:
1. Make work order for more than 1 qty (with | without skip transfer)
2. Create manufacture and transfer entries.
3. Keep checking reserved quantities during this process.

* test: use default warehouse for testing reservation
conncampbell pushed a commit to conncampbell/erpnext that referenced this pull request Jan 9, 2022
* fix: reservation for production incorrect

The query uses case to decide what fields to compute reservation on,
this case is outermost case hence the very first Work order's "Skip
transfer" is considered for ALL work orders.

Solution: move the case inside Sum.

Steps to reproduce:
1. Make work order for more than 1 qty (with | without skip transfer)
2. Create manufacture and transfer entries.
3. Keep checking reserved quantities during this process.

* test: use default warehouse for testing reservation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant