From 37859063e78ed25f2012c4bdf276d4d549267803 Mon Sep 17 00:00:00 2001 From: yuyubo <1870149533@qq.com> Date: Thu, 31 Jul 2025 13:51:51 +0800 Subject: [PATCH] 6 --- .../PurchaseOrder/PurchaseOrderService.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/MyCode.Project.Services/Implementation/PurchaseOrder/PurchaseOrderService.cs b/MyCode.Project.Services/Implementation/PurchaseOrder/PurchaseOrderService.cs index e236942..e6346c6 100644 --- a/MyCode.Project.Services/Implementation/PurchaseOrder/PurchaseOrderService.cs +++ b/MyCode.Project.Services/Implementation/PurchaseOrder/PurchaseOrderService.cs @@ -614,8 +614,14 @@ namespace MyCode.Project.Services.Implementation { throw new BaseException("不能跨采购组织创建发货通知单"); } - - if (loginInfo.IfForeign == 1 && string.IsNullOrWhiteSpace(act.F_VHUB_Text)) + FPurchaseOrgIdList = listAll.Select(t => t.ReceiveorgCode).Distinct().ToList(); + if (FPurchaseOrgIdList.Count > 1) + { + throw new BaseException("不能跨收料组织创建发货通知单"); + } + + + if (loginInfo.IfForeign == 1 && string.IsNullOrWhiteSpace(act.F_VHUB_Text)) { throw new BaseException("国外的供应商发票号和发票日期是必填."); }