diff --git a/Controllers/Budget.Controller.cs b/Controllers/Budget.Controller.cs index 3ea553f..6bab2db 100644 --- a/Controllers/Budget.Controller.cs +++ b/Controllers/Budget.Controller.cs @@ -2489,7 +2489,7 @@ namespace rmutr_report.Controllers [FromBody] budget_expenditure_report_from_revenue budget) { int no = 1; - + var b = budget.budgets.ToArray(); foreach (var bb in b) { @@ -2504,8 +2504,8 @@ namespace rmutr_report.Controllers } var cperson = detail.budget_personnel_lists.Count(); - - if (cperson ==1) + + if (cperson == 1) { detail.budget_personnel_lists[0].topic = "งบบุคลากร"; } @@ -2553,22 +2553,6 @@ namespace rmutr_report.Controllers no3++; } - if (cperson == 2) - { - detail.budget_personnel_lists[0].topic = "งบบุคลากร"; - detail.budget_personnel_lists[1].topic = "งบดําเนินงาน"; - detail.budget_personnel_lists[1].text1 = null; - detail.budget_personnel_lists[1].budget_personnel_lists_2[0].text1 = null; - detail.budget_personnel_lists[1].budget_personnel_lists_2[0].row_no = null; - detail.budget_personnel_lists[1].budget_personnel_lists_2[0].budget_rates[0] - .row_no = null; - detail.budget_personnel_lists[1].budget_personnel_lists_2[0].budget_rates[0] - .text1 = null; - detail.budget_personnel_lists[1].budget_personnel_lists_2[0].budget_rates[0] - .details[0].text1 = null; - } - - if (detail5.details2 != null) { foreach (var detail6 in detail5.details2) @@ -2581,10 +2565,48 @@ namespace rmutr_report.Controllers } } } - + + if (detail5.details2.Any()) + { + if (detail5.details2==null) + { + foreach (var detail6 in detail5.details2) + { + detail6.topic = null; + detail6.total = null; + detail6.row_no = null; + detail6.text1 = null; + } + } + + } + else + { + detail5.details2.Add(new details2() + { + topic = "",total = 999999999 + }); + + } } } } + + + if (cperson == 2) + { + detail.budget_personnel_lists[0].topic = "งบบุคลากร"; + detail.budget_personnel_lists[1].topic = "งบดําเนินงาน"; + detail.budget_personnel_lists[1].text1 = null; + detail.budget_personnel_lists[1].budget_personnel_lists_2[0].text1 = null; + detail.budget_personnel_lists[1].budget_personnel_lists_2[0].row_no = null; + detail.budget_personnel_lists[1].budget_personnel_lists_2[0].budget_rates[0] + .row_no = null; + detail.budget_personnel_lists[1].budget_personnel_lists_2[0].budget_rates[0] + .text1 = null; + detail.budget_personnel_lists[1].budget_personnel_lists_2[0].budget_rates[0] + .details[0].text1 = null; + } } } } diff --git a/bin/Debug/netcoreapp3.1/rmutr_report.dll b/bin/Debug/netcoreapp3.1/rmutr_report.dll index b28a899..70460a3 100644 Binary files a/bin/Debug/netcoreapp3.1/rmutr_report.dll and b/bin/Debug/netcoreapp3.1/rmutr_report.dll differ diff --git a/bin/Debug/netcoreapp3.1/rmutr_report.pdb b/bin/Debug/netcoreapp3.1/rmutr_report.pdb index 8006be4..7fb2fc9 100644 Binary files a/bin/Debug/netcoreapp3.1/rmutr_report.pdb and b/bin/Debug/netcoreapp3.1/rmutr_report.pdb differ diff --git a/obj/Debug/netcoreapp3.1/rmutr_report.dll b/obj/Debug/netcoreapp3.1/rmutr_report.dll index b28a899..70460a3 100644 Binary files a/obj/Debug/netcoreapp3.1/rmutr_report.dll and b/obj/Debug/netcoreapp3.1/rmutr_report.dll differ diff --git a/obj/Debug/netcoreapp3.1/rmutr_report.pdb b/obj/Debug/netcoreapp3.1/rmutr_report.pdb index 8006be4..7fb2fc9 100644 Binary files a/obj/Debug/netcoreapp3.1/rmutr_report.pdb and b/obj/Debug/netcoreapp3.1/rmutr_report.pdb differ diff --git a/obj/rider.project.restore.info b/obj/rider.project.restore.info index a0c4500..09ca182 100644 --- a/obj/rider.project.restore.info +++ b/obj/rider.project.restore.info @@ -1 +1 @@ -16926773444616640 \ No newline at end of file +16926820101922101 \ No newline at end of file diff --git a/wwwroot/reports/budget_expenditure_report_from_revenue.frx b/wwwroot/reports/budget_expenditure_report_from_revenue.frx index 8dac03f..94e4826 100644 --- a/wwwroot/reports/budget_expenditure_report_from_revenue.frx +++ b/wwwroot/reports/budget_expenditure_report_from_revenue.frx @@ -1,5 +1,5 @@  - + @@ -56,7 +56,7 @@ - + @@ -91,14 +91,14 @@ - + - + @@ -108,16 +108,20 @@ - - + + - - - - + + + + + + + +