diff --git a/Controllers/Budget.Controller.cs b/Controllers/Budget.Controller.cs index 70d4033..70d7427 100644 --- a/Controllers/Budget.Controller.cs +++ b/Controllers/Budget.Controller.cs @@ -2692,16 +2692,24 @@ namespace rmutr_report.Controllers [FromBody] budget_expenditure_report_from_revenue_v2 budget) { int no1 = 1; - int no2 = 1; - int no3 = 1; - int no4 = 1; + int no2 = 0; + int no3 = 0; + int no4 = 0; int no5 = 1; - int no6 = 1; + int no6 = 0; int no7 = 1; - int no8 = 1; - var detail = budget.details.ToArray(); - foreach (var indetail in detail) + int no8 = 0; + int no9 = 0; + int no10 = 1; + bool numberingtype10 = false; + bool startNumbering = false; + bool startNumbering2 = false; + bool startNumbering3 = false; + bool startNumbering4 = false; + bool startNumbering5 = false; + foreach (var indetail in budget.details) { + if (indetail.topic_type==1) { indetail.topic1 = indetail.topic; @@ -2735,9 +2743,11 @@ namespace rmutr_report.Controllers indetail.text6 = "บาท"; indetail.row_no1 = no1; no1++; + startNumbering = true; + no2 = 1; } - if (indetail.topic_type==5) + if (startNumbering && indetail.topic_type==5) { indetail.topic5 = indetail.topic; indetail.amount7 = indetail.value1; @@ -2745,10 +2755,12 @@ namespace rmutr_report.Controllers indetail.text7 = "อัตรา"; indetail.text8 = "บาท"; indetail.row_no2 = no2; - no2++; + no2++; + startNumbering2 = true; + no3 = 1; } - - if (indetail.topic_type==6) + + if (startNumbering2 &&indetail.topic_type==6) { indetail.topic9 = indetail.topic; indetail.topic10 = indetail.qualification; @@ -2759,15 +2771,7 @@ namespace rmutr_report.Controllers indetail.row_no3 = no3; no3++; } - if (indetail.topic_type==7) - { - indetail.topic11 = indetail.topic; - indetail.amount11 = indetail.value1; - indetail.text11 = "บาท"; - indetail.row_no4 = no4; - no4++; - } - if (indetail.topic_type==8) + if (indetail.topic_type==8) { indetail.topic12 = indetail.topic; indetail.amount12 = indetail.value1; @@ -2783,9 +2787,10 @@ namespace rmutr_report.Controllers indetail.text15 = "หน่วยนับ"; indetail.text16 = "ราคาต่อหน่วย"; indetail.text17 = "รวมเงิน"; - + numberingtype10 = true; + no6 = 1; } - if (indetail.topic_type==10) + if (numberingtype10&&indetail.topic_type==10)// { indetail.topic13 = indetail.topic; indetail.amount13 = indetail.value1; @@ -2802,7 +2807,10 @@ namespace rmutr_report.Controllers indetail.topic14 = indetail.topic; indetail.amount16 = indetail.value2; indetail.text20 = "บาท"; - + //indetail.row_no1 = no1; + //no1++; + //startNumbering3 = true; + //no8 = 1; } if (indetail.topic_type==12) { @@ -2812,24 +2820,66 @@ namespace rmutr_report.Controllers indetail.text22 = "."; indetail.row_no7 = no7; no7++; + } - if (indetail.topic_type==13) + if (indetail.topic_type==13)// { indetail.topic16 = indetail.topic; indetail.amount18 = indetail.value2; indetail.text23 = "บาท"; + startNumbering3 = true; + no8 = 1; + } + // if (indetail.topic_type==13&&indetail.topic!="ค่าตอบแทน ค่าใช้สอยและค่าวัสดุ"&&indetail.topic!="ค่าใช้จ่ายดำเนินงาน")// + if (indetail.topic_type==13&&indetail.topic=="เงินอุดหนุน ค่าใช้จ่ายโครงการ") + { + indetail.row_no10 = 1; + + } + if (indetail.topic_type==13&&indetail.topic=="ค่าครุภัณฑ์") + { + indetail.row_no10 = 1; } - if (indetail.topic_type==14) + if (indetail.topic_type==13&&indetail.topic=="ค่าที่ดินและสิ่งก่อสร้าง") + { + indetail.row_no10 = 2; + + } + if (startNumbering3&&indetail.topic_type==14)// { indetail.topic17 = indetail.topic; indetail.amount19 = indetail.value2; indetail.text24 = "บาท"; - indetail.row_no8 = no8; - no8++; + indetail.row_no8 = no8; + no8++; + startNumbering4 = true; + no4 = 1; + } + if (startNumbering4 &&indetail.topic_type==7&&indetail.is_other!=true)// + { + indetail.topic11 = indetail.topic; + indetail.amount11 = indetail.value1; + indetail.text11 = "บาท"; + indetail.row_no4 = no4; + no4++; + startNumbering5 = true; + no9 = 1; + } + if (startNumbering5&&indetail.topic_type==7&&indetail.is_other==true) + { + indetail.topic18 = indetail.topic; + indetail.amount20 = indetail.value1; + indetail.text25 = "บาท"; + indetail.text26 = "."; + indetail.row_no9 = no9; + no9++; } } + int academic_year_name_th = Convert.ToInt32(budget.academic_year_name_th); + budget.academic_year_1 = (academic_year_name_th-1).ToString(); + budget.academic_year_2 = academic_year_name_th.ToString(); var sum1 = budget.details.Where(f=>f.topic_type==1).Sum(d => d.value1); var sum2 = budget.details.Where(f=>f.topic_type==2&&f.topic == "รายการบุคลากร").Sum(d => d.value2); budget.total = sum1+sum2; diff --git a/Models/budget/budget_expenditure_report_from_revenue_v2.cs b/Models/budget/budget_expenditure_report_from_revenue_v2.cs index bc867df..b7d36a1 100644 --- a/Models/budget/budget_expenditure_report_from_revenue_v2.cs +++ b/Models/budget/budget_expenditure_report_from_revenue_v2.cs @@ -9,12 +9,15 @@ namespace rmutr_report.Models public string parent_agency_name { get; set; } //หน่วยงาน public string agency_name_th { get; set; } //พื้นที่ public decimal? total { get; set; } + public string academic_year_1 { get; set; } + public string academic_year_2 { get; set; } public List details { get; set; } } public class budget_expenditure_report_from_revenue_v2_detail { public int? topic_type { get; set; } + public bool? is_other { get; set; } public int? row_no1 { get; set; } public int? row_no2 { get; set; } public int? row_no3 { get; set; } @@ -23,6 +26,8 @@ namespace rmutr_report.Models public int? row_no6 { get; set; } public int? row_no7 { get; set; } public int? row_no8 { get; set; } + public int? row_no9 { get; set; } + public int? row_no10 { get; set; } public string topic { get; set; } public string qualification { get; set; } public string unit { get; set; } @@ -47,6 +52,7 @@ namespace rmutr_report.Models public string topic15 { get; set; } public string topic16 { get; set; } public string topic17 { get; set; } + public string topic18 { get; set; } public decimal? amount1 { get; set; } public decimal? amount2 { get; set; } public decimal? amount3 { get; set; } @@ -66,6 +72,7 @@ namespace rmutr_report.Models public decimal? amount17 { get; set; } public decimal? amount18 { get; set; } public decimal? amount19 { get; set; } + public decimal? amount20 { get; set; } public string text1 { get; set; } public string text2 { get; set; } public string text3 { get; set; } @@ -90,6 +97,7 @@ namespace rmutr_report.Models public string text22 { get; set; } public string text23 { get; set; } public string text24 { get; set; } - //public string line { get; set; } + public string text25 { get; set; } + public string text26 { get; set; } } } \ No newline at end of file diff --git a/bin/Debug/net5.0/rmutr_report.dll b/bin/Debug/net5.0/rmutr_report.dll index 56443e1..cddfe88 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 7c6949b..280b0af 100644 Binary files a/bin/Debug/net5.0/rmutr_report.pdb and b/bin/Debug/net5.0/rmutr_report.pdb differ diff --git a/bin/Debug/netcoreapp3.1/rmutr_report.dll b/bin/Debug/netcoreapp3.1/rmutr_report.dll index 3261559..02673ed 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 d6ee5d7..8f871f6 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/net5.0/ref/rmutr_report.dll b/obj/Debug/net5.0/ref/rmutr_report.dll index 10a20ac..58dca5e 100644 Binary files a/obj/Debug/net5.0/ref/rmutr_report.dll and b/obj/Debug/net5.0/ref/rmutr_report.dll differ diff --git a/obj/Debug/net5.0/refint/rmutr_report.dll b/obj/Debug/net5.0/refint/rmutr_report.dll index 10a20ac..58dca5e 100644 Binary files a/obj/Debug/net5.0/refint/rmutr_report.dll and b/obj/Debug/net5.0/refint/rmutr_report.dll differ diff --git a/obj/Debug/net5.0/rmutr_report.AssemblyInfo.cs b/obj/Debug/net5.0/rmutr_report.AssemblyInfo.cs index 43ae194..a516938 100644 --- a/obj/Debug/net5.0/rmutr_report.AssemblyInfo.cs +++ b/obj/Debug/net5.0/rmutr_report.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("rmutr_report")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7137b4f2c26e4bfccefcbb23a79b0766b3b1d9d9")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a58f124c5e1b7bf7f1b0591338972b1f20fc15ef")] [assembly: System.Reflection.AssemblyProductAttribute("rmutr_report")] [assembly: System.Reflection.AssemblyTitleAttribute("rmutr_report")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/obj/Debug/net5.0/rmutr_report.AssemblyInfoInputs.cache b/obj/Debug/net5.0/rmutr_report.AssemblyInfoInputs.cache index 0810e9d..b9ed8ae 100644 --- a/obj/Debug/net5.0/rmutr_report.AssemblyInfoInputs.cache +++ b/obj/Debug/net5.0/rmutr_report.AssemblyInfoInputs.cache @@ -1 +1 @@ -4fc55d7fe67163ea39ae278786d3fa415d97ea0737e0aadc65b0b3c224d08a73 +a0b143487f58687fcc3a233d310f87177bc7f39ae577501ceb3c1b6e985ed707 diff --git a/obj/Debug/net5.0/rmutr_report.RazorTargetAssemblyInfo.cache b/obj/Debug/net5.0/rmutr_report.RazorTargetAssemblyInfo.cache index fcf2296..6e27f2f 100644 --- a/obj/Debug/net5.0/rmutr_report.RazorTargetAssemblyInfo.cache +++ b/obj/Debug/net5.0/rmutr_report.RazorTargetAssemblyInfo.cache @@ -1 +1 @@ -18d969bee34f2773c817401f309a2895e4bed6fa15fa976682d2da1b92c7a164 +71dbdc370cb9ef82945d6737f2f7a61200e20b5f6e8324df2cb0a1160a0f7103 diff --git a/obj/Debug/net5.0/rmutr_report.dll b/obj/Debug/net5.0/rmutr_report.dll index 56443e1..cddfe88 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 7c6949b..280b0af 100644 Binary files a/obj/Debug/net5.0/rmutr_report.pdb and b/obj/Debug/net5.0/rmutr_report.pdb differ diff --git a/obj/Debug/netcoreapp3.1/rmutr_report.AssemblyInfo.cs b/obj/Debug/netcoreapp3.1/rmutr_report.AssemblyInfo.cs index 80e0980..a516938 100644 --- a/obj/Debug/netcoreapp3.1/rmutr_report.AssemblyInfo.cs +++ b/obj/Debug/netcoreapp3.1/rmutr_report.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("rmutr_report")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+be506637963d971c493b17d48cff9051e6c1e186")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a58f124c5e1b7bf7f1b0591338972b1f20fc15ef")] [assembly: System.Reflection.AssemblyProductAttribute("rmutr_report")] [assembly: System.Reflection.AssemblyTitleAttribute("rmutr_report")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/obj/Debug/netcoreapp3.1/rmutr_report.AssemblyInfoInputs.cache b/obj/Debug/netcoreapp3.1/rmutr_report.AssemblyInfoInputs.cache index 14ea95d..b9ed8ae 100644 --- a/obj/Debug/netcoreapp3.1/rmutr_report.AssemblyInfoInputs.cache +++ b/obj/Debug/netcoreapp3.1/rmutr_report.AssemblyInfoInputs.cache @@ -1 +1 @@ -bb854ecd343ad1946095299c5eea83cbf1d92adfdf83d66497b41101e0ce62e3 +a0b143487f58687fcc3a233d310f87177bc7f39ae577501ceb3c1b6e985ed707 diff --git a/obj/Debug/netcoreapp3.1/rmutr_report.RazorTargetAssemblyInfo.cache b/obj/Debug/netcoreapp3.1/rmutr_report.RazorTargetAssemblyInfo.cache index 53a75a5..6e27f2f 100644 --- a/obj/Debug/netcoreapp3.1/rmutr_report.RazorTargetAssemblyInfo.cache +++ b/obj/Debug/netcoreapp3.1/rmutr_report.RazorTargetAssemblyInfo.cache @@ -1 +1 @@ -279632d20a71efddaec7d7dd8e4f82c69645ce40f221ec526dfebe37ed8f764e +71dbdc370cb9ef82945d6737f2f7a61200e20b5f6e8324df2cb0a1160a0f7103 diff --git a/obj/Debug/netcoreapp3.1/rmutr_report.dll b/obj/Debug/netcoreapp3.1/rmutr_report.dll index 3261559..02673ed 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 d6ee5d7..8f871f6 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 df16566..c19d258 100644 --- a/obj/rider.project.restore.info +++ b/obj/rider.project.restore.info @@ -1 +1 @@ -17241552033399582 \ No newline at end of file +17244186673993103 \ No newline at end of file diff --git a/wwwroot/reports/budget_expenditure_report_from_revenue_v2.frx b/wwwroot/reports/budget_expenditure_report_from_revenue_v2.frx index f858688..c3e1aee 100644 --- a/wwwroot/reports/budget_expenditure_report_from_revenue_v2.frx +++ b/wwwroot/reports/budget_expenditure_report_from_revenue_v2.frx @@ -1,5 +1,5 @@  - + @@ -7,6 +7,8 @@ + + @@ -17,6 +19,8 @@ + + @@ -37,6 +41,7 @@ + @@ -54,6 +59,7 @@ + @@ -78,6 +84,8 @@ + + @@ -96,13 +104,14 @@ - + - - + + + - + @@ -112,7 +121,6 @@ - @@ -149,7 +157,7 @@ - + @@ -162,6 +170,12 @@ + + + + + +