diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs
index 921be7b4..9a5da81b 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs
@@ -257,9 +257,9 @@ namespace Tnb.WarehouseMgr
///
///
[HttpPost]
- [NonUnify]
public async Task MESCreateInstock(MESCreateInstockInput input)
{
+ var isSuccessFul = false;
try
{
await _db.Ado.BeginTranAsync();
@@ -445,6 +445,7 @@ namespace Tnb.WarehouseMgr
await _db.Updateable().SetColumns(it => new WmsInstockD { line_status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => instockCOdes.Select(x => x.bill_d_id).Contains(it.id)).ExecuteCommandAsync();
await _db.Updateable().SetColumns(it => new WmsInstockH { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == instock!.id).ExecuteCommandAsync();
}
+ isSuccessFul = true;
}
}
}
@@ -453,11 +454,12 @@ namespace Tnb.WarehouseMgr
}
catch (Exception ex)
{
+ isSuccessFul = false;
JNPF.Logging.Log.Error(ex.Message);
await _db.Ado.RollbackTranAsync();
- return await ToApiResult(JNPF.Common.Enums.HttpStatusCode.InternalServerError, ex.Message);
+ //return await ToApiResult(JNPF.Common.Enums.HttpStatusCode.InternalServerError, ex.Message);
}
- return await ToApiResult();
+ return isSuccessFul;
}
}
}