feat: do_out报错更明确

This commit is contained in:
caoqianming 2025-11-19 15:53:38 +08:00
parent 01d93d7814
commit caf1bba050
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ def do_out(item: MIOItem, is_reverse: bool = False):
defect=defect defect=defect
) )
except (MaterialBatch.DoesNotExist, MaterialBatch.MultipleObjectsReturned) as e: except (MaterialBatch.DoesNotExist, MaterialBatch.MultipleObjectsReturned) as e:
raise ParseError(f"批次错误!{e}") raise ParseError(f"批次{xbatch}错误!{e}")
mb.count = mb.count - xcount mb.count = mb.count - xcount
if mb.count < 0: if mb.count < 0:
raise ParseError(f"{mb.batch}-{str(mb.material)}-批次库存不足,操作失败") raise ParseError(f"{mb.batch}-{str(mb.material)}-批次库存不足,操作失败")