From 50cb13278527eb3c84516e82d7b0cbfed627a877 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期一, 27 十一月 2023 09:18:20 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs b/WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs
index 20fcf41..a495249 100644
--- a/WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs
+++ b/WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs
@@ -331,16 +331,19 @@
                 foreach (Model.ClsKf_SellOutBillSub oItemSub in ls)
                 {
                     i++;
-                    oItemSub.HSourceEntryID = 0;
-                    oItemSub.HSourceInterID = 0;
+
                     oItemSub.HEntryID = i;
+                    //oItemSub.HSourceEntryID = 0;
+                    //oItemSub.HSourceInterID = 0;
+                    //oItemSub.HSourceBillNo = "";
+                    //oItemSub.HSourceBillType = "";
+                    oItemSub.HRelationQty = 0;
+                    oItemSub.HRelationMoney = 0;
+
+                    
                     // DBUtility.ClsPub.isDate(DateTime.Now);
                     oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
                     oItemSub.HCloseType = false;
-                    oItemSub.HSourceBillNo = "";
-                    oItemSub.HSourceBillType = "";
-                    oItemSub.HRelationQty = 0;
-                    oItemSub.HRelationMoney = 0;
                     oItemSub.HCloseMan = "";
                     //oItemSub.HRemark = "";
                     oBill.DetailColl.Add(oItemSub);
@@ -518,6 +521,16 @@
                 //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣�
                 if (IsAudit == 0) //瀹℃牳鎻愪氦
                 {
+                    ds = oCN.RunProcReturn("exec h_p_Kf_CheckSellOutBill_CrediControl " + oBill.omodel.HInterID, "h_p_Kf_CheckSellOutBill_CrediControl");
+                    if (ds.Tables[0].Rows[0]["HBack"].ToString() == "1")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString();
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
                     //瀹℃牳鎻愪氦
                     if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                     {

--
Gitblit v1.9.1