...
|
...
|
@@ -53,7 +53,7 @@ func AllBonusStatics(orders []*domain.OrderBase, action int) (bonus protocol.Bon |
|
|
o := orders[i]
|
|
|
bonus.Received = utils.Decimal(bonus.Received + o.OrderBonusReceive())
|
|
|
bonus.Outstanding = utils.Decimal(bonus.Outstanding + o.OrderBonusWait())
|
|
|
bonus.Receivable = utils.Decimal(bonus.Receivable + o.PlanPartnerBonus)
|
|
|
bonus.Receivable = utils.Decimal(bonus.Receivable + o.OrderTotalBonus())
|
|
|
}
|
|
|
return
|
|
|
}
|
...
|
...
|
@@ -64,7 +64,7 @@ func QuartersBonusStatics(orders []*domain.OrderBase, action int) (bonus []proto |
|
|
for i := range orders {
|
|
|
o := orders[i]
|
|
|
quarter := quarter(o.CreateTime)
|
|
|
bonus[quarter].Receivable = utils.Decimal(bonus[quarter].Receivable + o.PlanPartnerBonus)
|
|
|
bonus[quarter].Receivable = utils.Decimal(bonus[quarter].Receivable + o.OrderTotalBonus())
|
|
|
bonus[quarter].Received = utils.Decimal(bonus[quarter].Received + o.OrderBonusReceive())
|
|
|
bonus[quarter].Outstanding = utils.Decimal(bonus[quarter].Outstanding + o.OrderBonusWait())
|
|
|
//bonus[quarter].Expend = utils.Decimal(bonus[quarter].Expend + o.OrderBonusOutstanding())
|
...
|
...
|
@@ -122,11 +122,12 @@ func OrderList(header *protocol.RequestHeader, request *protocol.DividendOrdersR |
|
|
|
|
|
for i := range orders {
|
|
|
o := orders[i]
|
|
|
s := o.OrderBonusStatic()
|
|
|
item := &protocol.DividendOrderListItem{
|
|
|
Id: o.Id,
|
|
|
DeliveryNo: o.DeliveryCode,
|
|
|
OrderAmount: o.PlanOrderAmount,
|
|
|
DividendReceivable: utils.Decimal(o.OrderTotalBonus()),
|
|
|
OrderAmount: s.PlanOrderAmount, //s.OrderAmount(),
|
|
|
DividendReceivable: utils.Decimal(s.OrderTotalBonus()),
|
|
|
}
|
|
|
rsp.List = append(rsp.List, item)
|
|
|
}
|
...
|
...
|
|