fix: dynamically filter fifo queue
This commit is contained in:
parent
77f22635f2
commit
ea70c6f696
@ -13,11 +13,12 @@ def execute(filters=None):
|
|||||||
columns = get_columns(filters)
|
columns = get_columns(filters)
|
||||||
item_details = get_fifo_queue(filters)
|
item_details = get_fifo_queue(filters)
|
||||||
to_date = filters["to_date"]
|
to_date = filters["to_date"]
|
||||||
|
_func = lambda x: x[1]
|
||||||
|
|
||||||
data = []
|
data = []
|
||||||
for item, item_dict in iteritems(item_details):
|
for item, item_dict in iteritems(item_details):
|
||||||
|
|
||||||
item_dict['fifo_queue'] = [item for item in item_dict if item[1]]
|
fifo_queue = sorted(filter(_func, item_dict["fifo_queue"]), key=_func)
|
||||||
fifo_queue = sorted(item_dict["fifo_queue"], key=lambda x: x[1])
|
|
||||||
details = item_dict["details"]
|
details = item_dict["details"]
|
||||||
if not fifo_queue or (not item_dict.get("total_qty")): continue
|
if not fifo_queue or (not item_dict.get("total_qty")): continue
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user