inm 入库bug
This commit is contained in:
parent
82dab392f0
commit
5548776cde
|
@ -22,8 +22,8 @@ class InmService:
|
||||||
defaults={'material':material, 'warehouse':warehouse, 'count':0, 'batch':i.batch})
|
defaults={'material':material, 'warehouse':warehouse, 'count':0, 'batch':i.batch})
|
||||||
o2.count = o2.count + i.count
|
o2.count = o2.count + i.count
|
||||||
o2.save()
|
o2.save()
|
||||||
|
|
||||||
iv = Inventory.objects.get_or_create(material=material, warehouse=warehouse, \
|
iv, _= Inventory.objects.get_or_create(material=material, warehouse=warehouse, \
|
||||||
defaults={'material':material, 'warehouse':warehouse, 'count':0})
|
defaults={'material':material, 'warehouse':warehouse, 'count':0})
|
||||||
iv.count = MaterialBatch.objects.filter(material=material, warehouse=warehouse).count()
|
iv.count = MaterialBatch.objects.filter(material=material, warehouse=warehouse).count()
|
||||||
iv.save()
|
iv.save()
|
||||||
|
|
Loading…
Reference in New Issue