Skip to content

Commit

Permalink
Merge pull request #32788 from s-aga-r/fix/github-issue/30339
Browse files Browse the repository at this point in the history
fix: use `flt` instead of `cint` in `get_batch_no`
  • Loading branch information
s-aga-r authored Nov 2, 2022
2 parents a6a2806 + be4593c commit 25a2c8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/stock/doctype/batch/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def get_batch_no(item_code, warehouse, qty=1, throw=False, serial_no=None):
batches = get_batches(item_code, warehouse, qty, throw, serial_no)

for batch in batches:
if cint(qty) <= cint(batch.qty):
if flt(qty) <= flt(batch.qty):
batch_no = batch.batch_id
break

Expand Down

0 comments on commit 25a2c8a

Please sign in to comment.