|
@@ -263,7 +263,7 @@ module.exports = app => {
|
|
|
m_tp: newTp,
|
|
|
pre_tp: mb.m_tp !== null ? this.ctx.helper.round(this.ctx.helper.add(mb.pre_tp, mb.m_tp), 2) : mb.pre_tp,
|
|
|
m_tax_tp: this.ctx.helper.round(this.ctx.helper.mul(newTp, (1 + this.ctx.helper.div(mb.m_tax, 100))), 2),
|
|
|
- m_tax_pre_tp: mb.m_tax_tp !== null ? this.ctx.helper.round(this.ctx.helper.add(mb.m_tax_pre_tp, mb.m_tax_tp), 2) : mb.m_tax_pre_tp,
|
|
|
+ tax_pre_tp: mb.m_tax_tp !== null ? this.ctx.helper.round(this.ctx.helper.add(mb.tax_pre_tp, mb.m_tax_tp), 2) : mb.tax_pre_tp,
|
|
|
};
|
|
|
await transaction.update(this.tableName, updateData);
|
|
|
const m_tp = mb.is_summary === 1 ? await this.ctx.helper.round(this.ctx.helper.mul(mb_quantity.quantity, newm_spread), 2) : 0;
|
|
@@ -283,7 +283,7 @@ module.exports = app => {
|
|
|
m_tp: newTp,
|
|
|
pre_tp: mb.m_tp !== null ? this.ctx.helper.round(this.ctx.helper.add(mb.pre_tp, mb.m_tp), 2) : mb.pre_tp,
|
|
|
m_tax_tp: this.ctx.helper.round(this.ctx.helper.mul(newTp, (1 + this.ctx.helper.div(mb.m_tax, 100))), 2),
|
|
|
- m_tax_pre_tp: mb.m_tax_tp !== null ? this.ctx.helper.round(this.ctx.helper.add(mb.m_tax_pre_tp, mb.m_tax_tp), 2) : mb.m_tax_pre_tp,
|
|
|
+ tax_pre_tp: mb.m_tax_tp !== null ? this.ctx.helper.round(this.ctx.helper.add(mb.tax_pre_tp, mb.m_tax_tp), 2) : mb.tax_pre_tp,
|
|
|
};
|
|
|
await transaction.update(this.tableName, updateData);
|
|
|
const m_tp = mb.is_summary === 1 ? await this.ctx.helper.round(this.ctx.helper.mul(quantity, newm_spread), 2) : 0;
|