From 561ef617b61c8ca230b744d9bc38676e6f4788f4 Mon Sep 17 00:00:00 2001 From: "DESKTOP-2S5P7D1\\Windows 10" Date: Tue, 5 Sep 2023 13:10:45 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=88=E0=B8=B1=E0=B8=94format=20=E0=B8=A7?= =?UTF-8?q?=E0=B8=B1=E0=B8=99=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B8=A3=E0=B8=B2?= =?UTF-8?q?=E0=B8=A2=E0=B8=87=E0=B8=B2=E0=B8=99=E0=B9=80=E0=B8=84=E0=B8=A3?= =?UTF-8?q?=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=87=E0=B8=A3=E0=B8=B2=E0=B8=8A?= =?UTF-8?q?=2046?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Repositories/Reports/InsigniaReportRepository.cs | 2 +- BMA.EHR.Domain/Extensions/DoubleExtension.cs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs index 078cc2bb..d6928de6 100644 --- a/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs @@ -479,7 +479,7 @@ namespace BMA.EHR.Application.Repositories.Reports DateTh = r.Date == null ? "-" : r.Date.Value.ToThaiShortDate().ToString().ToThaiNumber(), Position = p.Name, OCName = o.Parent == null ? "-" : (o.Parent.OrganizationOrganization == null ? "-" : o.Parent.OrganizationOrganization.Name), - Age = r.Date == null ? "-" : r.Date.Value.CalculateAgeStrV2(0, 0).ToThaiNumber(), + Age = r.Date == null ? "-" : r.Date.Value.CalculateBetweenDateV2(DateTime.Now).ToThaiNumber(), Amount = r.Amount == null ? null : r.Amount.Value.ToNumericText().ToThaiNumber(), Date = r.Date, }) diff --git a/BMA.EHR.Domain/Extensions/DoubleExtension.cs b/BMA.EHR.Domain/Extensions/DoubleExtension.cs index 9cd11d89..72a552d3 100644 --- a/BMA.EHR.Domain/Extensions/DoubleExtension.cs +++ b/BMA.EHR.Domain/Extensions/DoubleExtension.cs @@ -69,6 +69,10 @@ namespace BMA.EHR.Domain.Extensions { return number.ToString("#,##0.00"); } + public static string ToNumericNoDecimalText(this double number) + { + return number.ToString("#,##"); + } public static string ToReadText(this double value) {