diff --git a/Controllers/Budget.Controller.cs b/Controllers/Budget.Controller.cs index 84aea1d..608c941 100644 --- a/Controllers/Budget.Controller.cs +++ b/Controllers/Budget.Controller.cs @@ -88,21 +88,65 @@ namespace rmutr_report.Controllers var s3 = budget_summary_reports.summary.Sum(d => d.budget_3); var s4 = budget_summary_reports.summary.Sum(d => d.budget_4); var s5 = budget_summary_reports.summary.Sum(d => d.budget_5); - var s6 = s1+s2+s3+s4+s5; - budget_summary_reports.budget_1 = s1; - budget_summary_reports.budget_2 = s2; - budget_summary_reports.budget_3 = s3; - budget_summary_reports.budget_4 = s4; - budget_summary_reports.budget_5 = s5; - budget_summary_reports.total_budget = s6; - foreach (var budget in budget_summary_reports.summary) + if (s1 != null || s2 != null || s3 != null || s4 != null || s5 != null) { - budget.total_budget = budget.budget_1 + budget.budget_2 + budget.budget_3 + budget.budget_4 + - budget.budget_5; + var s6 = s1 + s2 + s3 + s4 + s5; + budget_summary_reports.total_budget = s6; + } + + if (s1!=null || s2!=null||s3 !=null|| s4!= null|| s5!=null) + { + budget_summary_reports.budget_1 = s1; + budget_summary_reports.budget_2 = s2; + budget_summary_reports.budget_3 = s3; + budget_summary_reports.budget_4 = s4; + budget_summary_reports.budget_5 = s5; + //budget_summary_reports.total_budget = s6; + } + if (s1==null) + { + budget_summary_reports.budget_1 = null; + + } + if (s2==null) + { + budget_summary_reports.budget_2 = null; + + } + if (s3==null) + { + budget_summary_reports.budget_3 = null; + + } + if (s4==null) + { + budget_summary_reports.budget_4 = null; + + } + if (s5==null) + { + budget_summary_reports.budget_5 = null; + + } + foreach (var budget in budget_summary_reports.summary) + { + if (budget.budget_1 != null || budget.budget_2 != null || budget.budget_3 != null || + budget.budget_4 != null || budget.budget_5 != null) + { + + + budget.total_budget = budget.budget_1 + budget.budget_2 + budget.budget_3 + budget.budget_4 + + budget.budget_5; + } + else + { + return null; + } + } Report report = new Report(); - report.Load(_setting.report_path + "budget_summary_report.frx"); + report.Load(_setting.report_path + "budget_summary_report_moc.frx"); report.RegisterData(_budget_summary_report, "budget_summary_report"); report.Prepare(); diff --git a/Models/budget/budget_summary_report.cs b/Models/budget/budget_summary_report.cs index fc52649..f5d28d2 100644 --- a/Models/budget/budget_summary_report.cs +++ b/Models/budget/budget_summary_report.cs @@ -17,17 +17,17 @@ namespace rmutr_report.Models public string set_request_year { get; set; } public Listoperating_expenses{ get; set; } public string durable_articles_year { get; set; } - public string durable_articles_product { get; set; } + //public string durable_articles_product { get; set; } public List durable_articles_header { get; set; } public string building_year { get; set; } - public string building_product { get; set; } + //public string building_product { get; set; } public List building_header_1 { get; set; } public List building_header_2 { get; set; } public string research_support_year { get; set; } - public string research_support_product { get; set; } + //public string research_support_product { get; set; } public Listresearch_support{ get; set; } public string subsidy_service_year { get; set; } - public string subsidy_service_product { get; set; } + //public string subsidy_service_product { get; set; } public List subsidy_service_header { get; set; } public string subsidy_science_year { get; set; } public List subsidy_science_header { get; set; } diff --git a/bin/Debug/net5.0/rmutr-report.dll b/bin/Debug/net5.0/rmutr-report.dll index 7f8e6e7..5f8065e 100644 Binary files a/bin/Debug/net5.0/rmutr-report.dll and b/bin/Debug/net5.0/rmutr-report.dll differ diff --git a/bin/Debug/net5.0/rmutr-report.pdb b/bin/Debug/net5.0/rmutr-report.pdb index ebe6fa4..92ede88 100644 Binary files a/bin/Debug/net5.0/rmutr-report.pdb and b/bin/Debug/net5.0/rmutr-report.pdb differ diff --git a/obj/Debug/net5.0/rmutr-report.dll b/obj/Debug/net5.0/rmutr-report.dll index 7f8e6e7..5f8065e 100644 Binary files a/obj/Debug/net5.0/rmutr-report.dll and b/obj/Debug/net5.0/rmutr-report.dll differ diff --git a/obj/Debug/net5.0/rmutr-report.pdb b/obj/Debug/net5.0/rmutr-report.pdb index ebe6fa4..92ede88 100644 Binary files a/obj/Debug/net5.0/rmutr-report.pdb and b/obj/Debug/net5.0/rmutr-report.pdb differ diff --git a/wwwroot/reports/budget_summary_report.frx b/wwwroot/reports/budget_summary_report.frx index 378366f..25db2f0 100644 --- a/wwwroot/reports/budget_summary_report.frx +++ b/wwwroot/reports/budget_summary_report.frx @@ -1,5 +1,5 @@  - + @@ -28,7 +28,6 @@ - @@ -48,7 +47,6 @@ - @@ -70,7 +68,6 @@ - @@ -78,7 +75,6 @@ - @@ -298,7 +294,7 @@ - + @@ -442,7 +438,7 @@ - + @@ -602,7 +598,7 @@ - + diff --git a/wwwroot/reports/budget_summary_report_moc.frx b/wwwroot/reports/budget_summary_report_moc.frx new file mode 100644 index 0000000..2b12434 --- /dev/null +++ b/wwwroot/reports/budget_summary_report_moc.frx @@ -0,0 +1,1670 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +