材料出库
This commit is contained in:
@@ -50,7 +50,7 @@ namespace NX.ERP.U8.Store
|
||||
headXml.setAttribute("vt_id", new VT().GetDefaltVTID("24"));
|
||||
headXml.setAttribute("editprop", "A");
|
||||
headXml.setAttribute("cdepcode", puStoreIn.Deptcode);
|
||||
headXml.setAttribute("cpersoncode", puStoreIn.PersonCode);
|
||||
|
||||
headXml.setAttribute("crdcode", "101" /*puStoreIn.RdCode*/);
|
||||
headXml.setAttribute("cwhcode", puStoreIn.Whcode);
|
||||
headXml.setAttribute("bisstqc", "0");
|
||||
@@ -70,6 +70,8 @@ namespace NX.ERP.U8.Store
|
||||
headXml.setAttribute("darvdate", Arrival.ArrivalDate);
|
||||
headXml.setAttribute("itaxrate", Arrival.TaxRate);
|
||||
headXml.setAttribute("cptcode", Arrival.PTCode);
|
||||
headXml.setAttribute("cpersoncode", Arrival.CPersonCode);
|
||||
headXml.setAttribute("cpersonname", Arrival.cpersonname);
|
||||
IXMLDOMElement bodyXml;
|
||||
for (var n = 0; n < puStoreIn.Details.Count; n++)
|
||||
{
|
||||
@@ -134,13 +136,39 @@ namespace NX.ERP.U8.Store
|
||||
|
||||
|
||||
|
||||
public string SaveVoucher(Model.Request.PuStoreIn puStoreIn)
|
||||
{
|
||||
var voucherParameter = this.LoadVoucher($"id='{puStoreIn.Id}'");
|
||||
if (voucherParameter.DomHead.selectSingleNode("//rs:data").childNodes.length == 0)
|
||||
{
|
||||
return this.AddVocher(puStoreIn);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.UpdateVocher(puStoreIn, voucherParameter))
|
||||
{
|
||||
return puStoreIn.Id.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("保存错误");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public bool UpdateVocher(Model.Request.PuStoreIn puStoreIn)
|
||||
}
|
||||
|
||||
|
||||
|
||||
public bool UpdateVocher(Model.Request.PuStoreIn puStoreIn, VoucherParameter voucherParameter = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var voucherParameter = this.LoadVoucher($"id='{puStoreIn.Id}'");
|
||||
if (voucherParameter == null)
|
||||
{
|
||||
voucherParameter = this.LoadVoucher($"id='{puStoreIn.Id}'");
|
||||
}
|
||||
//添加一條
|
||||
DOMDocument domBody = voucherParameter.DomBody;
|
||||
if (puStoreIn.Source == "采购到货单")
|
||||
|
||||
Reference in New Issue
Block a user