Commit 9be9c6cb by guanzhenshan

管理成本报表取两位小数

parent bf73739f
...@@ -437,6 +437,10 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -437,6 +437,10 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
{ {
for (var i = 0; i < item.Item2.Count; i++) for (var i = 0; i < item.Item2.Count; i++)
{ {
var v = item.Item2[i];
item.Item2[i] = Math.Round(v, 2);
if (listCount.Count() > i) if (listCount.Count() > i)
{ {
listCount[i] += item.Item2[i]; listCount[i] += item.Item2[i];
...@@ -457,7 +461,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -457,7 +461,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
msg = list.Count>0?"":"成本接口返回了空记录。", msg = list.Count>0?"":"成本接口返回了空记录。",
col = listCol, col = listCol,
list = listValue, list = listValue,
amount = list.Sum(a=>a.amountRmb) amount = Math.Round(list.Sum(a=>a.amountRmb),2)
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment