Fixed: Issues were negative in Stock Movement
This commit is contained in:
parent
8df9298724
commit
2c714dfe98
@ -64,10 +64,10 @@ def build_stock_movement(start_date, finish_date):
|
||||
.group_by(Product).all()
|
||||
for product, quantity in issues:
|
||||
if product.id in dict:
|
||||
dict[product.id]['Issue'] = quantity
|
||||
dict[product.id]['Issue'] = quantity * -1
|
||||
else:
|
||||
dict[product.id] = {'ProductID': product.id, 'Name': product.full_name, 'Group': product.product_group.name,
|
||||
'Issue': quantity}
|
||||
'Issue': quantity * -1}
|
||||
|
||||
list = [value for key, value in dict.items()]
|
||||
list = sorted(list, key=lambda x: x['Name'].lower())
|
||||
|
Loading…
Reference in New Issue
Block a user