feat: 采购和其他入库可入已有批次
This commit is contained in:
parent
b44fec0695
commit
6678e39518
|
@ -242,6 +242,9 @@ class InmService:
|
|||
BatchLog.clear(mio=instance)
|
||||
else:
|
||||
for item in MIOItem.objects.filter(mio=instance):
|
||||
if item.mb: # 说明录入到已有批次
|
||||
BatchSt.g_create(batch=item.batch)
|
||||
else:
|
||||
BatchSt.g_create(batch=item.batch, mio=instance, material_start=item.material)
|
||||
from apps.pum.services import PumService
|
||||
if is_reverse:
|
||||
|
@ -254,6 +257,9 @@ class InmService:
|
|||
BatchLog.clear(mio=instance)
|
||||
else:
|
||||
for item in MIOItem.objects.filter(mio=instance):
|
||||
if item.mb:
|
||||
BatchSt.g_create(batch=item.batch)
|
||||
else:
|
||||
BatchSt.g_create(batch=item, mio=instance, material_start=item.material)
|
||||
if is_reverse:
|
||||
cls.update_mb(instance, -1)
|
||||
|
|
Loading…
Reference in New Issue