Commit 24667844 authored by liudong1993's avatar liudong1993

1

parent f358c4de
......@@ -949,7 +949,7 @@ namespace Edu.Module.Course
string Remark = "";
//当前订单的返佣
decimal bdCommission = bdList.Where(x => x.OrderId == qitem.OrderId).Sum(x => x.CommissionMoeny);
decimal orderYJ = qitem.PreferPrice - qitem.DiscountMoney - qitem.PlatformTax - qitem.CoursewareFee - qitem.TextbookFee - bdCommission;
decimal orderYJ = qitem.PreferPrice - qitem.DiscountMoney - qitem.PlatformTax - qitem.TextbookFee - bdCommission;
if (qitem.JoinType == Common.Enum.Sale.OrderJoinTypeEnum.RenewOrder)
{
//续费订单
......@@ -1027,7 +1027,7 @@ namespace Edu.Module.Course
{
var orderChildList = teaOrderList.Where(x => x.HelpEnterId == teaId).ToList();
//计算老师业绩
decimal YjMoney = orderChildList.Sum(x => x.PreferPrice - x.DiscountMoney - x.PlatformTax - x.CoursewareFee - x.TextbookFee);
decimal YjMoney = orderChildList.Sum(x => x.PreferPrice - x.DiscountMoney - x.PlatformTax - x.TextbookFee);
//根据业绩所在区间 查询比例
var rateModel = item.RateList.Where(x => x.StartValue < YjMoney && (x.EndValue >= YjMoney || x.EndValue == -1)).FirstOrDefault();
if (rateModel != null)
......@@ -1036,7 +1036,7 @@ namespace Edu.Module.Course
{
//当前订单的业绩
decimal bdCommission = bdList.Where(x => x.OrderId == qitem.OrderId).Sum(x => x.CommissionMoeny);
decimal orderYj = qitem.PreferPrice - qitem.DiscountMoney - qitem.PlatformTax - qitem.CoursewareFee - qitem.TextbookFee;
decimal orderYj = qitem.PreferPrice - qitem.DiscountMoney - qitem.PlatformTax - qitem.TextbookFee;
AchEmpList.Add(new RB_Sell_Achievements_Emp_ViewModel()
{
EmpId = qitem.HelpEnterId,
......@@ -1093,7 +1093,7 @@ namespace Edu.Module.Course
//计算一下 退费金额,要算入当期的业绩里
decimal TRefund = ROrderList.Where(x => ("," + item.EmpIds + ",").Contains("," + x.EmpId + ",")).Sum(x => x.Remark.Contains("销售额减半计算") ? (x.OrderMoney - x.OrderSaleMoney) / 2 : x.OrderMoney - x.OrderSaleMoney);
//计算市场业绩 如果有 老师提成,
decimal TotalYj = sellOrderList.Sum(x => x.HelpEnterId > 0 ? (x.PreferPrice - x.DiscountMoney - x.PlatformTax - x.CoursewareFee - x.TextbookFee) / 2 : x.PreferPrice - x.DiscountMoney - x.PlatformTax - x.CoursewareFee - x.TextbookFee);
decimal TotalYj = sellOrderList.Sum(x => x.HelpEnterId > 0 ? (x.PreferPrice - x.DiscountMoney - x.PlatformTax - x.TextbookFee) / 2 : x.PreferPrice - x.DiscountMoney - x.PlatformTax - x.TextbookFee);
//计算订单返佣
decimal bdCommTotal = bdList.Where(x => sellOrderList.Select(x => x.OrderId).Contains(x.OrderId)).Sum(x => x.CommissionMoeny);
TotalYj -= bdCommTotal;// 需要减去 返佣的部分
......@@ -1120,7 +1120,7 @@ namespace Edu.Module.Course
//当前订单的业绩
decimal bdCommission = bdList.Where(x => x.OrderId == qitem.OrderId).Sum(x => x.CommissionMoeny);
//decimal tCommission = AchEmpList.Where(x => x.Type == 3 && x.OrderId == qitem.OrderId).Sum(x => x.PushMoney);
decimal orderYj = qitem.PreferPrice - qitem.DiscountMoney - qitem.PlatformTax - qitem.CoursewareFee - qitem.TextbookFee - bdCommission;
decimal orderYj = qitem.PreferPrice - qitem.DiscountMoney - qitem.PlatformTax - qitem.TextbookFee - bdCommission;
if (qitem.HelpEnterId > 0) { orderYj = orderYj / 2; }
AchEmpList.Add(new RB_Sell_Achievements_Emp_ViewModel()
{
......@@ -1151,7 +1151,7 @@ namespace Edu.Module.Course
{
//当前订单的业绩
decimal bdCommission = bdList.Where(x => x.OrderId == qitem.OrderId).Sum(x => x.CommissionMoeny);
decimal orderYj = qitem.PreferPrice - qitem.DiscountMoney - qitem.PlatformTax - qitem.CoursewareFee - qitem.TextbookFee - bdCommission;
decimal orderYj = qitem.PreferPrice - qitem.DiscountMoney - qitem.PlatformTax - qitem.TextbookFee - bdCommission;
if (qitem.HelpEnterId > 0) { orderYj = orderYj / 2; }
AchEmpList.Add(new RB_Sell_Achievements_Emp_ViewModel()
{
......@@ -1568,7 +1568,7 @@ namespace Edu.Module.Course
PeriodsId = 0,
SaleMoney = 0,
Remark = "退款回扣提成,此单" + month + "退款:" + (qitem.OrderMoney - qitem.OrderSaleMoney),
OrderSaleMoney = qitem.OrderMoney,
OrderSaleMoney = qitem.OrderMoney - qitem.OrderSaleMoney,
PeopleNumMoney = qitem.Refund > 0 ? 0 - qitem.PeopleNumMoney : 0
});
}
......
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