|
|
@ -82,18 +82,18 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
|
|
|
|
if (settle == null) |
|
|
|
{ |
|
|
|
throw new BusinessException("8989", $"选择发票:{invbillnum}对应的可结算单不在请检查!"); |
|
|
|
throw new UserFriendlyException( $"选择发票:{invbillnum}对应的可结算单不在请检查!","400"); |
|
|
|
} |
|
|
|
version = settle.Version; |
|
|
|
if (inv != null) |
|
|
|
{ |
|
|
|
if (inv.InvoiceState == InvoiceBillState.报废) |
|
|
|
{ |
|
|
|
throw new BusinessException("8989", $"选择发票:{invbillnum}状态为报废状态不能重开!"); |
|
|
|
throw new UserFriendlyException($"选择发票:{invbillnum}状态为报废状态不能重开!","400"); |
|
|
|
} |
|
|
|
if (inv.State == SettleBillState.商务已审核 || inv.State == SettleBillState.已开票) |
|
|
|
{ |
|
|
|
throw new BusinessException("8989", $"选择发票:{invbillnum}状态在财务审核后可以报废重开,之前不能重开可以退回!"); |
|
|
|
throw new UserFriendlyException($"选择发票:{invbillnum}状态在财务审核后可以报废重开,之前不能重开可以退回!","400"); |
|
|
|
} |
|
|
|
var publist = await _pubMng.GetContainsAsync(inv.InvbillNum);//结算分组对应结算零件
|
|
|
|
//var adjlist = await _adjRepository.Where(p => p.OldInvBillNum == inv.InvbillNum).ToListAsync();//调整表明细
|
|
|
|