Commit 32096aff authored by liudong1993's avatar liudong1993

退款单据 手续费

parent 96425192
...@@ -4993,6 +4993,13 @@ namespace Mall.Module.Product ...@@ -4993,6 +4993,13 @@ namespace Mall.Module.Product
try try
{ {
decimal Money = dmodel.Refund ?? 0; decimal Money = dmodel.Refund ?? 0;
decimal Rate = Convert.ToDecimal(Config.SettlementRate);
decimal Fee = 0;
if (Rate > 0)
{
Fee = Math.Round(Money * Rate / 1000, 2, MidpointRounding.AwayFromZero);
Money -= Fee;
}
//查询用户 //查询用户
var umodel = member_UserRepository.GetEntity(dmodel.UserId); var umodel = member_UserRepository.GetEntity(dmodel.UserId);
if (umodel == null) { return false; } if (umodel == null) { return false; }
...@@ -5001,7 +5008,7 @@ namespace Mall.Module.Product ...@@ -5001,7 +5008,7 @@ namespace Mall.Module.Product
//先查询规则 //先查询规则
var financeConfigurineList = financeConfigurineRepository.GetList(new Model.Extend.Finance.RB_Finance_Configurine_Extend { Type = 3 }); var financeConfigurineList = financeConfigurineRepository.GetList(new Model.Extend.Finance.RB_Finance_Configurine_Extend { Type = 3 });
string dstr = "已收货,客人付款:" + (dmodel.Income ?? 0) + "金额,申请退款:" + (dmodel.Refund ?? 0); string dstr = "已收货,客人付款:" + (dmodel.Income ?? 0) + "金额,申请退款:" + (dmodel.Refund ?? 0)+",手续费:"+ Fee;
if (financeConfigurineList != null && financeConfigurineList.Any()) if (financeConfigurineList != null && financeConfigurineList.Any())
{ {
var item = financeConfigurineList.FirstOrDefault(); var item = financeConfigurineList.FirstOrDefault();
...@@ -5930,14 +5937,20 @@ namespace Mall.Module.Product ...@@ -5930,14 +5937,20 @@ namespace Mall.Module.Product
var flag = false; var flag = false;
try try
{ {
decimal Rate = Convert.ToDecimal(Config.SettlementRate);
decimal Money = omodel.Income ?? 0; decimal Money = omodel.Income ?? 0;
decimal Fee = 0;
if (Rate > 0) {
Fee = Math.Round(Money * Rate / 1000, 2, MidpointRounding.AwayFromZero);
Money -= Fee;
}
//查询用户 //查询用户
var umodel = member_UserRepository.GetEntity(omodel.UserId); var umodel = member_UserRepository.GetEntity(omodel.UserId);
if (umodel == null) { return false; } if (umodel == null) { return false; }
//先查询规则 //先查询规则
var financeConfigurineList = financeConfigurineRepository.GetList(new Model.Extend.Finance.RB_Finance_Configurine_Extend { Type = 3 }); var financeConfigurineList = financeConfigurineRepository.GetList(new Model.Extend.Finance.RB_Finance_Configurine_Extend { Type = 3 });
string dstr = "客人付款:" + (omodel.Income ?? 0) + "金额,退款:" + (omodel.Income ?? 0); string dstr = "客人付款:" + (omodel.Income ?? 0) + "金额,退款:" + (omodel.Income ?? 0) + ",手续费:" + Fee;
if (financeConfigurineList != null && financeConfigurineList.Any()) if (financeConfigurineList != null && financeConfigurineList.Any())
{ {
var item = financeConfigurineList.FirstOrDefault(); var item = financeConfigurineList.FirstOrDefault();
......
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