材料出库

This commit is contained in:
gongxh
2021-03-15 15:50:14 +08:00
parent f56c8806e7
commit 67d0581674
11 changed files with 135 additions and 21 deletions

View File

@@ -99,16 +99,40 @@ namespace NX.ERP.U8.Store
}
public bool UpdateVoucher(SaleStoreOut storeOut)
public string SaveVoucher(SaleStoreOut storeOut)
{
var voucherParameter = this.LoadVoucher($"id='{storeOut.Id}'");
if (voucherParameter.DomHead.selectSingleNode("//rs:data").childNodes.length == 0)
{
return this.AddVoucher(storeOut);
}
else
{
if (this.UpdateVoucher(storeOut, voucherParameter))
{
return storeOut.Id.ToString();
}
else
{
throw new Exception("保存错误");
}
VoucherParameter voucherParameter = this.LoadVoucher($"id='{storeOut.Id}'");
}
}
public bool UpdateVoucher(SaleStoreOut storeOut, VoucherParameter voucherParameter = null)
{
if (voucherParameter == null)
{
voucherParameter = this.LoadVoucher($"id='{storeOut.Id}'");
}
DOMDocument domBody = voucherParameter.DomBody;
IXMLDOMElement bodyXml;
if (storeOut.Source == "发货单")
{
var dispatch = new Sale.DispatchListDAL().GetModel(storeOut.SourceCode);