Commit 69f54b5f authored by liudong1993's avatar liudong1993

发票

parent 240f092c
......@@ -79,5 +79,10 @@ namespace REBORN.Model.Finance
/// 节点使用类型 枚举 多个英文逗号分隔
/// </summary>
public string NodeType { get; set; }
/// <summary>
/// 发票审核节点 =1是
/// </summary>
public int InvoiceNode { get; set; }
}
}
\ No newline at end of file
......@@ -117,5 +117,10 @@ namespace REBORN.Model.Finance
/// 已审核人 1,2,3 以逗号分割
/// </summary>
public string AuditedId { get; set; }
/// <summary>
/// 发票审核节点 =1是
/// </summary>
public int InvoiceNode { get; set; }
}
}
\ No newline at end of file
......@@ -3706,7 +3706,7 @@ namespace REBORN.Module.FinanceModule
{ nameof(RB_Finance.KingdeeClientID), KingdeeClientID} //2024-05-29 add by:W
};
//判断是否需要发票
if ((KingdeeInvoice == 1 || KingdeeInvoice == 3) && (ToAuditFlow?.FirstOrDefault()?.AuditDescription ?? "").Contains("会计") && KJInvoice == 0)
if ((KingdeeInvoice == 1 || KingdeeInvoice == 3) && (ToAuditFlow?.FirstOrDefault()?.InvoiceNode ?? 0) == 1 && KJInvoice == 0)
{
var invoiceVoucherInfo = voucherRepository.GetList(new RB_Voucher { VoucherType = 1, FinanceId = WorkFlowId });//并且发票已上传直接通过
if (invoiceVoucherInfo != null && invoiceVoucherInfo.Any())
......@@ -3715,6 +3715,10 @@ namespace REBORN.Module.FinanceModule
keyValues.Add(nameof(RB_Finance.InvoiceExamineBy), userInfo.EmployeeId);
}
}
else if ((KingdeeInvoice == 1 || KingdeeInvoice == 3) && (ToAuditFlow?.FirstOrDefault()?.InvoiceNode ?? 0) == 1)
{
keyValues.Add(nameof(RB_Finance.InvoiceExamineBy), userInfo.EmployeeId);
}
if ((finance.Type.Value == WFTempLateClassEnum.IN || finance.Type.Value == WFTempLateClassEnum.OUT) && (ToAuditFlow?.FirstOrDefault()?.AuditDescription ?? "").Contains("会计") && finance.HelpBranchId != HelpBranchId)
{
......
......@@ -3334,7 +3334,7 @@ namespace REBORN.Module.FinanceModule
}
if (audititem.AuditDescription.Contains("会计") && audititem.Stauts == WFRrocessStatus.AuditThrough)
if (audititem.InvoiceNode == 1 && audititem.Stauts == WFRrocessStatus.AuditThrough)
{
if (!string.IsNullOrWhiteSpace(audititem.AuditedId))
{
......@@ -3348,7 +3348,7 @@ namespace REBORN.Module.FinanceModule
#endregion
model.AuditSteps.Add(audititem);
}
if (auditSteps != null && !auditSteps.Any(x => x.AuditDescription.Contains("会计")))//如果审核节点里 没有抓到会计 , 就默认= 财务部何娟
if (auditSteps != null && !auditSteps.Any(x => x.InvoiceNode == 1))//如果审核节点里 没有抓到会计 , 就默认= 财务部何娟
{
if (auditSteps.Where(x => x.Stauts == WFRrocessStatus.AuditThrough).Count() == auditSteps.Count())
{
......
......@@ -292,7 +292,8 @@ namespace REBORN.Module.FinanceModule
ConditionId = demodel.Workflow_Condition.Id,
SpecialNode = item.SpecialNode,
RoleOrInitiatorName = item.RoleOrInitiatorName,
NodeType = item.NodeType
NodeType = item.NodeType,
InvoiceNode = item.InvoiceNode
};
int auditId = respositoryAudit.Insert(auditmodel, trans);
if (item.AuditType == 2)
......
......@@ -2007,7 +2007,7 @@ namespace REBORN.Services.FinanceService
IsShowGuestUrl = model.detailList.Count(x => x.CostTypeId == 57 || x.CostTypeId == 59 || x.CostTypeId == 55 || x.CostTypeId == 58 || x.CostTypeId == 108 || x.CostTypeId == 63 || x.CostTypeId == 188 || x.CostTypeId == 1510 || x.CostTypeId == 1511 || x.CostTypeId == 1513) > 0 ? 1 : 0,
IsShowDiJieChargeUrl = model.detailList.Count(x => x.CostTypeId == 56) > 0 ? 1 : 0,//ld 2019-11-26 增加
IsShowFY = model.detailList.Any(x => x.CostTypeId == 1851 || x.CostTypeId == 1852 || x.CostTypeId == 1853) ? 1 : 0,
AuditSteps = model.AuditSteps?.Select(y => new { y.Id, y.Sort, y.AuditType, y.AuditWay, y.SpecialNode, AuditWayName = EnumHelper.GetEnumName(y.AuditWay), y.NextStep, AuditStatus = EnumHelper.GetEnumName(y.Stauts), Status = y.Stauts, y.AuditDescription, AuditRecordList = y.AuditRecordList?.Select(z => new { ID = z.Id, z.AuditEmId, AuditName = y.Sort == 0 ? (!string.IsNullOrEmpty(model.RB_CreateByName) ? model.RB_CreateByName : (CacheManager.User.RbUserCache.GetEmployee(model.CreateBy.Value)?.EmName + (new CacheManager.User.RbEmployeeMongoCache().GetEmployee(model.CreateBy.Value)?.IsLeave == 1 ? "(已离职)" : ""))) : z.AuditEmName, AduitDate = z.UpdateTime.HasValue ? z.UpdateTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : "", z.CareOfRemarks, Remark = z.Description, AuditStatusStr = z.AuditStatus != null ? EnumHelper.GetEnumName(z.AuditStatus) : "", z.AuditStatus, Image = z.imgList?.Select(q => Config.GetFileUrl(q)) }) }),
AuditSteps = model.AuditSteps?.Select(y => new { y.Id, y.Sort, y.AuditType, y.AuditWay, y.SpecialNode, y.InvoiceNode, AuditWayName = EnumHelper.GetEnumName(y.AuditWay), y.NextStep, AuditStatus = EnumHelper.GetEnumName(y.Stauts), Status = y.Stauts, y.AuditDescription, AuditRecordList = y.AuditRecordList?.Select(z => new { ID = z.Id, z.AuditEmId, AuditName = y.Sort == 0 ? (!string.IsNullOrEmpty(model.RB_CreateByName) ? model.RB_CreateByName : (CacheManager.User.RbUserCache.GetEmployee(model.CreateBy.Value)?.EmName + (new CacheManager.User.RbEmployeeMongoCache().GetEmployee(model.CreateBy.Value)?.IsLeave == 1 ? "(已离职)" : ""))) : z.AuditEmName, AduitDate = z.UpdateTime.HasValue ? z.UpdateTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : "", z.CareOfRemarks, Remark = z.Description, AuditStatusStr = z.AuditStatus != null ? EnumHelper.GetEnumName(z.AuditStatus) : "", z.AuditStatus, Image = z.imgList?.Select(q => Config.GetFileUrl(q)) }) }),
TradeDetailList = model.TradeDetailList?.Select(z => new { z.OrderId, z.AccountId, z.BankName, z.AccountTypeName, z.BackNo, z.BankId, z.Mch_Id, z.AccountTypeId, z.AccountName, z.RefundTrade_Order, z.OrderSource, z.Pay_Order, z.Trade_Order, z.Third_Order, z.Pay_Way, Pay_WayName = ((Common.Enum.ZXOnlinePay.PayTypeEnum)((int)z.Pay_Way)).GetEnumName(), z.Pay_Date, Pay_DateStr = z.Pay_Date?.ToString("yyyy-MM-dd HH:mm"), z.Money, z.CanRefundMoney, RefundMoney = z.RefundMoney ?? 0, z.Currency_Type, z.Type }),
DijieBathFinanceList = model.DijieBathFinanceList?.Select(x => new
{
......
......@@ -280,7 +280,7 @@ namespace REBORN.Services.FinanceService
model.TemplateSorce,
PropertyType = model.PropertyType.HasValue ? (int)model.PropertyType : 0,
list = model.list == null || model.list.Count() == 0 ? new List<int> { -1 } : model.list,
Workflow_Condition = new { model.Workflow_Condition.Id, AuditUserList = model.Workflow_Condition.AuditUserList?.Select(z => new { z.Id, z.EmployeeId, z.Sort, emName = !string.IsNullOrEmpty(z.EmployeeIdName) ? z.EmployeeIdName : CacheManager.User.RbUserCache.GetEmployee(z.EmployeeId)?.EmName }), AuditList = model.Workflow_Condition.AuditList?.Select(x => new { x.Id, x.AuditType, x.SpecialNode, x.AduitName, x.AuditWay, x.Sort, x.RoleOrInitiator, x.RoleOrInitiatorName, x.AuditDescription, x.NodeType, x.NodeTypeList, AuditUserList = x.AuditUserList?.Select(y => new { y.Id, y.EmployeeId, y.Sort, y.EmName }) }) },
Workflow_Condition = new { model.Workflow_Condition.Id, AuditUserList = model.Workflow_Condition.AuditUserList?.Select(z => new { z.Id, z.EmployeeId, z.Sort, emName = !string.IsNullOrEmpty(z.EmployeeIdName) ? z.EmployeeIdName : CacheManager.User.RbUserCache.GetEmployee(z.EmployeeId)?.EmName }), AuditList = model.Workflow_Condition.AuditList?.Select(x => new { x.Id, x.AuditType, x.SpecialNode, x.AduitName, x.AuditWay, x.Sort, x.RoleOrInitiator, x.RoleOrInitiatorName, x.AuditDescription, x.NodeType, x.InvoiceNode, x.NodeTypeList, AuditUserList = x.AuditUserList?.Select(y => new { y.Id, y.EmployeeId, y.Sort, y.EmName }) }) },
IsShow = model.IsShow ?? 1,
model.ShowEmployeeList,
model.ShowDepartmentList,
......@@ -463,7 +463,7 @@ namespace REBORN.Services.FinanceService
else
{
var model = module.GetTemplateList(new Rb_Workflow_Template_Finance_Extend() { Id = ID }, true)?.FirstOrDefault();
return ApiResult.Success("", model?.Workflow_Condition?.AuditList?.Select(x => new { x.Id, x.AuditDescription, x.AuditWay, AuditWayName = EnumHelper.GetEnumName(x.AuditWay.Value), x.NodeType, x.NodeTypeList }));
return ApiResult.Success("", model?.Workflow_Condition?.AuditList?.Select(x => new { x.Id, x.AuditDescription, x.AuditWay, AuditWayName = EnumHelper.GetEnumName(x.AuditWay.Value), x.NodeType, x.InvoiceNode, x.NodeTypeList }));
}
}
/// <summary>
......
......@@ -3238,6 +3238,7 @@ namespace REBORN.Services.SellService
y.LossMoney,
y.Remark
}),
DepartTime = model.DepartTime.HasValue ? model.DepartTime.Value.ToString("yyyy-MM-dd") : "",
model.Meet,
model.FinalPriceTips,
OrderGuestList = model.OrderGuestList.Select(x => new
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment