|
@@ -65,17 +65,23 @@ class rptMemPaymentSafe extends RptMemBase {
|
|
|
};
|
|
|
for (const d of datas) {
|
|
|
if (!d.tree_is_leaf) continue;
|
|
|
+ d.his_qty = [];
|
|
|
+ d.his_tp = [];
|
|
|
d.cur_his.sort((x, y) => { return x.times === y.times ? x.order - y.order : x.times - y.times; });
|
|
|
for (const r of roles) {
|
|
|
if (r.latest) {
|
|
|
d[`qty_${r.order}`] = d.cur_qty;
|
|
|
d[`tp_${r.order}`] = d.cur_tp;
|
|
|
+ d.his_qty.push(d.cur_qty);
|
|
|
+ d.his_tp.push(d.cur_tp);
|
|
|
} else {
|
|
|
const rHis = findHis(r, d.cur_his);
|
|
|
if (rHis) {
|
|
|
d[`qty_${r.order}`] = rHis.qty;
|
|
|
d[`tp_${r.order}`] = rHis.tp;
|
|
|
}
|
|
|
+ d.his_qty.push(rHis ? rHis.qty : 0);
|
|
|
+ d.his_tp.push(rHis ? rHis.tp : 0);
|
|
|
}
|
|
|
}
|
|
|
}
|