diff --git a/Controllers/building_four.Controller.cs b/Controllers/building_four.Controller.cs index 82a0d36..e03baf7 100644 --- a/Controllers/building_four.Controller.cs +++ b/Controllers/building_four.Controller.cs @@ -225,10 +225,11 @@ namespace rmutr_report.Controllers } } - foreach (var expense in building_fours.expense_category) + if (building_fours.expense_category!=null) { - if (expense!=null) + foreach (var expense in building_fours.expense_category) { + var a = building_fours.expense_category.Where(d => d.amount == d.amount) .Sum(o => o.amount); building_fours.total_expense = a;