|
|
@ -216,7 +216,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
} |
|
|
|
if (errors.Count > 0) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"发票{string.Join(",", errors)}当前状态不是【商务已审核】,无法设置成【财务已审核】状态"); |
|
|
|
throw new UserFriendlyException($"发票{string.Join(",", errors)}当前状态不是【商务已审核】,无法设置成【财务已审核】状态", "400"); |
|
|
|
} |
|
|
|
break; |
|
|
|
case SettleBillState.商务已审核: |
|
|
@ -235,7 +235,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
} |
|
|
|
if (errors.Count > 0) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"发票{string.Join(",", errors)}当前状态不是【已开票】,无法设置成【商务已审核】状态"); |
|
|
|
throw new UserFriendlyException($"发票{string.Join(",", errors)}当前状态不是【已开票】,无法设置成【商务已审核】状态", "400"); |
|
|
|
} |
|
|
|
break; |
|
|
|
case SettleBillState.已扣减: |
|
|
@ -254,7 +254,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
} |
|
|
|
if (errors.Count > 0) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"发票{string.Join(",", errors)}当前状态不是【客户已收票】,无法设置成【已扣减】状态"); |
|
|
|
throw new UserFriendlyException($"发票{string.Join(",", errors)}当前状态不是【客户已收票】,无法设置成【已扣减】状态", "400"); |
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
@ -265,7 +265,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"选择发票不存在"); |
|
|
|
throw new UserFriendlyException($"选择发票不存在", "400"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -286,7 +286,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
var count = appls.Select(p => p.State).Distinct().Count(); |
|
|
|
if (count > 1) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"提交发票状态不一致"); |
|
|
|
throw new UserFriendlyException($"提交发票状态不一致", "400"); |
|
|
|
} |
|
|
|
var nols = appls.Where(p => p.InvoiceState == InvoiceBillState.报废 || p.State == SettleBillState.客户已收票).ToList(); |
|
|
|
if (nols.Count > 0) |
|
|
@ -312,7 +312,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
} |
|
|
|
if (errors.Count > 0) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"发票{string.Join(",", errors)}当前状态不是【财务已审核】,无法设置成【商务已审核】状态"); |
|
|
|
throw new UserFriendlyException($"发票{string.Join(",", errors)}当前状态不是【财务已审核】,无法设置成【商务已审核】状态", "400"); |
|
|
|
} |
|
|
|
break; |
|
|
|
case SettleBillState.已开票: |
|
|
@ -331,7 +331,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
} |
|
|
|
if (errors.Count > 0) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"发票{string.Join(",", errors)}当前状态不是【商务已审核】,无法设置成【已开票】状态"); |
|
|
|
throw new UserFriendlyException($"发票{string.Join(",", errors)}当前状态不是【商务已审核】,无法设置成【已开票】状态", "400"); |
|
|
|
} |
|
|
|
break; |
|
|
|
case SettleBillState.客户已收票: |
|
|
@ -350,7 +350,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
} |
|
|
|
if (errors.Count > 0) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"发票{string.Join(",", errors)}当前状态不是【已扣减】,无法设置成【客户已收票】状态"); |
|
|
|
throw new UserFriendlyException($"发票{string.Join(",", errors)}当前状态不是【已扣减】,无法设置成【客户已收票】状态", "400"); |
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
@ -361,7 +361,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"选择发票不存在"); |
|
|
|
throw new UserFriendlyException($"选择发票不存在", "400"); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
@ -598,7 +598,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
if (pdlist != null && pdlist.Count > 0) |
|
|
|
{ |
|
|
|
var invs = pdlist.Select(p => p.BillNum).ToList(); |
|
|
|
throw new UserFriendlyException($"发票{string.Join(",", invs)}已经生成待扣减过不能再次提交"); |
|
|
|
throw new UserFriendlyException($"发票{string.Join(",", invs)}已经生成待扣减过不能再次提交", "400"); |
|
|
|
} |
|
|
|
var parentList = invList.Select(p => p.ParentInvbillNum).ToList();//所有发票存在父发票号
|
|
|
|
List<string> oldinvs = new List<string>(); |
|
|
@ -748,7 +748,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
if (pdlist != null && pdlist.Count > 0) |
|
|
|
{ |
|
|
|
var invs = pdlist.Select(p => p.BillNum).ToList(); |
|
|
|
throw new UserFriendlyException($"发票{string.Join(",", invs)}已经生成待扣减过不能再次提交"); |
|
|
|
throw new UserFriendlyException($"发票{string.Join(",", invs)}已经生成待扣减过不能再次提交", "400"); |
|
|
|
} |
|
|
|
var parentList = invList.Select(p => p.ParentInvbillNum).ToList();//所有发票存在父发票号
|
|
|
|
List<string> oldinvs = new List<string>(); |
|
|
@ -920,12 +920,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
var count=ls.Select(p => p.State).Distinct().Count(); |
|
|
|
if (count > 1) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"发票分组{groupbillNum}包含发票不是同一状态不能退回"); |
|
|
|
throw new UserFriendlyException($"发票分组{groupbillNum}包含发票不是同一状态不能退回", "400"); |
|
|
|
} |
|
|
|
var first = ls.FirstOrDefault(); |
|
|
|
if (first.State == SettleBillState.客户已收票 || first.State == SettleBillState.已扣减) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException( $"发票分组{groupbillNum}客户已经是客户已收票不能退回"); |
|
|
|
throw new UserFriendlyException( $"发票分组{groupbillNum}客户已经是客户已收票不能退回", "400"); |
|
|
|
} |
|
|
|
foreach (var p_entity in ls) |
|
|
|
{ |
|
|
|