zgq
2021-06-28 0956e03f9abe3db63035e27471b3d6265b1ca8fb
WebAPI/Controllers/MoveStockBillController.cs
@@ -320,6 +320,7 @@
                model.HBarCode = oView.HBarCode;
                model.HBatchNo = oView.HBatchNo;
                model.HMTONo = oView.HMTONo;
                model.HMaker = oView.HMaker;
                model.HWhID = DBUtility.ClsPub.isLong(HWHID);
                model.HStockPlaceID = DBUtility.ClsPub.isLong(HSPID);
@@ -343,7 +344,17 @@
                bool flag = oWebs.Get_CheckQtyByBarCode_GetWhAndSP(model.HInterID, model.HBillType, model.HBarCode, ref SCWhID, ref SCSPID, sRelQty, ref sRelQty);
                if (flag)
                {
                    sQty = sRelQty;
                    //sQty = sRelQty;
                    model.HSCWHID = SCWhID;
                    model.HOutStockPlaceID = SCSPID;
                    if(SCWhID<=0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "1-仓库无库存!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                else if (sRelQty == 0)
                {
@@ -353,10 +364,14 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    sQty = sRelQty;
                }
                //else
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "2-库存不足!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                if (oWebs.set_SavePonderationBillMain_Temp_Qty(model, sQty, ref DBUtility.ClsPub.sErrInfo))
                {