feat: do_out报错更明确2
This commit is contained in:
parent
caf1bba050
commit
cbd458a8a5
|
|
@ -88,7 +88,7 @@ def do_out(item: MIOItem, is_reverse: bool = False):
|
|||
defect=defect
|
||||
)
|
||||
except (MaterialBatch.DoesNotExist, MaterialBatch.MultipleObjectsReturned) as e:
|
||||
raise ParseError(f"批次{xbatch}错误!{e}")
|
||||
raise ParseError(f"{str(xmaterial)}批次{xbatch}错误!{e}")
|
||||
mb.count = mb.count - xcount
|
||||
if mb.count < 0:
|
||||
raise ParseError(f"{mb.batch}-{str(mb.material)}-批次库存不足,操作失败")
|
||||
|
|
|
|||
Loading…
Reference in New Issue