-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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 limit #38818
fix: incorrect limit #38818
Conversation
@@ -647,7 +647,7 @@ def get_available_item_locations_for_batched_item( | |||
.groupby(sle.warehouse, sle.batch_no, sle.item_code) | |||
.having(Sum(sle.actual_qty) > 0) | |||
.orderby(IfNull(batch.expiry_date, "2200-01-01"), batch.creation, sle.batch_no, sle.warehouse) | |||
.limit(cint(required_qty + total_picked_qty)) | |||
.limit(get_limit_for_query(required_qty + total_picked_qty)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it always be math.ceil
🤔 ?
Also limiting rows here is kinda weird right? We want to keep picking till we hit quantity but since that's not feasible we have to put this weird limit clause (?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.. we can use math.ceil
7fa56ea
to
6012a08
Compare
(cherry picked from commit e18dc5c) # Conflicts: # erpnext/stock/doctype/pick_list/pick_list.py
# [14.55.0](v14.54.2...v14.55.0) (2023-12-20) ### Bug Fixes * close PO on SCO close (backport [#38667](#38667)) ([#38680](#38680)) ([22b442d](22b442d)) * **customer:** contact creation for companies ([#38055](#38055)) ([ed9b38b](ed9b38b)) * **customer:** quick form and integration fixes ([#37386](#37386)) ([6ed7c66](6ed7c66)) * error while filtering on name on reconciliation tool ([30b6321](30b6321)) * fetch exc rate of multi currency journals ([bf585de](bf585de)) * fetch item_tax_template values if fields with fetch_from exisit ([24ae45c](24ae45c)) * get customers for leaderboard ([9dfe342](9dfe342)) * get items for leaderboard ([812b301](812b301)) * get sales partner for leaderboard ([c63f873](c63f873)) * get sales person for leaderboard ([df93447](df93447)) * get suppliers for leaderboard ([7477ff3](7477ff3)) * if not budget then don't validate ([#38861](#38861)) ([d375164](d375164)) * incoming rate for sales return with Moving Average valuation method ([#38849](#38849)) ([7fdac62](7fdac62)) * incorrect limit ([#38818](#38818)) ([e18dc5c](e18dc5c)) * Init internal child table values ([d593f81](d593f81)) * item variant with manufacturer ([#38845](#38845)) ([e0c8ff1](e0c8ff1)) * not able to cancel SCR with Batch ([#38817](#38817)) ([fb5090f](fb5090f)) * not able to make inter-company po from so ([#38826](#38826)) ([23042df](23042df)) * on closed unreserved the production plan qty ([#38848](#38848)) ([2184e8e](2184e8e)) * Reset SLA on issue doesn't work (backport [#38789](#38789)) ([#38790](#38790)) ([942f34a](942f34a)) * supplier removed on selection of item (backport [#38712](#38712)) ([#38732](#38732)) ([dda95ea](dda95ea)) * timezone aware SLA banner (backport [#38745](#38745)) ([#38746](#38746)) ([73d525e](73d525e)) * **ux:** don't override Item Name and Description in MR (backport [#38720](#38720)) ([#38762](#38762)) ([f7bfbd8](f7bfbd8)) * validation error on reconciling PE to Journals as Invoice ([9836205](9836205)) * wrong currency in Stock Balance report (backport [#38778](#38778)) ([#38779](#38779)) ([e05b23c](e05b23c)) * wrong paid and cn amount on pos invoice ([77da0da](77da0da)) ### Features * **RFQ:** special properties in print preview (backport [#38725](#38725)) ([#38726](#38726)) ([2290750](2290750)) * set lead name from email ([1469ca7](1469ca7)) ### Performance Improvements * index `return_against` on delivery note (backport [#38827](#38827)) ([#38831](#38831)) ([4114760](4114760))
🎉 This PR is included in version 14.55.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Issue
If the required quantity is less than 1, such as 0.73, the system rounds down to zero. Consequently, the system indicates zero available stock even if stock exists.