|
@@ -192,6 +192,7 @@ module.exports = app => {
|
|
|
const transaction = await this.db.beginTransaction();
|
|
|
try {
|
|
|
const mbInfo = await this.getDataById(data.id);
|
|
|
+ data.m_tp = this.ctx.helper.round(this.ctx.helper.mul(data.quantity, mbInfo.m_spread), 2);
|
|
|
await transaction.update(this.tableName, data);
|
|
|
let m_tp = this.ctx.material.m_tp;
|
|
|
if (mbInfo.quantity !== data.quantity) {
|