From 2f1e5677f07865c998d62b623cf40bf51a9e2b55 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期五, 13 一月 2023 18:52:54 +0800
Subject: [PATCH] 单据同步(收料通知单;采购订单;退料通知单;生产订单;生产用料清单;销售订单;发货通知单;退货通知单;生产汇报单)
---
WebAPI/Controllers/POStockInBillController.cs | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/WebAPI/Controllers/POStockInBillController.cs b/WebAPI/Controllers/POStockInBillController.cs
index 989a0f3..b0bbedd 100644
--- a/WebAPI/Controllers/POStockInBillController.cs
+++ b/WebAPI/Controllers/POStockInBillController.cs
@@ -2345,7 +2345,7 @@
string FCusName = oSystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref DBUtility.ClsPub.sExeReturnInfo);//瀹㈡埛鍚嶇О
string sql = string.Empty;
if (FCusName.Contains("瀹夌憺"))
- sql = $"select HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID from Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode}' and HBarCodeType ='绠卞彿鍐呮潯鐮�'";
+ sql = $"select top 1 HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID from Gy_BarCodeBill where HSourceInterID =(select distinct HSourceInterID from Cg_POInStockBillSub where HInterID ={HInterID}) and HBarCode = '{HBarcode}' and HBarCodeType ='绠卞彿鍐呮潯鐮�'";
else
sql = $"select HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID from Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode.Split('#')[0]}' and HQty = {HBarcode.Split('#')[1]}";
DataSet ds = oCn.RunProcReturn(sql, "H_v_SRM_POOrderBillList");
--
Gitblit v1.9.1