| | |
| | | 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); |
| | |
| | | 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) |
| | | { |
| | |
| | | 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)) |
| | | { |