|
@@ -797,7 +797,7 @@ const calculatedAmount = () => {
|
|
|
for (let i = 0; i < formData.data.contractProductList.length; i++) {
|
|
|
let money = 0;
|
|
|
if (formData.data.contractProductList[i].quantity && formData.data.contractProductList[i].price) {
|
|
|
- money = parseFloat(Number(formData.data.contractProductList[i].quantity) * Number(formData.data.contractProductList[i].price)).toFixed(2);
|
|
|
+ money = Number(Math.round(Number(formData.data.contractProductList[i].quantity) * Number(formData.data.contractProductList[i].price) * 10000) / 10000);
|
|
|
}
|
|
|
formData.data.contractProductList[i].amount = money;
|
|
|
}
|
|
@@ -811,16 +811,16 @@ const handleChangeAmount = () => {
|
|
|
if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
|
|
|
for (let i = 0; i < formData.data.contractProductList.length; i++) {
|
|
|
if (formData.data.contractProductList[i].amount) {
|
|
|
- money = parseFloat(Number(money) + Number(formData.data.contractProductList[i].amount)).toFixed(2);
|
|
|
- amountProduct = parseFloat(Number(amountProduct) + Number(formData.data.contractProductList[i].amount)).toFixed(2);
|
|
|
+ money = Number(Math.round((Number(money) + Number(formData.data.contractProductList[i].amount)) * 10000) / 10000);
|
|
|
+ amountProduct = Number(Math.round((Number(amountProduct) + Number(formData.data.contractProductList[i].amount)) * 10000) / 10000);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (formData.data.contractProjectList && formData.data.contractProjectList.length > 0) {
|
|
|
for (let i = 0; i < formData.data.contractProjectList.length; i++) {
|
|
|
if (formData.data.contractProjectList[i].amount) {
|
|
|
- money = parseFloat(Number(money) + Number(formData.data.contractProjectList[i].amount)).toFixed(2);
|
|
|
- amountProject = parseFloat(Number(amountProject) + Number(formData.data.contractProjectList[i].amount)).toFixed(2);
|
|
|
+ money = Number(Math.round((Number(money) + Number(formData.data.contractProjectList[i].amount)) * 10000) / 10000);
|
|
|
+ amountProduct = Number(Math.round((Number(amountProduct) + Number(formData.data.contractProjectList[i].amount)) * 10000) / 10000);
|
|
|
}
|
|
|
}
|
|
|
}
|