From ced3e7a16c5c69676d520393865ed345ec156455 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 28 Apr 2025 15:50:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E4=B8=AA=E5=8F=B7?= =?UTF-8?q?=E8=BD=AC=E6=89=B9=E5=8F=B75?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/services.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/wpm/services.py b/apps/wpm/services.py index 8add9df3..48df5540 100644 --- a/apps/wpm/services.py +++ b/apps/wpm/services.py @@ -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()