保留两位小数

master
xxssyyyyssxx 2021-11-06 21:49:44 +08:00
parent a53e91620c
commit 98ce08f289
4 changed files with 20 additions and 20 deletions

View File

@ -91,14 +91,14 @@ function updateCostData(details) {
otherTaxExclude += f2(t["totalTaxExclude"]);
}
});
$("input[name='costPurchaseDeviceTaxInclude']").val(deviceTaxInclude);
$("input[name='costPurchaseDeviceTaxExclude']").val(deviceTaxExclude);
$("input[name='costPurchaseBuildTaxInclude']").val(buildTaxInclude);
$("input[name='costPurchaseBuildTaxExclude']").val(buildTaxExclude);
$("input[name='costPurchaseServiceTaxInclude']").val(serviceTaxInclude);
$("input[name='costPurchaseServiceTaxExclude']").val(serviceTaxExclude);
$("input[name='costPurchaseOtherTaxInclude']").val(otherTaxInclude);
$("input[name='costPurchaseOtherTaxExclude']").val(otherTaxExclude);
$("input[name='costPurchaseDeviceTaxInclude']").val(f2(deviceTaxInclude));
$("input[name='costPurchaseDeviceTaxExclude']").val(f2(deviceTaxExclude));
$("input[name='costPurchaseBuildTaxInclude']").val(f2(buildTaxInclude));
$("input[name='costPurchaseBuildTaxExclude']").val(f2(buildTaxExclude));
$("input[name='costPurchaseServiceTaxInclude']").val(f2(serviceTaxInclude));
$("input[name='costPurchaseServiceTaxExclude']").val(f2(serviceTaxExclude));
$("input[name='costPurchaseOtherTaxInclude']").val(f2(otherTaxInclude));
$("input[name='costPurchaseOtherTaxExclude']").val(f2(otherTaxExclude));
var costOtherOtherTaxInclude = parseFloat($("input[name='costOtherOtherTaxInclude']").val());
var costOtherOtherTaxExclude = parseFloat($("input[name='costOtherOtherTaxExclude']").val());

View File

@ -89,7 +89,7 @@ function updateCostProjectManageData(details) {
var costOtherOtherTaxExclude = f2($("input[name='costOtherOtherTaxExclude']").val());
$("input[name='costTotalTaxExclude']").val(costPurchaseDeviceTaxExclude+costPurchaseBuildTaxExclude+costPurchaseServiceTaxExclude+costPurchaseOtherTaxExclude+total+costOtherOtherTaxExclude);
$("input[name='costTotalTaxExclude']").val(f2(costPurchaseDeviceTaxExclude+costPurchaseBuildTaxExclude+costPurchaseServiceTaxExclude+costPurchaseOtherTaxExclude+total+costOtherOtherTaxExclude));
updateProjectContributionProfitRate();
}

View File

@ -48,12 +48,12 @@ function updateIncomeData(incomeDetails) {
serviceTaxExclude += f2(t["totalTaxExclude"]);
}
});
$("input[name='incomeDeviceTaxInclude']").val(deviceTaxInclude);
$("input[name='incomeDeviceTaxExclude']").val(deviceTaxExclude);
$("input[name='incomeEngineerTaxInclude']").val(engineerTaxInclude);
$("input[name='incomeEngineerTaxExclude']").val(engineerTaxExclude);
$("input[name='incomeServiceTaxInclude']").val(serviceTaxInclude);
$("input[name='incomeServiceTaxExclude']").val(serviceTaxExclude);
$("input[name='incomeDeviceTaxInclude']").val(f2(deviceTaxInclude));
$("input[name='incomeDeviceTaxExclude']").val(f2(deviceTaxExclude));
$("input[name='incomeEngineerTaxInclude']").val(f2(engineerTaxInclude));
$("input[name='incomeEngineerTaxExclude']").val(f2(engineerTaxExclude));
$("input[name='incomeServiceTaxInclude']").val(f2(serviceTaxInclude));
$("input[name='incomeServiceTaxExclude']").val(f2(serviceTaxExclude));
$("input[name='incomeTotalTaxInclude']").val(f2(deviceTaxInclude+engineerTaxInclude+serviceTaxInclude));
$("input[name='incomeTotalTaxExclude']").val(f2(deviceTaxExclude+engineerTaxExclude+serviceTaxExclude));

View File

@ -508,11 +508,11 @@ function updateCashFlow() {
var underwrittenPlan = $(".input-total-underwritten-plan-budget-plan").val();
var repaymentPlan = $(".input-total-repayment-plan-budget-plan").val();
var d = f2(deviceCost)+f2(engineerCost);
var f = f2(projectManageCost)+f2(earnestMoneyCost)+f2(capitalInterest);
var g = f2(saleIncome)+0+f2(earnestMoneyIncome)-d-0-f;
var m = f2(underwrittenPlan)-f2(repaymentPlan);
var n = g+0+m;
var d = f2(f2(deviceCost)+f2(engineerCost));
var f = f2(f2(projectManageCost)+f2(earnestMoneyCost)+f2(capitalInterest));
var g = f2(f2(saleIncome)+0+f2(earnestMoneyIncome)-d-0-f);
var m = f2(f2(underwrittenPlan)-f2(repaymentPlan));
var n = f2(g+0+m);
console.log(saleIncome,earnestMoneyIncome,deviceCost,
engineerCost,projectManageCost,earnestMoneyCost,