feat: 支持个号转批号5

This commit is contained in:
caoqianming 2025-04-28 15:50:36 +08:00
parent 6b8fa4e58c
commit ced3e7a16c
1 changed files with 1 additions and 1 deletions

View File

@ -341,7 +341,7 @@ def mlog_submit(mlog: Mlog, user: User, now: Union[datetime.datetime, None]):
wm.batch_ofrom = mlog_or_b.batch_ofrom
wm.material_ofrom = mlog_or_b.material_ofrom
if isinstance(mlog_or_b, Mlogb):
if mlog_or_b.number_from and wm.number_from is not None:
if mlog_or_b.number_from and wm.number_from is not None and wm.number_from != mlog_or_b.number_from:
raise ParseError(f'{wm.batch}-该批号现有库存来源于个号{wm.number_from}')
wm.number_from = mlog_or_b.number_from
wm.save()