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