材料出库
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user