feat: 出入库明细可默认批次为无
This commit is contained in:
parent
0c08543e9c
commit
4cffb8a563
|
@ -153,7 +153,9 @@ class MIOItemCreateSerializer(CustomModelSerializer):
|
|||
validated_data["batch"] = wm.batch
|
||||
|
||||
material: Material = validated_data['material']
|
||||
batch = validated_data['batch']
|
||||
batch = validated_data.get("batch", None)
|
||||
if not batch:
|
||||
batch = "无"
|
||||
if material.is_hidden:
|
||||
raise ParseError('隐式物料不可出入库')
|
||||
if mio.type in [MIO.MIO_TYPE_RETURN_IN, MIO.MIO_TYPE_BORROW_OUT]:
|
||||
|
|
|
@ -148,7 +148,7 @@ def daoru_mioitems(path:str, mio:MIO):
|
|||
if batch:
|
||||
pass
|
||||
else:
|
||||
batch = "无批次"
|
||||
batch = "无"
|
||||
count = sheet[f"c{ind}"].value
|
||||
warehouse_name = sheet[f"d{ind}"].value
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue