修正领料申请入库的错误
This commit is contained in:
@@ -39,7 +39,12 @@ namespace NX.ERP.U8.Store
|
||||
}
|
||||
headXml.setAttribute("cbustype", "领料");
|
||||
headXml.setAttribute("cbuscode", metailApp.Code);
|
||||
string lastProductNo = null;
|
||||
|
||||
string lastProductNo = null;
|
||||
decimal moqty = 0;
|
||||
string DeptName = "";
|
||||
string moCode = "";
|
||||
string DeptCode = "";
|
||||
IXMLDOMElement bodyXml;
|
||||
for (var n = 0; n < storeOut.Details.Count(); n++)
|
||||
{
|
||||
@@ -49,6 +54,25 @@ namespace NX.ERP.U8.Store
|
||||
{
|
||||
throw new Exception("未知明细");
|
||||
}
|
||||
|
||||
if (lastProductNo == null)
|
||||
{
|
||||
lastProductNo = materialAppDetail.ProductNo;
|
||||
moqty = materialAppDetail.MoQuantity;
|
||||
DeptName = materialAppDetail.DeptName;
|
||||
DeptCode = materialAppDetail.DeptCode;
|
||||
moCode = materialAppDetail.MoCode;
|
||||
|
||||
}
|
||||
else if (lastProductNo != "" && lastProductNo != materialAppDetail.ProductNo)
|
||||
{
|
||||
lastProductNo = "";
|
||||
moqty = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bodyXml = domBody.createElement("z:row");
|
||||
var metail = new NX.ERP.U8.MaterialDAL().GetInvPrice(detail.InvCode, 1, storeOut.Whcode, out var _cost);
|
||||
bodyXml.setAttribute("iunitcost", _cost);
|
||||
@@ -94,9 +118,10 @@ namespace NX.ERP.U8.Store
|
||||
|
||||
}
|
||||
headXml.setAttribute("cpspcode", lastProductNo);
|
||||
|
||||
|
||||
|
||||
headXml.setAttribute("imquantity", moqty);
|
||||
headXml.setAttribute("cdepname", DeptName);
|
||||
headXml.setAttribute("cdepcode", DeptCode);
|
||||
headXml.setAttribute("cmpocode", moCode);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user