|
@@ -98,14 +98,15 @@ $(document).ready(() => {
|
|
|
return ZhCalc.round(ZhCalc.mul(ZhCalc.round(data.unit_price, unitPriceUnit), ZhCalc.round(data.samount, findDecimal(data.unit))), totalPriceUnit);
|
|
|
},
|
|
|
changed_amount: function (data) {
|
|
|
- return ZhCalc.round(ZhCalc.add(data.oamount, data.spamount), findDecimal(data.unit));
|
|
|
- // return ZhCalc.round(ZhCalc.add(data.oamount, data.checked_amount), findDecimal(data.unit));
|
|
|
+ console.log(data.checked_amount);
|
|
|
+ // return ZhCalc.round(ZhCalc.add(data.oamount, data.spamount), findDecimal(data.unit));
|
|
|
+ return ZhCalc.round(ZhCalc.add(data.oamount, data.checked_amount), findDecimal(data.unit));
|
|
|
},
|
|
|
changed_tp: function (data) {
|
|
|
- return ZhCalc.add(ZhCalc.round(ZhCalc.mul(ZhCalc.round(data.unit_price, unitPriceUnit), ZhCalc.round(data.oamount, findDecimal(data.unit))), totalPriceUnit),
|
|
|
- ZhCalc.round(ZhCalc.mul(ZhCalc.round(data.unit_price, unitPriceUnit), ZhCalc.round(data.spamount, findDecimal(data.unit))), totalPriceUnit));
|
|
|
// return ZhCalc.add(ZhCalc.round(ZhCalc.mul(ZhCalc.round(data.unit_price, unitPriceUnit), ZhCalc.round(data.oamount, findDecimal(data.unit))), totalPriceUnit),
|
|
|
- // ZhCalc.round(ZhCalc.mul(ZhCalc.round(data.unit_price, unitPriceUnit), ZhCalc.round(data.checked_amount, findDecimal(data.unit))), totalPriceUnit));
|
|
|
+ // ZhCalc.round(ZhCalc.mul(ZhCalc.round(data.unit_price, unitPriceUnit), ZhCalc.round(data.spamount, findDecimal(data.unit))), totalPriceUnit));
|
|
|
+ return ZhCalc.add(ZhCalc.round(ZhCalc.mul(ZhCalc.round(data.unit_price, unitPriceUnit), ZhCalc.round(data.oamount, findDecimal(data.unit))), totalPriceUnit),
|
|
|
+ ZhCalc.round(ZhCalc.mul(ZhCalc.round(data.unit_price, unitPriceUnit), ZhCalc.round(data.checked_amount, findDecimal(data.unit))), totalPriceUnit));
|
|
|
},
|
|
|
},
|
|
|
};
|