|
|
|
|
234
|
row.memberEarned = _.sumBy(bookie.false, item => {
|
234
|
row.memberEarned = _.sumBy(bookie.false, item => {
|
235
|
return Math.abs(item.earned)
|
235
|
return Math.abs(item.earned)
|
236
|
});
|
236
|
});
|
|
|
237
|
+ console.log('membeEarned', row.memberEarned)
|
237
|
row.memberServiceFees = _.sumBy(bookie.false, 'serviceFees')*this.data.secondLayer.feeRatio/100;
|
238
|
row.memberServiceFees = _.sumBy(bookie.false, 'serviceFees')*this.data.secondLayer.feeRatio/100;
|
238
|
}
|
239
|
}
|
239
|
if (bookie.true) {
|
240
|
if (bookie.true) {
|
240
|
row.bookieWagerFee = _.sumBy(bookie.true, (item) => {
|
241
|
row.bookieWagerFee = _.sumBy(bookie.true, (item) => {
|
241
|
return item.wagerServiceFees
|
242
|
return item.wagerServiceFees
|
242
|
}) * this.data.secondLayer.feeRatio/100;
|
243
|
}) * this.data.secondLayer.feeRatio/100;
|
243
|
- row.bookieEarned = _.sumBy(bookie.true, 'earned');
|
|
|
|
|
244
|
+ row.bookieEarned = _.sumBy(bookie.true, item => {
|
|
|
245
|
+ return Math.abs(item.earned)
|
|
|
246
|
+ });
|
|
|
247
|
+ console.log('bookieEarned' , row.bookieEarned)
|
244
|
row.bookieServiceFees = _.sumBy(bookie.true, (item) => { return item.serviceFees})*this.data.secondLayer.feeRatio/100;
|
248
|
row.bookieServiceFees = _.sumBy(bookie.true, (item) => { return item.serviceFees})*this.data.secondLayer.feeRatio/100;
|
245
|
}
|
249
|
}
|
246
|
row.totalServiceFees = Number(new Decimal(row.bookieServiceFees).plus(row.memberServiceFees).plus(row.bookieWagerFee).valueOf())
|
250
|
row.totalServiceFees = Number(new Decimal(row.bookieServiceFees).plus(row.memberServiceFees).plus(row.bookieWagerFee).valueOf())
|