|
@@ -751,7 +751,7 @@ module.exports = app => {
|
|
});
|
|
});
|
|
c.attNames = names.join('\n');
|
|
c.attNames = names.join('\n');
|
|
}
|
|
}
|
|
- const changeBills = await this.ctx.service.changeAuditList.getChangeAuditBills(tid);
|
|
|
|
|
|
+ const changeBills = await this.ctx.service.changeAuditList.getChangeAuditBills(tid, this.ctx.session.sessionProject.page_show.isOnlyChecked);
|
|
for (const d of changeBills) {
|
|
for (const d of changeBills) {
|
|
d.o_qty = d.oamount;
|
|
d.o_qty = d.oamount;
|
|
d.o_tp = this.ctx.helper.mul(d.o_qty, d.unit_price, decimal.tp);
|
|
d.o_tp = this.ctx.helper.mul(d.o_qty, d.unit_price, decimal.tp);
|
|
@@ -760,7 +760,7 @@ module.exports = app => {
|
|
d.s_qty = d.samount ? parseFloat(d.samount) : 0;
|
|
d.s_qty = d.samount ? parseFloat(d.samount) : 0;
|
|
d.s_tp = this.ctx.helper.mul(d.s_qty, d.unit_price, decimal.tp);
|
|
d.s_tp = this.ctx.helper.mul(d.s_qty, d.unit_price, decimal.tp);
|
|
|
|
|
|
- const auditAmount = d.audit_amount.split(',');
|
|
|
|
|
|
+ const auditAmount = d.audit_amount ? d.audit_amount.split(',') : [];
|
|
const relaChange = ctx.helper._.find(change, {cid: d.cid});
|
|
const relaChange = ctx.helper._.find(change, {cid: d.cid});
|
|
for (const [i, aa] of auditAmount.entries()) {
|
|
for (const [i, aa] of auditAmount.entries()) {
|
|
const amountField = 'qty_' + (i+1), tpField = 'tp_' + (i+1);
|
|
const amountField = 'qty_' + (i+1), tpField = 'tp_' + (i+1);
|