增加Id
This commit is contained in:
@@ -61,7 +61,7 @@ namespace NX.ERP.U8.Store
|
||||
}
|
||||
headXml.setAttribute("iproorderid", Order.ProductOrderId);
|
||||
headXml.setAttribute("cmpocode", Order.ProductOrderNo);
|
||||
|
||||
|
||||
string lastProductNo = null;
|
||||
headXml.setAttribute("crdname", "材料出库");
|
||||
headXml.setAttribute("cdepcode", "24");
|
||||
@@ -142,22 +142,20 @@ namespace NX.ERP.U8.Store
|
||||
|
||||
public bool UpdateVocher(Model.Request.MaterialStoreOut storeOut)
|
||||
{
|
||||
VoucherParameter voucherParameter = this.LoadVoucher($"cCode='{storeOut.Code}'");
|
||||
|
||||
VoucherParameter voucherParameter = this.LoadVoucher($"Id='{storeOut.Id}'");
|
||||
|
||||
DOMDocument domBody = voucherParameter.DomBody;
|
||||
|
||||
|
||||
if (storeOut.Source == "生产订单")
|
||||
{
|
||||
|
||||
|
||||
var Order = new Mom.MomOrderDAL().GetModel(storeOut.SourceCode);
|
||||
if (Order == null)
|
||||
{
|
||||
throw new Exception($"未知订单:{storeOut.SourceCode}");
|
||||
}
|
||||
|
||||
|
||||
string lastProductNo = null;
|
||||
|
||||
|
||||
//headXml.setAttribute("cdepname", "研发LA组");
|
||||
IXMLDOMElement bodyXml;
|
||||
for (var n = 0; n < storeOut.Details.Count(); n++)
|
||||
@@ -212,10 +210,10 @@ namespace NX.ERP.U8.Store
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace NX.ERP.U8.Store
|
||||
public bool UpdateVocher(Model.Request.OtherStoreInOut storeIn)
|
||||
{
|
||||
|
||||
var voucherParameter = base.LoadVoucher($" cCode={storeIn.Code}");
|
||||
var voucherParameter = base.LoadVoucher($" id={storeIn.Id}");
|
||||
|
||||
DOMDocument domBody = voucherParameter.DomBody;
|
||||
for (var n = 0; n < storeIn.details.Count(); n++)
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace NX.ERP.U8.Store
|
||||
{
|
||||
|
||||
|
||||
VoucherParameter voucherParameter = this.LoadVoucher($"cCode='{storeIn.Code}'");
|
||||
VoucherParameter voucherParameter = this.LoadVoucher($"id='{storeIn.Id}'");
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace NX.ERP.U8.Store
|
||||
bodyXml.setAttribute("iprice", new Account.Accinformation().FormatMoney(_cost * detail.Quantity));
|
||||
bodyXml.setAttribute("irowno", n + 1);
|
||||
bodyXml.setAttribute("editprop", "A");
|
||||
|
||||
|
||||
bodyXml.setAttribute("cbatch", detail.Batch);
|
||||
bodyXml.setAttribute("cposition", detail.Position);
|
||||
var momOrderDetail = momOrder.ProductDtlLst.First(m => { return m.ProductOrderDtlId == detail.SourceDetailId; });
|
||||
@@ -87,14 +87,14 @@ namespace NX.ERP.U8.Store
|
||||
|
||||
public bool UpdateVoucher(ProductStoreIn storeIn)
|
||||
{
|
||||
var voucherParameter = this.LoadVoucher($"cCode='{storeIn.Code}'");
|
||||
|
||||
var voucherParameter = this.LoadVoucher($"id='{storeIn.Id}'");
|
||||
|
||||
DOMDocument domBody = voucherParameter.DomBody;
|
||||
|
||||
|
||||
if (storeIn.Source == "生产订单")
|
||||
{
|
||||
var momOrder = new Mom.MomOrderDAL().GetModel(storeIn.SourceCode);
|
||||
|
||||
|
||||
IXMLDOMElement bodyXml;
|
||||
for (var n = 0; n < storeIn.Details.Count; n++)
|
||||
{
|
||||
@@ -105,20 +105,20 @@ namespace NX.ERP.U8.Store
|
||||
var _cost = new MaterialDAL().GetCost(detail.InvCode, 0);
|
||||
bodyXml.setAttribute("iunitcost", _cost);
|
||||
bodyXml.setAttribute("iprice", new Account.Accinformation().FormatMoney(_cost * detail.Quantity));
|
||||
|
||||
|
||||
bodyXml.setAttribute("editprop", "A");
|
||||
|
||||
bodyXml.setAttribute("cbatch", detail.Batch);
|
||||
bodyXml.setAttribute("cposition", detail.Position);
|
||||
var momOrderDetail = momOrder.ProductDtlLst.First(m => { return m.ProductOrderDtlId == detail.SourceDetailId; });
|
||||
|
||||
|
||||
bodyXml.setAttribute("cmocode", momOrder.ProductOrderNo);
|
||||
bodyXml.setAttribute("impoids", detail.SourceDetailId);
|
||||
bodyXml.setAttribute("irowno", domBody.selectSingleNode("//rs:data").childNodes.length + 1);
|
||||
domBody.selectSingleNode("//rs:data").appendChild(bodyXml);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
return UpdateRdVoucher(voucherParameter);
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace NX.ERP.U8.Store
|
||||
{
|
||||
try
|
||||
{
|
||||
var voucherParameter = this.LoadVoucher($"cCode='{puStoreIn.Code}'");
|
||||
var voucherParameter = this.LoadVoucher($"id='{puStoreIn.Id}'");
|
||||
//添加一條
|
||||
DOMDocument domBody = voucherParameter.DomBody;
|
||||
if (puStoreIn.Source == "采购到货单")
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace NX.ERP.U8.Store
|
||||
headXml.setAttribute("ccode", storeOut.Code);
|
||||
headXml.setAttribute("ddate", storeOut.Date);
|
||||
headXml.setAttribute("cmaker", storeOut.Maker);
|
||||
|
||||
|
||||
headXml.setAttribute("vt_id", new VT().GetDefaltVTID("0303"));
|
||||
headXml.setAttribute("editprop", "A");
|
||||
headXml.setAttribute("cdepcode", "");
|
||||
@@ -102,24 +102,24 @@ namespace NX.ERP.U8.Store
|
||||
public bool UpdateVoucher(SaleStoreOut storeOut)
|
||||
{
|
||||
|
||||
VoucherParameter voucherParameter = this.LoadVoucher($"cCode='{storeOut.Code}'");
|
||||
VoucherParameter voucherParameter = this.LoadVoucher($"id='{storeOut.Id}'");
|
||||
|
||||
|
||||
|
||||
DOMDocument domBody = voucherParameter.DomBody;
|
||||
IXMLDOMElement bodyXml;
|
||||
|
||||
|
||||
if (storeOut.Source == "发货单")
|
||||
{
|
||||
var dispatch = new Sale.DispatchListDAL().GetModel(storeOut.SourceCode);
|
||||
|
||||
|
||||
for (var n = 0; n < storeOut.Details.Count; n++)
|
||||
{
|
||||
bodyXml = domBody.createElement("z:row");
|
||||
var detail = storeOut.Details[n];
|
||||
bodyXml.setAttribute("cinvcode", detail.InvCode);
|
||||
bodyXml.setAttribute("iquantity", detail.Quantity);
|
||||
|
||||
|
||||
|
||||
|
||||
bodyXml.setAttribute("cposition", detail.Position);
|
||||
@@ -137,7 +137,7 @@ namespace NX.ERP.U8.Store
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user