|
@@ -171,9 +171,9 @@ module.exports = app => {
|
|
|
if (d.sgfh_qty!== undefined) p.sgfh_qty = this.round(d.sgfh_qty, precision.value);
|
|
|
if (d.sjcl_qty!== undefined) p.sjcl_qty = this.round(d.sjcl_qty, precision.value);
|
|
|
if (d.qtcl_qty!== undefined) p.qtcl_qty = this.round(d.qtcl_qty, precision.value);
|
|
|
- if (d.sgfh_expr) p.sgfh_expr = d.sgfh_expr;
|
|
|
- if (d.sjcl_expr) p.sjcl_expr = d.sjcl_expr;
|
|
|
- if (d.qtcl_expr) p.qtcl_expr = d.qtcl_expr;
|
|
|
+ if (d.sgfh_expr !== undefined) p.sgfh_expr = d.sgfh_expr;
|
|
|
+ if (d.sjcl_expr !== undefined) p.sjcl_expr = d.sjcl_expr;
|
|
|
+ if (d.qtcl_expr !== undefined) p.qtcl_expr = d.qtcl_expr;
|
|
|
p.quantity = this.ctx.helper.sum([p.sgfh_qty, p.sjcl_qty, p.qtcl_qty]);
|
|
|
if (!updateBills) updateBills = {id: bills.id, sgfh_qty: bills.sgfh_qty, sjcl_qty: bills.sjcl_qty, qtcl_qty: bills.qtcl_qty};
|
|
|
}
|
|
@@ -191,7 +191,7 @@ module.exports = app => {
|
|
|
order: this.ctx.stage.curOrder,
|
|
|
};
|
|
|
if (d.contract_qty !== undefined) ps.contract_qty = this.round(d.contract_qty, precision.value);
|
|
|
- if (d.contract_expr) p.contract_expr = d.contract_expr;
|
|
|
+ if (d.contract_expr !== undefined) p.contract_expr = d.contract_expr;
|
|
|
if (d.qc_qty!== undefined) ps.qc_qty = this.round(d.qc_qty, precision.value);
|
|
|
if (d.postil!== undefined) ps.postil = d.postil;
|
|
|
insertPosStage.push(ps);
|
|
@@ -278,9 +278,9 @@ module.exports = app => {
|
|
|
p.sgfh_qty = d.sgfh_qty !== undefined ? d.sgfh_qty : op.sgfh_qty;
|
|
|
p.sjcl_qty = d.sjcl_qty !== undefined ? d.sjcl_qty : op.sjcl_qty;
|
|
|
p.qtcl_qty = d.qtcl_qty !== undefined ? d.qtcl_qty : op.qtcl_qty;
|
|
|
- if (d.sgfh_expr) p.sgfh_expr = d.sgfh_expr;
|
|
|
- if (d.sjcl_expr) p.sjcl_expr = d.sjcl_expr;
|
|
|
- if (d.qtcl_expr) p.qtcl_expr = d.qtcl_expr;
|
|
|
+ if (d.sgfh_expr !== undefined) p.sgfh_expr = d.sgfh_expr;
|
|
|
+ if (d.sjcl_expr !== undefined) p.sjcl_expr = d.sjcl_expr;
|
|
|
+ if (d.qtcl_expr !== undefined) p.qtcl_expr = d.qtcl_expr;
|
|
|
p.quantity = this.ctx.helper.sum([p.sgfh_qty, p.sjcl_qty, p.qtcl_qty]);
|
|
|
if (!updateBills) updateBills = {id: bills.id};
|
|
|
}
|
|
@@ -295,7 +295,7 @@ module.exports = app => {
|
|
|
if (d.contract_qty !== undefined) {
|
|
|
sp.contract_qty = this.ctx.helper.round(d.contract_qty, precision.value);
|
|
|
}
|
|
|
- if (d.contract_expr) sp.contract_expr = d.contract_expr;
|
|
|
+ if (d.contract_expr !== undefined) sp.contract_expr = d.contract_expr;
|
|
|
if (d.qc_qty !== undefined) {
|
|
|
sp.qc_qty = this.ctx.helper.round(d.qc_qty, precision.value);
|
|
|
}
|
|
@@ -315,7 +315,7 @@ module.exports = app => {
|
|
|
? osp.contract_qty
|
|
|
: this.ctx.helper.round(d.contract_qty, precision.value);
|
|
|
}
|
|
|
- if (d.contract_expr) sp.contract_expr = d.contract_expr;
|
|
|
+ if (d.contract_expr !== undefined) sp.contract_expr = d.contract_expr;
|
|
|
if (d.qc_qty || osp) {
|
|
|
sp.qc_qty = d.qc_qty === undefined && osp
|
|
|
? osp.qc_qty
|