From 4a3cfaa62c5b55b037b258acc6dfb3fe8d0d2dca Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期二, 04 一月 2022 22:18:48 +0800
Subject: [PATCH] 博日有源单扫码,条码数量大于源单数量,取源单数量

---
 CLOUDWEB/WebService1.asmx.cs |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/CLOUDWEB/WebService1.asmx.cs b/CLOUDWEB/WebService1.asmx.cs
index d906b13..db14b40 100644
--- a/CLOUDWEB/WebService1.asmx.cs
+++ b/CLOUDWEB/WebService1.asmx.cs
@@ -16629,6 +16629,7 @@
                         "\"FVMIBUSINESS\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FVMIBUSINESS"]) + "\"," +
                         //\"FScanBox\":\"\",
                         //\"FSourceType\":\"\",
+                        "\"FStockId0\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockId0"]) + "\"}," +
                         "\"FEntity\": [  ";
                     string sJson_Entry = "";
                     for (int i = 0; i < Ds.Tables[1].Rows.Count; i++)
@@ -31998,6 +31999,21 @@
             {
                 if (dal.omodel_View.HBarCodeType == "鍞竴鏉$爜")
                 {
+                    //鍗氭棩鏈夋簮鍗曟壂鐮侊紝鏉$爜鏁伴噺澶т簬婧愬崟鏁伴噺锛屽彇婧愬崟鏁伴噺
+                    if (dal.omodel_View.HSourceInterID != 0 && oSystemParameter.omodel.WMS_CampanyName == "鍗氭棩绉戞妧"
+                        && HBillType != "1202" && HBillType != "1205")
+                    {
+                        if(dal.omodel_View.HinitQty==0)
+                        {
+                            sErrMsg = "宸叉壂鎻忔暟閲忕瓑浜庢垨澶т簬婧愬崟鏁伴噺锛屼笉鍏佽鎵爜锛�";
+                            return false;
+                        }
+                        else if(dal.omodel_View.HQty > dal.omodel_View.HinitQty)
+                        {
+                            dal.omodel_View.HQty = dal.omodel_View.HinitQty;
+                        }
+                    }
+
                     if (HQty > 0 && dal.omodel_View.HQty > HQty)
                     {
                         sRelQty = HQty;

--
Gitblit v1.9.1