feat: 扣减库存不足增加提示

This commit is contained in:
caoqianming 2025-04-15 15:08:42 +08:00
parent 8c27b1a03c
commit d864405c0d
1 changed files with 2 additions and 2 deletions

View File

@ -77,7 +77,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("批次库存不足,操作失败") raise ParseError(f"{mb.batch}-批次库存不足,操作失败")
else: else:
mb.save() mb.save()
@ -376,7 +376,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("批次库存不足,操作失败") raise ParseError(f"{mb.batch}-批次库存不足,操作失败")
else: else:
mb.save() mb.save()
if tracking == Material.MA_TRACKING_SINGLE: if tracking == Material.MA_TRACKING_SINGLE: