feat: 支持个号转批号5
This commit is contained in:
parent
6b8fa4e58c
commit
ced3e7a16c
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue