mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
fix: remove unwanted serial numbers from fifo_queue (bp #27228)
fifo_queue.remove(serial_no) causes shift in index of the list and thereby not looping through every object in the list.
This commit is contained in:
@@ -175,9 +175,7 @@ def get_fifo_queue(filters, sle=None):
|
|||||||
fifo_queue.append([d.actual_qty, d.posting_date])
|
fifo_queue.append([d.actual_qty, d.posting_date])
|
||||||
else:
|
else:
|
||||||
if serial_no_list:
|
if serial_no_list:
|
||||||
for serial_no in fifo_queue:
|
fifo_queue[:] = [serial_no for serial_no in fifo_queue if serial_no[0] not in serial_no_list]
|
||||||
if serial_no[0] in serial_no_list:
|
|
||||||
fifo_queue.remove(serial_no)
|
|
||||||
else:
|
else:
|
||||||
qty_to_pop = abs(d.actual_qty)
|
qty_to_pop = abs(d.actual_qty)
|
||||||
while qty_to_pop:
|
while qty_to_pop:
|
||||||
|
|||||||
Reference in New Issue
Block a user