Compare commits

...

2 Commits

1 changed files with 2 additions and 2 deletions

View File

@ -94,7 +94,7 @@ def do_out(item: MIOItem):
raise ParseError(f"批次错误!{e}") raise ParseError(f"批次错误!{e}")
mb.count = mb.count - xcount mb.count = mb.count - xcount
if mb.count < 0: if mb.count < 0:
raise ParseError(f"{mb.batch}-批次库存不足,操作失败") raise ParseError(f"{mb.batch}-{str(mb.material)}-批次库存不足,操作失败")
else: else:
mb.save() mb.save()
@ -440,7 +440,7 @@ class InmService:
elif in_or_out == -1: elif in_or_out == -1:
mb.count = mb.count - change_count mb.count = mb.count - change_count
if mb.count < 0: if mb.count < 0:
raise ParseError(f"{mb.batch}-批次库存不足,操作失败") raise ParseError(f"{mb.batch}-{str(mb.material)}-批次库存不足,操作失败")
else: else:
mb.save() mb.save()
if tracking == Material.MA_TRACKING_SINGLE: if tracking == Material.MA_TRACKING_SINGLE: