作者 tangxvhui

Merge branch 'dev' of http://gitlab.fjmaimaimai.com/mmm-go/partnermg into dev

... ... @@ -196,16 +196,11 @@ func (OrderPaymentService *OrderPaymentService) ListDividendOrders(listOrderPaym
CreateTime: order.CreateAt.Local().Format("2006-01-02 15:04:05"),
PartnerName: order.PartnerInfo.PartnerName,
DividendProportion: order.PartnerBonusPercent,
DividendsReceivable: utils.Decimal(order.OrderActualAmount * (order.PartnerBonusPercent / 100.0)),
DividendsReceivable: utils.Decimal(order.OrderAmount * (order.PartnerBonusPercent / 100.0)),
DividendSpending: 0,
ReceiveDividends: utils.Decimal(order.OrderPaymentAmount * (order.PartnerBonusPercent / 100.0)),
ReceiveDividends: utils.Decimal(order.OrderActualAmount * (order.PartnerBonusPercent / 100.0)),
CommissionProportion: order.SalesmanBonusPercent,
}
//if order.BonusStatus == domain.BonusPaid {
// item.StateOfPayment = "已支付分红"
//} else {
// item.StateOfPayment = "等待支付分红"
//}
if order.OrderActualAmount < order.OrderAmount {
item.DividendSpending = utils.Decimal((order.OrderAmount - order.OrderActualAmount) * (order.PartnerBonusPercent / 100.0))
}
... ...
... ... @@ -191,9 +191,9 @@ func (c *DividendsController) Detail() {
DividendProportion: order.PartnerBonusPercent,
DividendsReceivable: order.OrderTotalBonus() + order.OrderBonusOutstanding(), //应收分红 = 实收分红+分红支出
DividendSpending: order.OrderBonusOutstanding(), //分红支出
ReceiveDividends: order.OrderBonusReceive() + order.OrderBonusWait(), //应实收分红 = 已收分红 + 等待分红
ReceiveDividends: order.OrderTotalBonus(), //实收分红 = 实际金额 * 比例
NotReceivedDividends: order.OrderBonusWait(), //未收分红
RceivedDividends: order.OrderBonusReceive(),
RceivedDividends: order.OrderBonusReceive(), //已收分红
}
rsp.Commission = Commission{
CommissionProportion: order.SalesmanBonusPercent,
... ...