feat: 车间库存不足提示更准确2

This commit is contained in:
caoqianming 2025-05-16 09:05:19 +08:00
parent 5a08b5d22c
commit 767cfb18e2
1 changed files with 1 additions and 1 deletions

View File

@ -482,7 +482,7 @@ def mlog_revert(mlog: Mlog, user: User, now: Union[datetime.datetime, None]):
f'{str(mo_ma)}-{mo_batch}-存在多个相同批次!')
wm.count = wm.count - mo_count
if wm.count < 0:
raise ParseError('车间库存不足, 产物无法回退')
raise ParseError(f'{wm.batch} 车间库存不足, 产物无法回退')
elif wm.count >= 0:
if isinstance(mlog_or_b, Mlogb):
if mlog_or_b.number_from == wm.number_from: