From f6b58c840695724b472e45089a5c9214a64585be Mon Sep 17 00:00:00 2001 From: nakorn Date: Sat, 23 Oct 2021 16:08:43 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B8=9B?= =?UTF-8?q?=E0=B8=A3=E0=B8=B8=E0=B8=87=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B9=81?= =?UTF-8?q?=E0=B8=88=E0=B9=89=E0=B8=87=E0=B9=80=E0=B8=95=E0=B8=B7=E0=B8=AD?= =?UTF-8?q?=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Migrations/DataContextModelSnapshot.cs | 2 +- .../eva_adjust_postponement_quotaService.cs | 11 ++++++++++- .../eva_adjust_postponement_detail_quota_02_inline.js | 2 +- .../eva_adjust_postponement_normal_d.js | 9 ++++++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Migrations/DataContextModelSnapshot.cs b/Migrations/DataContextModelSnapshot.cs index a394d4e..d6e2810 100644 --- a/Migrations/DataContextModelSnapshot.cs +++ b/Migrations/DataContextModelSnapshot.cs @@ -16,7 +16,7 @@ namespace tb320eva.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) - .HasAnnotation("ProductVersion", "2.2.4-servicing-10062") + .HasAnnotation("ProductVersion", "2.2.6-servicing-10079") .HasAnnotation("Relational:MaxIdentifierLength", 63); modelBuilder.Entity("TodoAPI2.Models.activity_log_evaEntity", b => diff --git a/Models/eva_adjust_postponement_quota/eva_adjust_postponement_quotaService.cs b/Models/eva_adjust_postponement_quota/eva_adjust_postponement_quotaService.cs index 17f6d38..903ff0f 100644 --- a/Models/eva_adjust_postponement_quota/eva_adjust_postponement_quotaService.cs +++ b/Models/eva_adjust_postponement_quota/eva_adjust_postponement_quotaService.cs @@ -196,7 +196,16 @@ namespace TodoAPI2.Models entity.limit_quota = 0; entity.limit_frame_quota = 0; - var all_emp = (from i in emp.GetListByemployee_type(null, null) where i.workingstatus == "สถานะปฏิบัติงาน" select i).ToList(); + var active_emp = (from i in _repository.Context.eva_adjust_postponement_detail + join j in _repository.Context.eva_adjust_postponement on i.adjust_postponement_id equals j.id + where j.fiscal_year == model.fiscal_year + && j.theRound == model.theRound + select i.employee_id).ToList(); + + var all_emp = (from i in emp.GetListByemployee_type(null, null) + where i.workingstatus != "คณะกรรมการเนติบัณฑิตยสภา" + && active_emp.Contains(i.id) + select i).ToList(); var all_emp_id_list = (from i in all_emp select i.id).ToList(); entity.limit = AddMultipleDetail(entity.id, all_emp_id_list, entity.fiscal_year, entity.theRound, all_emp); diff --git a/wwwroot/js/eva_adjust_postponement_detail_quota_02/eva_adjust_postponement_detail_quota_02_inline.js b/wwwroot/js/eva_adjust_postponement_detail_quota_02/eva_adjust_postponement_detail_quota_02_inline.js index 86c7450..a4d9d94 100644 --- a/wwwroot/js/eva_adjust_postponement_detail_quota_02/eva_adjust_postponement_detail_quota_02_inline.js +++ b/wwwroot/js/eva_adjust_postponement_detail_quota_02/eva_adjust_postponement_detail_quota_02_inline.js @@ -146,7 +146,7 @@ function eva_adjust_postponement_detail_quota_02_Get(a, blankItem) { tag += ''; tag += '

'; tag += '

'; - tag += ''; + tag += ''; tag += '

'; diff --git a/wwwroot/js/eva_adjust_postponement_normal/eva_adjust_postponement_normal_d.js b/wwwroot/js/eva_adjust_postponement_normal/eva_adjust_postponement_normal_d.js index 60f43ee..d36ab18 100644 --- a/wwwroot/js/eva_adjust_postponement_normal/eva_adjust_postponement_normal_d.js +++ b/wwwroot/js/eva_adjust_postponement_normal/eva_adjust_postponement_normal_d.js @@ -181,8 +181,15 @@ function Oneva_adjust_postponement_detail_normal_02_promoted_percentageChanged(m var new_added = Math.ceil(((percentage * middle) / 100) / 10) * 10; var new_salary = parseFloat(old_salary + new_added); + //if (new_salary > themax) { + // alert("เงินเดือนเกินกรอบวงเงินขั้นสูงของพนักงานคือ " + formatNumber(themax) + " บาท แต่สามารถหยอดได้ถึง " + formatNumber(salary_max) + " บาท กรุณาหยอดร้อยละที่ได้เลื่อนอีกครั้งค่ะ"); + //} if (new_salary > salary_max) { - alert("เงินเดือนเกินกรอบวงเงินขั้นสูงของพนักงานคือ " + formatNumber(themax) + " บาท แต่สามารถหยอดได้ถึง " + formatNumber(salary_max) + " บาท กรุณาหยอดร้อยละที่ได้เลื่อนอีกครั้งค่ะ"); + alert("เงินเดือนใหม่ที่ได้รับ เกินกรอบวงเงินสูงสุด(1 ขั้น) ของพนักงาน คือ " + formatNumber(salary_max) + " บาท"); + percentage = 0.000; + $("#eva_adjust_postponement_detail_normal_02_promoted_percentage_" + i).val("0.000"); + new_added = Math.ceil(((percentage * middle) / 100) / 10) * 10; + new_salary = parseFloat(old_salary + new_added); } var format_new_added = coreFormatPrice(new_added, 3);