其他入库修改
This commit is contained in:
@@ -95,11 +95,36 @@ namespace NX.ERP.U8.Store
|
||||
}
|
||||
|
||||
|
||||
public bool UpdateVocher(Model.Request.OtherStoreInOut storeIn)
|
||||
public string SaveVoucher(Model.Request.OtherStoreInOut storeIn)
|
||||
{
|
||||
var voucherParameter = this.LoadVoucher($"id='{storeIn.Id}'");
|
||||
if (voucherParameter.DomHead.selectSingleNode("//rs:data").childNodes.length == 0)
|
||||
{
|
||||
return this.AddVocher(storeIn);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.UpdateVocher(storeIn, voucherParameter))
|
||||
{
|
||||
return storeIn.Id.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("保存错误");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public bool UpdateVocher(Model.Request.OtherStoreInOut storeIn, VoucherParameter voucherParameter = null)
|
||||
{
|
||||
|
||||
var voucherParameter = base.LoadVoucher($" id={storeIn.Id}");
|
||||
|
||||
if (voucherParameter == null)
|
||||
{
|
||||
voucherParameter = base.LoadVoucher($" id={storeIn.Id}");
|
||||
}
|
||||
DOMDocument domBody = voucherParameter.DomBody;
|
||||
for (var n = 0; n < storeIn.details.Count(); n++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user