Commit 0a02ab0b authored by liudong1993's avatar liudong1993

调整留学提成

parent d0caed85
......@@ -2959,26 +2959,19 @@ namespace Edu.Module.Course
var ruleModel = rulelist.Where(x => x.OrderType == (int)item.OrderNature).FirstOrDefault();
if (ruleModel == null) { continue; }
var flist = financeList.Where(x => x.OrderID == item.OrderId).ToList();
decimal TotalMoney = 0;//销售额/利润
if (ruleModel.CommissionType == 1)
{
//销售额
decimal XSEMoney = item.Income + item.PlatformTax;
if (financeList.Where(x => x.OtherType == 45).Any())
{
//有成本单据
XSEMoney -= financeList.Where(x => x.OtherType != 45).Sum(x => x.Money ?? 0);//排除成本的
}
else
{
XSEMoney -= item.Refund;
}
XSEMoney -= flist.Where(x => x.OtherType != 45).Sum(x => x.Money ?? 0);//排除成本的
TotalMoney = XSEMoney;
}
else
{
//利润
decimal LRMoney = item.Income + item.PlatformTax - item.Refund;//利润有减成本
decimal LRMoney = item.Income - flist.Sum(x => x.Money ?? 0);//利润=实收减成本退款
TotalMoney = LRMoney;
}
......
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