|
@@ -102,9 +102,12 @@ class OrderDetailService extends CrudService {
|
|
|
for (const uc_id in dd) {
|
|
|
const obj = _.get(dd, uc_id, {});
|
|
|
const values = Object.values(obj);
|
|
|
+ if (!values.every(e => _.isNumber(e))) continue;
|
|
|
const dm = values.reduce((p, n) => this.ctx.plus(p, n), 0);
|
|
|
+ // console.log(discount, dm);
|
|
|
discount = this.ctx.plus(discount, dm);
|
|
|
}
|
|
|
+ // console.log(_.get(i, 'total_detail.goods_total'), discount);
|
|
|
i.real_pay = this.ctx.minus(_.get(i, 'total_detail.goods_total'), discount);
|
|
|
}
|
|
|
return data;
|