代理商退款
This commit is contained in:
@@ -933,24 +933,23 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
|
|||||||
|
|
||||||
var deduct_money = agentScoreEntity.score_value / lastOrder.AccountCount;
|
var deduct_money = agentScoreEntity.score_value / lastOrder.AccountCount;
|
||||||
|
|
||||||
var score_money = deduct_money - refundAmount;
|
//
|
||||||
if(score_money <= 0){
|
//使用天数 回补佣金
|
||||||
score_money = deduct_money;
|
var re_money = useDay * (agentPriceEntity.refund - refundDayPrice.Value) * accountInfo.ConnectCount;
|
||||||
} else {
|
//佣金
|
||||||
score_money = refundAmount;
|
var score_money = agentEntity.account - deduct_money + re_money;
|
||||||
}
|
|
||||||
|
|
||||||
var agnetScoreEntity = new AgentScoreEntity()
|
var agnetScoreEntity = new AgentScoreEntity()
|
||||||
{
|
{
|
||||||
agent_id = order.agent_id,
|
agent_id = order.agent_id,
|
||||||
order_id = order.Id,
|
order_id = order.Id,
|
||||||
score_type = 2,
|
score_type = 2,
|
||||||
score_value = score_money,
|
score_value = re_money - deduct_money,
|
||||||
remark = "客户退款" + account,
|
remark = "客户退款" + account,
|
||||||
agent_name = agentEntity.username,
|
agent_name = agentEntity.username,
|
||||||
op_user = order.UserName,
|
op_user = order.UserName,
|
||||||
rest_amount1 = agentEntity.account,
|
rest_amount1 = agentEntity.account,
|
||||||
rest_amount2 = agentEntity.account - score_money
|
rest_amount2 = score_money
|
||||||
};
|
};
|
||||||
|
|
||||||
agentEntity.account -= score_money;
|
agentEntity.account -= score_money;
|
||||||
|
|||||||
Reference in New Issue
Block a user