|
@@ -787,7 +787,7 @@ module.exports = app => {
|
|
|
for (const bl of bills_list) {
|
|
|
const listInfo = bl.split('_');
|
|
|
const lid = listInfo[0];
|
|
|
- const amount = listInfo[1];
|
|
|
+ const amount = listInfo[1] !== 'null' && listInfo[1] !== '' ? listInfo[1] : null;
|
|
|
const changeListInfo = await this.ctx.service.changeAuditList.getDataById(lid);
|
|
|
if (changeListInfo !== undefined) {
|
|
|
total_price = this.ctx.helper.add(total_price, this.ctx.helper.mul(changeListInfo.unit_price, amount, tp_decimal));
|
|
@@ -796,10 +796,10 @@ module.exports = app => {
|
|
|
const list_update = {
|
|
|
id: lid,
|
|
|
audit_amount: audit_amount.join(','),
|
|
|
- spamount: parseFloat(amount),
|
|
|
+ spamount: amount !== null ? parseFloat(amount) : null,
|
|
|
};
|
|
|
if (postData.audit_next_id === undefined) {
|
|
|
- list_update.samount = amount;
|
|
|
+ list_update.samount = amount !== null ? amount : '';
|
|
|
}
|
|
|
await this.transaction.update(this.ctx.service.changeAuditList.tableName, list_update);
|
|
|
}
|