From 99bfb472b086af929e301e15fa9ba209e52d905d Mon Sep 17 00:00:00 2001 From: Mahan Ch Date: Mon, 24 Mar 2025 19:11:47 +0330 Subject: [PATCH] fix search bug --- .../Repository/CustomizeCheckoutRepository.cs | 218 ++++++++--------- .../CustomizeCheckoutTempRepository.cs | 230 +++++++++--------- ServiceHost/appsettings.Development.json | 4 +- 3 files changed, 226 insertions(+), 226 deletions(-) diff --git a/CompanyManagment.EFCore/Repository/CustomizeCheckoutRepository.cs b/CompanyManagment.EFCore/Repository/CustomizeCheckoutRepository.cs index ad25bc24..37f15b47 100644 --- a/CompanyManagment.EFCore/Repository/CustomizeCheckoutRepository.cs +++ b/CompanyManagment.EFCore/Repository/CustomizeCheckoutRepository.cs @@ -256,138 +256,138 @@ namespace CompanyManagment.EFCore.Repository return _companyContext.CustomizeCheckouts.Where(x => x.WorkshopId==workshopId && ids.Contains(x.id)).AsEnumerable(); } - #endregion + #endregion - public IEnumerable Search(SearchCustomizeCheckout searchModel) - { - OperationResult op = new(); - var query = _companyContext.CustomizeCheckouts.Include(x => x.Employee) - .ThenInclude(x => x.PersonnelCodeList). - Include(x => x.Employee).ThenInclude(x => x.EmployeeBankInformationList) - .AsSplitQuery().Where(x => x.WorkshopId == searchModel.WorkshopId); - #region parameters initialize + public IEnumerable Search(SearchCustomizeCheckout searchModel) + { + OperationResult op = new(); + var query = _companyContext.CustomizeCheckouts.Include(x => x.Employee) + .ThenInclude(x => x.PersonnelCodeList). + Include(x => x.Employee).ThenInclude(x => x.EmployeeBankInformationList) + .AsSplitQuery().Where(x => x.WorkshopId == searchModel.WorkshopId); + #region parameters initialize - ////start of search is the first day of the current month by default and end of search is today - //var startSearchDate = DateTime.Now.FindFirstDayOfMonth().ToGeorgianDateTime().Date; - //var endSearchDate = DateTime.Today; + ////start of search is the first day of the current month by default and end of search is today + //var startSearchDate = DateTime.Now.FindFirstDayOfMonth().ToGeorgianDateTime().Date; + //var endSearchDate = DateTime.Today; - var pc = new PersianCalendar(); - var currentYear = pc.GetYear(DateTime.Now); - var currentMonth = pc.GetMonth(DateTime.Now); + var pc = new PersianCalendar(); + var currentYear = pc.GetYear(DateTime.Now); + var currentMonth = pc.GetMonth(DateTime.Now); - if (!string.IsNullOrWhiteSpace(searchModel.SearchStartFa) && !string.IsNullOrWhiteSpace(searchModel.SearchEndFa) && - searchModel.Year == 0 && searchModel.Month == 0) - { - var queryStartDate = searchModel.SearchStartFa.ToGeorgianDateTime().Date; - var queryEndDate = searchModel.SearchEndFa.ToGeorgianDateTime().Date; + if (!string.IsNullOrWhiteSpace(searchModel.SearchStartFa) && !string.IsNullOrWhiteSpace(searchModel.SearchEndFa) && + searchModel.Year == 0 && searchModel.Month == 0) + { + var queryStartDate = searchModel.SearchStartFa.ToGeorgianDateTime().Date; + var queryEndDate = searchModel.SearchEndFa.ToGeorgianDateTime().Date; - //if (queryEndDate > queryStartDate && queryEndDate <= DateTime.Today) - //{ - // startSearchDate = queryStartDate; - // endSearchDate = queryEndDate; - //} - //query = query.Where(x => x.ContractEnd.Date >= startSearchDate && x.ContractStart.Date <= endSearchDate); - query = query.Where(x => x.ContractEnd.Date >= queryStartDate && x.ContractStart.Date <= queryEndDate); - } + //if (queryEndDate > queryStartDate && queryEndDate <= DateTime.Today) + //{ + // startSearchDate = queryStartDate; + // endSearchDate = queryEndDate; + //} + //query = query.Where(x => x.ContractEnd.Date >= startSearchDate && x.ContractStart.Date <= endSearchDate); + query = query.Where(x => x.ContractEnd.Date >= queryStartDate && x.ContractStart.Date <= queryEndDate); + } - if (searchModel.Year > 0 && searchModel.Month > 0 && searchModel.Month < 12) - { - var queryStartDate = $"{searchModel.Year:0000}/{searchModel.Month:00}/01".ToGeorgianDateTime(); - queryStartDate.FindFirstDayOfNextMonth(out var queryEndDate); - queryEndDate = queryEndDate.Date.AddTicks(-1); + if (searchModel.Year > 0 && searchModel.Month > 0 && searchModel.Month < 13) + { + var queryStartDate = $"{searchModel.Year:0000}/{searchModel.Month:00}/01".ToGeorgianDateTime(); + queryStartDate.FindFirstDayOfNextMonth(out var queryEndDate); + queryEndDate = queryEndDate.Date.AddTicks(-1); - if (queryEndDate >= DateTime.Today) - { - queryEndDate = DateTime.Now.AddDays(-1).Date; - } + //if (queryEndDate >= DateTime.Today) + //{ + // queryEndDate = DateTime.Now.AddDays(-1).Date; + //} - else if (searchModel.Year == currentYear && searchModel.Month == currentMonth) - { - queryEndDate = DateTime.Now.AddDays(-1).Date; - } + if (searchModel.Year == currentYear && searchModel.Month == currentMonth) + { + queryEndDate = DateTime.Now.AddDays(-1).Date; + } - query = query.Where(x => x.ContractEnd <= queryEndDate && x.ContractStart >= queryStartDate); - } + query = query.Where(x => x.ContractEnd <= queryEndDate && x.ContractStart >= queryStartDate); + } - ////Month Index operations - //startSearchDate.AddMonthsFa(-1 * (searchModel.MonthIndex), out startSearchDate); - //startSearchDate.FindFirstDayOfNextMonth(out endSearchDate); - //endSearchDate = endSearchDate.AddDays(-1); + ////Month Index operations + //startSearchDate.AddMonthsFa(-1 * (searchModel.MonthIndex), out startSearchDate); + //startSearchDate.FindFirstDayOfNextMonth(out endSearchDate); + //endSearchDate = endSearchDate.AddDays(-1); - #endregion + #endregion - if (searchModel.EmployeeId > 0) - query = query.Where(x => x.EmployeeId == searchModel.EmployeeId); + if (searchModel.EmployeeId > 0) + query = query.Where(x => x.EmployeeId == searchModel.EmployeeId); - if (searchModel.BankId > 0) - query = query.Where(x => x.Employee.EmployeeBankInformationList.Any(y => y.BankId == searchModel.BankId)); + if (searchModel.BankId > 0) + query = query.Where(x => x.Employee.EmployeeBankInformationList.Any(y => y.BankId == searchModel.BankId)); - switch (searchModel.OrderBy) - { - case CustomizeCheckoutOrderByEnum.ContractStartDesc: - query = query.OrderByDescending(x => x.ContractStart.Date); - break; - case CustomizeCheckoutOrderByEnum.ContractStart: - query = query.OrderBy(x => x.ContractStart.Date); - break; - case CustomizeCheckoutOrderByEnum.ContractNoDesc: - query = query.OrderByDescending(x => x.ContractNo); - break; - case CustomizeCheckoutOrderByEnum.ContractNo: - query = query.OrderBy(x => x.ContractNo); - break; - default: - query = query.OrderByDescending(x => x.ContractStart.Date); - break; + switch (searchModel.OrderBy) + { + case CustomizeCheckoutOrderByEnum.ContractStartDesc: + query = query.OrderByDescending(x => x.ContractStart.Date); + break; + case CustomizeCheckoutOrderByEnum.ContractStart: + query = query.OrderBy(x => x.ContractStart.Date); + break; + case CustomizeCheckoutOrderByEnum.ContractNoDesc: + query = query.OrderByDescending(x => x.ContractNo); + break; + case CustomizeCheckoutOrderByEnum.ContractNo: + query = query.OrderBy(x => x.ContractNo); + break; + default: + query = query.OrderByDescending(x => x.ContractStart.Date); + break; - } - if (searchModel.Year == 0 || searchModel.Month == 0) - query = query.Skip(searchModel.PageIndex).Take(30); + } + if (searchModel.Year == 0 || searchModel.Month == 0) + query = query.Skip(searchModel.PageIndex).Take(30); - return query.Select(x => new CustomizeCheckoutViewModel() - { - Id = x.id, - ContractEndFa = x.ContractEnd.ToFarsi(), - ContractStartFa = x.ContractStart.ToFarsi(), - ContractNo = x.ContractNo, - EmployeeFName = x.Employee.FName, - EmployeeLName = x.Employee.LName, - PersonnelCode = x.Employee.PersonnelCodeList.FirstOrDefault(y => y.WorkshopId == searchModel.WorkshopId).PersonnelCode, - Month = pc.GetMonth(x.ContractStart).ToFarsiMonthByIntNumber(), - Year = pc.GetYear(x.ContractStart).ToString(), - BaseYearsPay = x.BaseYearsPay.ToMoney(), - BonusesPay = x.BonusesPay.ToMoney(), - EarlyExitDeduction = x.EarlyExitDeduction.ToMoney(), - FamilyAllowance = x.FamilyAllowance.ToMoney(), - AbsenceDeduction = x.FineAbsenceDeduction.ToMoney(), - FineDeduction = x.FineDeduction.ToMoney(), - FridayPay = x.FridayPay.ToMoney(), - InstallmentDeduction = x.InstallmentDeduction.ToMoney(), - InsuranceDeduction = x.InsuranceDeduction.ToMoney(), - LateToWorkDeduction = x.LateToWorkDeduction.ToMoney(), - LeavePay = x.LeavePay.ToMoney(), - MarriedAllowance = x.MarriedAllowance.ToMoney(), - MonthlySalary = x.MonthlySalary.ToMoney(), - NightworkPay = x.NightWorkPay.ToMoney(), - OvertimePay = x.OverTimePay.ToMoney(), - RewardPay = x.RewardPay.ToMoney(), - SalaryAidDeduction = x.SalaryAidDeduction.ToMoney(), - ShiftPay = x.ShiftPay.ToMoney(), - SumOfWorkingDays = x.SumOfWorkingDays.ToString(), - TaxDeducation = x.TaxDeduction.ToMoney(), - TotalPayment = x.TotalPayment.ToMoney(), - TotalPaymentD = x.TotalPayment, - TotalLateToWorkDeduction = x.LateToWorkDeduction.ToMoney(), + return query.Select(x => new CustomizeCheckoutViewModel() + { + Id = x.id, + ContractEndFa = x.ContractEnd.ToFarsi(), + ContractStartFa = x.ContractStart.ToFarsi(), + ContractNo = x.ContractNo, + EmployeeFName = x.Employee.FName, + EmployeeLName = x.Employee.LName, + PersonnelCode = x.Employee.PersonnelCodeList.FirstOrDefault(y => y.WorkshopId == searchModel.WorkshopId).PersonnelCode, + Month = pc.GetMonth(x.ContractStart).ToFarsiMonthByIntNumber(), + Year = pc.GetYear(x.ContractStart).ToString(), + BaseYearsPay = x.BaseYearsPay.ToMoney(), + BonusesPay = x.BonusesPay.ToMoney(), + EarlyExitDeduction = x.EarlyExitDeduction.ToMoney(), + FamilyAllowance = x.FamilyAllowance.ToMoney(), + AbsenceDeduction = x.FineAbsenceDeduction.ToMoney(), + FineDeduction = x.FineDeduction.ToMoney(), + FridayPay = x.FridayPay.ToMoney(), + InstallmentDeduction = x.InstallmentDeduction.ToMoney(), + InsuranceDeduction = x.InsuranceDeduction.ToMoney(), + LateToWorkDeduction = x.LateToWorkDeduction.ToMoney(), + LeavePay = x.LeavePay.ToMoney(), + MarriedAllowance = x.MarriedAllowance.ToMoney(), + MonthlySalary = x.MonthlySalary.ToMoney(), + NightworkPay = x.NightWorkPay.ToMoney(), + OvertimePay = x.OverTimePay.ToMoney(), + RewardPay = x.RewardPay.ToMoney(), + SalaryAidDeduction = x.SalaryAidDeduction.ToMoney(), + ShiftPay = x.ShiftPay.ToMoney(), + SumOfWorkingDays = x.SumOfWorkingDays.ToString(), + TaxDeducation = x.TaxDeduction.ToMoney(), + TotalPayment = x.TotalPayment.ToMoney(), + TotalPaymentD = x.TotalPayment, + TotalLateToWorkDeduction = x.LateToWorkDeduction.ToMoney(), - }).ToList(); + }).ToList(); - } - } + } + } } diff --git a/CompanyManagment.EFCore/Repository/CustomizeCheckoutTempRepository.cs b/CompanyManagment.EFCore/Repository/CustomizeCheckoutTempRepository.cs index f45548f6..79ca1503 100644 --- a/CompanyManagment.EFCore/Repository/CustomizeCheckoutTempRepository.cs +++ b/CompanyManagment.EFCore/Repository/CustomizeCheckoutTempRepository.cs @@ -65,151 +65,151 @@ namespace CompanyManagment.EFCore.Repository }).ToList(); } - #endregion + #endregion - public IEnumerable Search(SearchCustomizeCheckout searchModel) - { + public IEnumerable Search(SearchCustomizeCheckout searchModel) + { - var query = _companyContext.CustomizeCheckoutTemps.Include(x => x.Employee) - .ThenInclude(x => x.PersonnelCodeList) - .Include(x => x.Employee).ThenInclude(x => x.EmployeeBankInformationList) - .AsSplitQuery().Where(x => x.WorkshopId == searchModel.WorkshopId); - #region parameters initialize + var query = _companyContext.CustomizeCheckoutTemps.Include(x => x.Employee) + .ThenInclude(x => x.PersonnelCodeList) + .Include(x => x.Employee).ThenInclude(x => x.EmployeeBankInformationList) + .AsSplitQuery().Where(x => x.WorkshopId == searchModel.WorkshopId); + #region parameters initialize - //start of search is the first day of the current month by default and end of search is today - var startSearchDate = DateTime.Now.FindFirstDayOfMonth().ToGeorgianDateTime().Date; - var endSearchDate = DateTime.Today; + //start of search is the first day of the current month by default and end of search is today + var startSearchDate = DateTime.Now.FindFirstDayOfMonth().ToGeorgianDateTime().Date; + var endSearchDate = DateTime.Today; - var pc = new PersianCalendar(); - var currentYear = pc.GetYear(DateTime.Now); - var currentMonth = pc.GetMonth(DateTime.Now); + var pc = new PersianCalendar(); + var currentYear = pc.GetYear(DateTime.Now); + var currentMonth = pc.GetMonth(DateTime.Now); - if (!string.IsNullOrWhiteSpace(searchModel.SearchStartFa) && !string.IsNullOrWhiteSpace(searchModel.SearchEndFa) && - searchModel.Year == 0 && searchModel.Month == 0) - { - var queryStartDate = searchModel.SearchStartFa.ToGeorgianDateTime().Date; - var queryEndDate = searchModel.SearchEndFa.ToGeorgianDateTime().Date; + if (!string.IsNullOrWhiteSpace(searchModel.SearchStartFa) && !string.IsNullOrWhiteSpace(searchModel.SearchEndFa) && + searchModel.Year == 0 && searchModel.Month == 0) + { + var queryStartDate = searchModel.SearchStartFa.ToGeorgianDateTime().Date; + var queryEndDate = searchModel.SearchEndFa.ToGeorgianDateTime().Date; - if (queryEndDate > queryStartDate) - { - startSearchDate = queryStartDate; - endSearchDate = queryEndDate; - } - query = query.Where(x => x.ContractEnd.Date >= startSearchDate && x.ContractStart.Date <= endSearchDate); - } + if (queryEndDate > queryStartDate) + { + startSearchDate = queryStartDate; + endSearchDate = queryEndDate; + } + query = query.Where(x => x.ContractEnd.Date >= startSearchDate && x.ContractStart.Date <= endSearchDate); + } - if (searchModel.Year > 0 && searchModel.Month > 0 && searchModel.Month < 13) - { - var queryStartDate = $"{searchModel.Year:0000}/{searchModel.Month:00}/01".ToGeorgianDateTime(); - queryStartDate.FindFirstDayOfNextMonth(out var queryEndDate); - queryEndDate = queryEndDate.AddDays(-1); + if (searchModel.Year > 0 && searchModel.Month > 0 && searchModel.Month < 13) + { + var queryStartDate = $"{searchModel.Year:0000}/{searchModel.Month:00}/01".ToGeorgianDateTime(); + queryStartDate.FindFirstDayOfNextMonth(out var queryEndDate); + queryEndDate = queryEndDate.AddDays(-1); - //if (queryEndDate < DateTime.Today) - //{ - // startSearchDate = queryStartDate; - // endSearchDate = queryEndDate; - //} + //if (queryEndDate < DateTime.Today) + //{ + // startSearchDate = queryStartDate; + // endSearchDate = queryEndDate; + //} - if (searchModel.Year == currentYear && searchModel.Month == currentMonth) - { - queryEndDate = DateTime.Today.AddDays(-1); + if (searchModel.Year == currentYear && searchModel.Month == currentMonth) + { + queryEndDate = DateTime.Today.AddDays(-1); - startSearchDate = queryStartDate; - endSearchDate = queryEndDate; - } - else - { - startSearchDate = queryStartDate; - endSearchDate = queryEndDate; - } - query = query.Where(x => x.ContractEnd.Date <= endSearchDate && x.ContractEnd.Date >= startSearchDate); + startSearchDate = queryStartDate; + endSearchDate = queryEndDate; + } + else + { + startSearchDate = queryStartDate; + endSearchDate = queryEndDate; + } + query = query.Where(x => x.ContractEnd.Date <= endSearchDate && x.ContractEnd.Date >= startSearchDate); - } + } - ////Month Index operations - //startSearchDate.AddMonthsFa(-1 * (searchModel.MonthIndex), out startSearchDate); - //startSearchDate.FindFirstDayOfNextMonth(out endSearchDate); - //endSearchDate = endSearchDate.AddDays(-1); + ////Month Index operations + //startSearchDate.AddMonthsFa(-1 * (searchModel.MonthIndex), out startSearchDate); + //startSearchDate.FindFirstDayOfNextMonth(out endSearchDate); + //endSearchDate = endSearchDate.AddDays(-1); - #endregion + #endregion - if (searchModel.EmployeeId > 0) - query = query.Where(x => x.EmployeeId == searchModel.EmployeeId); + if (searchModel.EmployeeId > 0) + query = query.Where(x => x.EmployeeId == searchModel.EmployeeId); - if (searchModel.BankId > 0) - query = query.Where(x => x.Employee.EmployeeBankInformationList.Any(y => y.BankId == searchModel.BankId)); + if (searchModel.BankId > 0) + query = query.Where(x => x.Employee.EmployeeBankInformationList.Any(y => y.BankId == searchModel.BankId)); - switch (searchModel.OrderBy) - { - case CustomizeCheckoutOrderByEnum.ContractStartDesc: - query = query.OrderByDescending(x => x.ContractStart.Date); - break; - case CustomizeCheckoutOrderByEnum.ContractStart: - query = query.OrderBy(x => x.ContractStart.Date); - break; - case CustomizeCheckoutOrderByEnum.ContractNoDesc: - query = query.OrderByDescending(x => x.ContractNo); - break; - case CustomizeCheckoutOrderByEnum.ContractNo: - query = query.OrderBy(x => x.ContractNo); - break; - default: - query = query.OrderByDescending(x => x.ContractStart.Date); - break; + switch (searchModel.OrderBy) + { + case CustomizeCheckoutOrderByEnum.ContractStartDesc: + query = query.OrderByDescending(x => x.ContractStart.Date); + break; + case CustomizeCheckoutOrderByEnum.ContractStart: + query = query.OrderBy(x => x.ContractStart.Date); + break; + case CustomizeCheckoutOrderByEnum.ContractNoDesc: + query = query.OrderByDescending(x => x.ContractNo); + break; + case CustomizeCheckoutOrderByEnum.ContractNo: + query = query.OrderBy(x => x.ContractNo); + break; + default: + query = query.OrderByDescending(x => x.ContractStart.Date); + break; - } + } - if (searchModel.Month == 0 || searchModel.Year == 0) - query = query.Skip(searchModel.PageIndex).Take(30); + if (searchModel.Month == 0 || searchModel.Year == 0) + query = query.Skip(searchModel.PageIndex).Take(30); - return query.Select(x => new CustomizeCheckoutViewModel() - { - Id = x.id, - ContractEndFa = x.ContractEnd.ToFarsi(), - ContractStartFa = x.ContractStart.ToFarsi(), - ContractNo = x.ContractNo, - EmployeeFName = x.EmployeeFName, - EmployeeLName = x.EmployeeLName, + return query.Select(x => new CustomizeCheckoutViewModel() + { + Id = x.id, + ContractEndFa = x.ContractEnd.ToFarsi(), + ContractStartFa = x.ContractStart.ToFarsi(), + ContractNo = x.ContractNo, + EmployeeFName = x.EmployeeFName, + EmployeeLName = x.EmployeeLName, - PersonnelCode = x.Employee.PersonnelCodeList.FirstOrDefault(y => y.WorkshopId == searchModel.WorkshopId).PersonnelCode, - Month = pc.GetMonth(x.ContractStart).ToFarsiMonthByIntNumber(), - Year = pc.GetYear(x.ContractStart).ToString(), - BaseYearsPay = x.BaseYearsPay.ToMoney(), - BonusesPay = x.BonusesPay.ToMoney(), - EarlyExitDeduction = x.EarlyExitDeduction.ToMoney(), - FamilyAllowance = x.FamilyAllowance.ToMoney(), - AbsenceDeduction = x.FineAbsenceDeduction.ToMoney(), - FineDeduction = x.FineDeduction.ToMoney(), - FridayPay = x.FridayPay.ToMoney(), - InstallmentDeduction = x.InstallmentDeduction.ToMoney(), - InsuranceDeduction = x.InsuranceDeduction.ToMoney(), - LateToWorkDeduction = x.LateToWorkDeduction.ToMoney(), - LeavePay = x.LeavePay.ToMoney(), - MarriedAllowance = x.MarriedAllowance.ToMoney(), - MonthlySalary = x.MonthlySalary.ToMoney(), - NightworkPay = x.NightWorkPay.ToMoney(), - OvertimePay = x.OverTimePay.ToMoney(), - RewardPay = x.RewardPay.ToMoney(), - SalaryAidDeduction = x.SalaryAidDeduction.ToMoney(), - ShiftPay = x.ShiftPay.ToMoney(), - SumOfWorkingDays = x.SumOfWorkingDays.ToString(), - TaxDeducation = x.TaxDeduction.ToMoney(), - TotalPayment = x.TotalPayment.ToMoney(), - TotalPaymentD = x.TotalPayment, - TotalLateToWorkDeduction = x.LateToWorkDeduction.ToMoney(), - }).ToList(); + PersonnelCode = x.Employee.PersonnelCodeList.FirstOrDefault(y => y.WorkshopId == searchModel.WorkshopId).PersonnelCode, + Month = pc.GetMonth(x.ContractStart).ToFarsiMonthByIntNumber(), + Year = pc.GetYear(x.ContractStart).ToString(), + BaseYearsPay = x.BaseYearsPay.ToMoney(), + BonusesPay = x.BonusesPay.ToMoney(), + EarlyExitDeduction = x.EarlyExitDeduction.ToMoney(), + FamilyAllowance = x.FamilyAllowance.ToMoney(), + AbsenceDeduction = x.FineAbsenceDeduction.ToMoney(), + FineDeduction = x.FineDeduction.ToMoney(), + FridayPay = x.FridayPay.ToMoney(), + InstallmentDeduction = x.InstallmentDeduction.ToMoney(), + InsuranceDeduction = x.InsuranceDeduction.ToMoney(), + LateToWorkDeduction = x.LateToWorkDeduction.ToMoney(), + LeavePay = x.LeavePay.ToMoney(), + MarriedAllowance = x.MarriedAllowance.ToMoney(), + MonthlySalary = x.MonthlySalary.ToMoney(), + NightworkPay = x.NightWorkPay.ToMoney(), + OvertimePay = x.OverTimePay.ToMoney(), + RewardPay = x.RewardPay.ToMoney(), + SalaryAidDeduction = x.SalaryAidDeduction.ToMoney(), + ShiftPay = x.ShiftPay.ToMoney(), + SumOfWorkingDays = x.SumOfWorkingDays.ToString(), + TaxDeducation = x.TaxDeduction.ToMoney(), + TotalPayment = x.TotalPayment.ToMoney(), + TotalPaymentD = x.TotalPayment, + TotalLateToWorkDeduction = x.LateToWorkDeduction.ToMoney(), + }).ToList(); - } - public List PrintAll(long workshopId, IEnumerable customizeCheckoutIds) + } + public List PrintAll(long workshopId, IEnumerable customizeCheckoutIds) { //var pc = new PersianCalendar(); diff --git a/ServiceHost/appsettings.Development.json b/ServiceHost/appsettings.Development.json index 3e31959e..00c1bb97 100644 --- a/ServiceHost/appsettings.Development.json +++ b/ServiceHost/appsettings.Development.json @@ -15,10 +15,10 @@ //"MesbahDb": "Data Source=171.22.24.15;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]is[3019]#@ATt;TrustServerCertificate=true;" //local - "MesbahDb": "Data Source=.;Initial Catalog=mesbah_db;Integrated Security=True;TrustServerCertificate=true;" + //"MesbahDb": "Data Source=.;Initial Catalog=mesbah_db;Integrated Security=True;TrustServerCertificate=true;" //mahan Docker - //"MesbahDb": "Data Source=localhost,5069;Initial Catalog=mesbah_db;User ID=sa;Password=YourPassword123;TrustServerCertificate=True;" + "MesbahDb": "Data Source=localhost,5069;Initial Catalog=mesbah_db;User ID=sa;Password=YourPassword123;TrustServerCertificate=True;" }, "GoogleRecaptchaV3": { "SiteKey": "6Lfhp_AnAAAAAB79WkrMoHd1k8ir4m8VvfjE7FTH",