|
|
@ -105,7 +105,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
|
|
|
|
if (settle == null) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"选择发票:{p_invbillnum}对应的可结算单不在请检查!"); |
|
|
|
throw new UserFriendlyException($"选择发票:{p_invbillnum}对应的可结算单不在请检查!","400"); |
|
|
|
|
|
|
|
} |
|
|
|
version = settle.Version; |
|
|
@ -113,11 +113,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
{ |
|
|
|
if (inv.InvoiceState == InvoiceBillState.报废) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"选择发票:{p_invbillnum}状态为报废状态不能重开!"); |
|
|
|
throw new UserFriendlyException($"选择发票:{p_invbillnum}状态为报废状态不能重开!", "400"); |
|
|
|
} |
|
|
|
if (inv.State == SettleBillState.商务已审核 || inv.State == SettleBillState.已开票) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"选择发票:{p_invbillnum}状态在财务审核后可以报废重开,之前不能重开可以退回!"); |
|
|
|
throw new UserFriendlyException($"选择发票:{p_invbillnum}状态在财务审核后可以报废重开,之前不能重开可以退回!", "400"); |
|
|
|
} |
|
|
|
var bbaclist = await _bbacMng.GetContainsAsync(inv.InvbillNum);//结算分组对应结算零件
|
|
|
|
var adjlist = await _adjRepository.Where(p => p.OldInvBillNum == inv.InvbillNum).ToListAsync();//调整表明细
|
|
|
@ -206,7 +206,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"不存发票号为:{p_invbillnum}发票"); |
|
|
|
throw new UserFriendlyException($"不存发票号为:{p_invbillnum}发票", "400"); |
|
|
|
} |
|
|
|
//}
|
|
|
|
//else
|
|
|
@ -228,7 +228,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
var adjlist = ObjectMapper.Map<List<PUB_ADJ_DETAIL_DTO>, List<PUB_ADJ_DETAIL>>(p_list); |
|
|
|
if (adjlist == null && adjlist.Count == 0) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"调整表无数据!"); |
|
|
|
throw new UserFriendlyException($"调整表无数据!", "400"); |
|
|
|
} |
|
|
|
var first = p_list.FirstOrDefault(); |
|
|
|
var invbillnum = first.InvBillNum; |
|
|
@ -241,7 +241,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
|
|
|
|
if(settle==null) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException( $"选择发票:{invbillnum}对应的可结算单不粗拿在在请检查!"); |
|
|
|
throw new UserFriendlyException( $"选择发票:{invbillnum}对应的可结算单不粗拿在在请检查!", "400"); |
|
|
|
} |
|
|
|
|
|
|
|
version=settle.Version; |
|
|
@ -249,11 +249,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
{ |
|
|
|
if (inv.InvoiceState == InvoiceBillState.报废) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException( $"选择发票:{invbillnum}状态为报废状态不能重开!"); |
|
|
|
throw new UserFriendlyException( $"选择发票:{invbillnum}状态为报废状态不能重开!", "400"); |
|
|
|
} |
|
|
|
if (inv.State == SettleBillState.商务已审核 || inv.State == SettleBillState.已开票) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException( $"选择发票:{invbillnum}状态在财务审核后可以报废重开,之前不能重开可以退回!"); |
|
|
|
throw new UserFriendlyException( $"选择发票:{invbillnum}状态在财务审核后可以报废重开,之前不能重开可以退回!", "400"); |
|
|
|
} |
|
|
|
var bbaclist = await _bbacMng.GetContainsAsync(inv.InvbillNum);//发票对应结算零件
|
|
|
|
// var adjlist = await _adjRepository.Where(p => p.OldInvBillNum == inv.InvbillNum).ToListAsync();//调整表明细
|
|
|
@ -334,7 +334,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new UserFriendlyException( $"不存发票号为:{invbillnum}发票"); |
|
|
|
throw new UserFriendlyException( $"不存发票号为:{invbillnum}发票", "400"); |
|
|
|
} |
|
|
|
//}
|
|
|
|
//else
|
|
|
@ -364,7 +364,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
var adjlist=ObjectMapper.Map<List<PUB_ADJ_DETAIL_DTO>, List<PUB_ADJ_DETAIL>>(p_list); |
|
|
|
if (adjlist == null && adjlist.Count==0) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"调整表无数据!"); |
|
|
|
throw new UserFriendlyException($"调整表无数据!", "400"); |
|
|
|
} |
|
|
|
var first = p_list.FirstOrDefault(); |
|
|
|
var invbillnum = first.InvBillNum; |
|
|
@ -379,21 +379,21 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
|
|
|
|
if (settle == null) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"选择发票:{invbillnum}对应的可结算单不在请检查!"); |
|
|
|
throw new UserFriendlyException($"选择发票:{invbillnum}对应的可结算单不在请检查!", "400"); |
|
|
|
} |
|
|
|
version = settle.Version; |
|
|
|
if (inv != null) |
|
|
|
{ |
|
|
|
if (inv.InvoiceState == InvoiceBillState.报废) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"选择发票:{invbillnum}状态为报废状态不能重开!"); |
|
|
|
throw new UserFriendlyException($"选择发票:{invbillnum}状态为报废状态不能重开!", "400"); |
|
|
|
} |
|
|
|
if (inv.State == SettleBillState.商务已审核 || inv.State == SettleBillState.已开票) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"选择发票:{invbillnum}状态在财务审核后可以报废重开,之前请退回重开!"); |
|
|
|
throw new UserFriendlyException($"选择发票:{invbillnum}状态在财务审核后可以报废重开,之前请退回重开!", "400"); |
|
|
|
} |
|
|
|
|
|
|
|
var bbaclist = await _bbacMng.GetContainsAsync(inv.InvbillNum);//结算分组对应结算零件
|
|
|
|
var bbaclist = await _bbacMng.GetContainsAsync(inv.InvbillNum, "400");//结算分组对应结算零件
|
|
|
|
//var adjlist = await _adjRepository.Where(p => p.OldInvBillNum == inv.InvbillNum).ToListAsync();//调整表明细
|
|
|
|
if (adjlist != null && adjlist.Count() > 0) |
|
|
|
{ |
|
|
@ -473,7 +473,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"不存发票号为:{invbillnum}发票"); |
|
|
|
throw new UserFriendlyException($"不存发票号为:{invbillnum}发票", "400"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -499,7 +499,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
var adjlist = ObjectMapper.Map<List<PUB_ADJ_DETAIL_DTO>, List<PUB_ADJ_DETAIL>>(p_list); |
|
|
|
if (adjlist == null && adjlist.Count == 0) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"调整表无数据!"); |
|
|
|
throw new UserFriendlyException($"调整表无数据!", "400"); |
|
|
|
} |
|
|
|
var first = p_list.FirstOrDefault(); |
|
|
|
var invbillnum = first.InvBillNum; |
|
|
@ -514,18 +514,18 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
|
|
|
|
if (settle == null) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"选择发票:{invbillnum}对应的可结算单不在请检查!"); |
|
|
|
throw new UserFriendlyException($"选择发票:{invbillnum}对应的可结算单不在请检查!", "400"); |
|
|
|
} |
|
|
|
version = settle.Version; |
|
|
|
if (inv != null) |
|
|
|
{ |
|
|
|
if (inv.InvoiceState == InvoiceBillState.报废) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"选择发票:{invbillnum}状态为报废状态不能重开!"); |
|
|
|
throw new UserFriendlyException($"选择发票:{invbillnum}状态为报废状态不能重开!", "400"); |
|
|
|
} |
|
|
|
if (inv.State == SettleBillState.商务已审核 || inv.State == SettleBillState.已开票) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"选择发票:{invbillnum}状态在财务审核后可以报废重开,之前请退回重开!"); |
|
|
|
throw new UserFriendlyException($"选择发票:{invbillnum}状态在财务审核后可以报废重开,之前请退回重开!", "400"); |
|
|
|
} |
|
|
|
var bbaclist = await _bbacMng.GetContainsAsync(inv.InvbillNum);//结算分组对应结算零件 //var adjlist = await _adjRepository.Where(p => p.OldInvBillNum == inv.InvbillNum).ToListAsync();//调整表明细
|
|
|
|
if (adjlist != null && adjlist.Count() > 0) |
|
|
@ -641,7 +641,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"不存发票号为:{invbillnum}发票"); |
|
|
|
throw new UserFriendlyException($"不存发票号为:{invbillnum}发票", "400"); |
|
|
|
} |
|
|
|
//}
|
|
|
|
//else
|
|
|
|