Compare commits

...

39 Commits

Author SHA1 Message Date
d1ac8e49ba feat: add API endpoint to retrieve working employees select list for current workshop 2025-11-01 12:15:35 +03:30
c10ae17f8c feat: update current day roll call search model to use EmployeeId instead of WorkshopId 2025-10-29 11:09:30 +03:30
c13ad3a8a7 feat: update current day roll call API to accept search model for filtering 2025-10-29 10:46:21 +03:30
e0c247d07b feat: add RollCallController with current day roll call API endpoint 2025-10-25 16:18:22 +03:30
1a3558df52 Merge branch 'refs/heads/Main' into Feature/roll-call/current-day-api 2025-10-25 16:18:02 +03:30
25c7b67eb5 feat: extend SMS service to include contracting party and institution contract IDs in verification link and code methods 2025-10-25 14:18:04 +03:30
19b390b17d refactor: update employee sorting logic by color for improved clarity 2025-10-25 12:08:27 +03:30
d3cd7e5b3c Merge branch 'master' into Main 2025-10-23 16:50:03 +03:30
3d86ba401f fix: update IsOldContract logic to handle null and empty workshop groups 2025-10-23 16:44:19 +03:30
6a6e2e532a feat: add print API for institution contracts and include verifier details 2025-10-23 14:13:55 +03:30
ca6638d6a3 feat: enhance workshop query with additional filtering options and improved mapping 2025-10-22 19:26:10 +03:30
608fb824dc refactor: remove unnecessary console logging in workshop selection 2025-10-22 17:23:17 +03:30
4686151bbb Merge branch 'Main'
# Conflicts:
#	CompanyManagment.EFCore/Repository/InstitutionContractRepository.cs
2025-10-22 17:04:59 +03:30
d7fae42e4f Merge remote-tracking branch 'origin/master' 2025-10-22 17:01:12 +03:30
2cfe480733 fix: correct workshop ID reference in employee count calculation 2025-10-22 17:00:33 +03:30
syntax24
c574ce534d Insurance Exept include = 0, Employee 1496 2025-10-22 16:55:11 +03:30
174edbf87d Merge branch 'Feature/InstitutionContract/add-old-edit-api' into Main
# Conflicts:
#	ServiceHost/Areas/Admin/Controllers/institutionContractController.cs
2025-10-22 15:29:43 +03:30
a827470831 feat: add API for editing old institution contracts with new properties 2025-10-22 15:19:17 +03:30
c9b61c3fc6 fix: validate Georgian date conversion in financial statement application 2025-10-22 12:07:26 +03:30
45002b88c4 fix: update absence terminology to 'عدم حضور' across multiple files 2025-10-22 11:18:55 +03:30
0bacb24aa2 Merge branch 'Feature/InstitutionContract/upgrade' into Main 2025-10-21 21:58:25 +03:30
7fd8851f71 refactor: optimize employee count calculation in InstitutionContractRepository 2025-10-21 21:57:04 +03:30
bc6ae854f8 Merge branch 'Feature/InstitutionContract/upgrade' into Main
# Conflicts:
#	Company.Domain/InstitutionContractAgg/IInstitutionContractRepository.cs
#	Company.Domain/InstitutionContractAgg/InstitutionContract.cs
2025-10-21 15:07:16 +03:30
68f1f81b53 feat: add BSON representation for Id property in InstitutionContractAmendmentTemp 2025-10-21 15:05:48 +03:30
d4c2ab939e fix: correct workshop ID reference in employee count calculation 2025-10-21 14:55:23 +03:30
5822005b68 Merge branch 'master' into Feature/InstitutionContract/upgrade
# Conflicts:
#	Company.Domain/InstitutionContractAgg/IInstitutionContractRepository.cs
#	Company.Domain/InstitutionContractAgg/InstitutionContract.cs
#	ServiceHost/Areas/Admin/Controllers/institutionContractController.cs
2025-10-21 14:45:22 +03:30
53aeb60861 Merge branch 'Feature/InstitutionContract/upgrade' into Main 2025-10-21 14:37:41 +03:30
c2a08d9c33 feat: add BsonRepresentation attribute to Id property for string representation in MongoDB 2025-10-21 14:37:11 +03:30
85e2481680 feat: enhance financial statement retrieval with contracting party validation and creation 2025-10-21 13:50:42 +03:30
b711e803a9 Merge branch 'master' into Main
# Conflicts:
#	ServiceHost/Areas/Admin/Controllers/institutionContractController.cs
2025-10-21 11:50:45 +03:30
232a834dc9 feat: add resend verification link end point added 2025-10-21 11:41:23 +03:30
55f7b4f7c0 Merge branch 'Feature/InstitutionContract/upgrade' into Main
# Conflicts:
#	Company.Domain/InstitutionContractAgg/IInstitutionContractRepository.cs
#	Company.Domain/InstitutionContractAgg/InstitutionContract.cs
2025-10-21 11:10:06 +03:30
c5b521bc50 feat: add endpoints for inserting, removing, and retrieving amendment workshops and payment details 2025-10-21 11:04:46 +03:30
acdd7de4f6 feat: update InsertAmendmentTempWorkshops method to return detailed response and refactor related classes 2025-10-21 11:02:10 +03:30
78458f24e5 feat: add entry and exit time differences to roll call reports 2025-10-20 15:43:59 +03:30
fde58a7c75 feat: add temporary workshop management for institution contract amendments 2025-10-20 13:13:43 +03:30
syntax24
dbddccf011 add inew permission admin > workflow > institution-contract 2025-10-19 23:06:14 +03:30
7d6b57affd feat: make Workshops property public and update CalculateInstallment method visibility 2025-10-18 16:50:40 +03:30
c8018948c2 feat: add validation to prevent upgrading institution contracts with zero-priced workshops 2025-10-16 11:56:45 +03:30
56 changed files with 12466 additions and 153 deletions

View File

@@ -27,9 +27,10 @@ public interface ISmsService
Task<double> GetCreditAmount();
public Task<bool> SendInstitutionVerificationLink(string number,string fullName, Guid institutionId);
public Task<bool> SendInstitutionVerificationLink(string number, string fullName, Guid institutionId, long contractingPartyId, long institutionContractId);
public Task<bool> SendInstitutionVerificationCode(string number, string code);
public Task<bool> SendInstitutionVerificationCode(string number, string code, string contractingPartyFullName,
long contractingPartyId, long institutionContractId);
#endregion

View File

@@ -79,4 +79,5 @@ public interface IEmployeeRepository : IRepository<long, Employee>
#endregion
Task<List<EmployeeSelectListViewModel>> GetWorkingEmployeesSelectList(long workshopId);
}

View File

@@ -6,6 +6,7 @@ using _0_Framework.Application;
using _0_Framework.Domain;
using CompanyManagment.App.Contracts.InstitutionContract;
using CompanyManagment.App.Contracts.Workshop;
using Microsoft.AspNetCore.Mvc;
namespace Company.Domain.InstitutionContractAgg;
@@ -65,12 +66,15 @@ public interface IInstitutionContractRepository : IRepository<long, InstitutionC
#endregion
#region Upgrade(Amendment)
#region Upgrade(Amendment)
Task<InstitutionContractAmendmentWorkshopsResponse> GetAmendmentWorkshops(long institutionContractId);
Task<InsitutionContractAmendmentPaymentResponse> GetAmendmentPaymentDetails(InsitutionContractAmendmentPaymentRequest request);
Task<InsertAmendmentTempWorkshopResponse> InsertAmendmentTempWorkshops(InstitutionContractAmendmentTempWorkshopViewModel request);
Task RemoveAmendmentWorkshops(Guid workshopTempId);
#endregion
Task<List<InstitutionContractSelectListViewModel>> GetInstitutionContractSelectList(string search, string selected);
Task<List<InstitutionContractPrintViewModel>> PrintAllAsync(List<long> ids);
}

View File

@@ -6,7 +6,6 @@ using System.Security.Cryptography;
using _0_Framework.Domain;
using Company.Domain.InstitutionContractContactInfoAgg;
using CompanyManagment.App.Contracts.InstitutionContract;
using OfficeOpenXml.Table.PivotTable;
namespace Company.Domain.InstitutionContractAgg;
@@ -126,6 +125,8 @@ public class InstitutionContract : EntityBase
public string VerifyCode { get; private set; }
public DateTime VerifyCodeCreation { get; private set; }
public string VerifierFullName { get; private set; }
public string VerifierPhoneNumber { get; private set; }
[NotMapped] public bool VerifyCodeExpired => VerifyCodeCreation.Add(ExpireTime) <= DateTime.Now;
@@ -226,10 +227,12 @@ public class InstitutionContract : EntityBase
}
public void SetVerifyCode(string code)
public void SetVerifyCode(string code,string verifierFullName, string verifierPhoneNumber)
{
VerifyCode = code;
VerifyCodeCreation = DateTime.Now;
VerifierFullName = verifierFullName;
VerifierPhoneNumber = verifierPhoneNumber;
}
public void SetWorkshopGroup(InstitutionContractWorkshopGroup workshopGroup)
@@ -277,11 +280,19 @@ public class InstitutionContractAmendment : EntityBase
public long LawId { get; set; }
public void SetVerifyCode(string code)
public void SetVerifyCode(string code,string verifierFullName, string verifierPhoneNumber)
{
VerifyCode = code;
VerificationCreation = DateTime.Now;
VerifyCodeCreation = DateTime.Now;
VerifierFullName = verifierFullName;
VerifierPhoneNumber = verifierPhoneNumber;
}
public string VerifierPhoneNumber { get; private set; }
public string VerifierFullName { get; private set; }
public DateTime VerifyCodeCreation { get; set; }
}
public class InstitutionContractAmendmentChange : EntityBase

View File

@@ -0,0 +1,151 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace Company.Domain.InstitutionContractAmendmentTempAgg;
public class InstitutionContractAmendmentTemp
{
public InstitutionContractAmendmentTemp(List<InstitutionContractAmendmentTempPrevWorkshop> prevWorkshops,
long institutionContractId)
{
Id = Guid.NewGuid();
PrevWorkshops = prevWorkshops;
NewWorkshops = prevWorkshops.Select(x=> new InstitutionContractAmendmentTempNewWorkshop(
x.WorkshopName, x.CountPerson, x.ContractAndCheckout, x.ContractAndCheckoutInPerson, x.Insurance,
x.InsuranceInPerson, x.RollCall, x.RollCallInPerson, x.CustomizeCheckout, x.Price, x.WorkshopId,
x.CurrentWorkshopId, 0)).ToList();
InstitutionContractId = institutionContractId;
}
[BsonId]
[BsonRepresentation(BsonType.String)]
public Guid Id { get; private set; }
public List<InstitutionContractAmendmentTempPrevWorkshop> PrevWorkshops { get; private set; }
public List<InstitutionContractAmendmentTempNewWorkshop> NewWorkshops { get; private set; }
public long InstitutionContractId { get; private set; }
}
public class InstitutionContractAmendmentTempNewWorkshop : InstitutionContractAmendmentTempPrevWorkshop
{
public InstitutionContractAmendmentTempNewWorkshop(string workshopName, int countPerson, bool contractAndCheckout,
bool contractAndCheckoutInPerson, bool insurance, bool insuranceInPerson, bool rollCall, bool rollCallInPerson,
bool customizeCheckout, double price, long workshopId, long currentWorkshopId,double priceDifference) : base(
workshopName, countPerson, contractAndCheckout, contractAndCheckoutInPerson, insurance, insuranceInPerson,
rollCall, rollCallInPerson, customizeCheckout, price, workshopId, currentWorkshopId)
{
PriceDifference = priceDifference;
}
/// <summary>
/// مبلغ اختلاف کارگاه جدید با کارگاه قبلی(مبلغ اصلی ارتقاء)
/// </summary>
public double PriceDifference { get; private set; }
public void Edit(string workshopName, int countPerson, bool contractAndCheckout,
bool contractAndCheckoutInPerson,
bool insurance, bool insuranceInPerson, bool rollCall, bool customizeCheckout,
double price,double priceDifference)
{
base.Edit(workshopName, countPerson, contractAndCheckout, contractAndCheckoutInPerson, insurance,
insuranceInPerson, rollCall, customizeCheckout, price);
PriceDifference = priceDifference;
}
}
public class InstitutionContractAmendmentTempPrevWorkshop
{
public InstitutionContractAmendmentTempPrevWorkshop(string workshopName, int countPerson, bool contractAndCheckout,
bool contractAndCheckoutInPerson,
bool insurance, bool insuranceInPerson,
bool rollCall, bool rollCallInPerson, bool customizeCheckout, double price, long workshopId,
long currentWorkshopId)
{
Id = Guid.NewGuid();
WorkshopName = workshopName;
CountPerson = countPerson;
ContractAndCheckout = contractAndCheckout;
Insurance = insurance;
RollCall = rollCall;
CustomizeCheckout = customizeCheckout;
ContractAndCheckoutInPerson = contractAndCheckoutInPerson;
InsuranceInPerson = insuranceInPerson;
RollCallInPerson = rollCallInPerson;
Price = price;
WorkshopId = workshopId;
CurrentWorkshopId = currentWorkshopId;
}
[BsonRepresentation(BsonType.String)]
public Guid Id { get; set; }
public long CurrentWorkshopId { get; private set; }
public long WorkshopId { get; set; }
/// <summary>
/// نام کارگاه
/// </summary>
public string WorkshopName { get; private set; }
/// <summary>
/// تعداد پرسنل
/// </summary>
public int CountPerson { get; private set; }
#region ServiceSelection
/// <summary>
/// قرارداد و تصفیه
/// </summary>
public bool ContractAndCheckout { get; private set; }
/// <summary>
/// بیمه
/// </summary>
public bool Insurance { get; private set; }
/// <summary>
/// حضورغباب
/// </summary>
public bool RollCall { get; private set; }
public bool RollCallInPerson { get; set; }
/// <summary>
/// فیش غیر رسمی
/// </summary>
public bool CustomizeCheckout { get; private set; }
/// <summary>
/// خدمات حضوری قرداد و تصفیه
/// </summary>
public bool ContractAndCheckoutInPerson { get; private set; }
/// <summary>
/// خدمات حضوری بیمه
/// </summary>
public bool InsuranceInPerson { get; private set; }
public double Price { get; private set; }
#endregion
public void Edit(string workshopName, int countPerson, bool contractAndCheckout, bool contractAndCheckoutInPerson,
bool insurance, bool insuranceInPerson, bool rollCall, bool customizeCheckout,
double price)
{
WorkshopName = workshopName;
CountPerson = countPerson;
ContractAndCheckout = contractAndCheckout;
Insurance = insurance;
RollCall = rollCall;
CustomizeCheckout = customizeCheckout;
ContractAndCheckoutInPerson = contractAndCheckoutInPerson;
InsuranceInPerson = insuranceInPerson;
Price = price;
}
}

View File

@@ -25,7 +25,7 @@ namespace Company.Domain.RollCallAgg
DateTime endSearch);
void RemoveEmployeeRollCallsInDate(long workshopId, long employeeId, DateTime date);
RollCallsByDateViewModel GetWorkshopRollCallHistory(RollCallSearchModel searchModel);
CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId);
CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId,WorkshopCurrentDayRollCallSearchModel searchModel);
List<PersonnelCheckoutDailyRollCallViewModel> GetEmployeeRollCallsForMonth(IEnumerable<long> employeeIds,
long workshopId, DateTime start, DateTime end);

View File

@@ -5,7 +5,8 @@ namespace Company.Domain.SmsResultAgg;
public class SmsResult: EntityBase
{
public SmsResult(int messageId, string status,string typeOfSms, string contractingPartyName,string mobile, long contractingPatyId, long institutionContractId)
public SmsResult(int messageId, string status,string typeOfSms,
string contractingPartyName,string mobile, long contractingPatyId, long institutionContractId)
{
MessageId = messageId;
Status = status;

View File

@@ -12,9 +12,7 @@ public class CaseHistoryRollCallExcelForEmployeeViewModel
public string EmployeeFullName { get; set; }
public string TotalWorkingHoursFa { get; set; }
public string TotalWorkingTimeSpan { get; set; }
public List<RollCallItemForEmployeeExcelViewModel> RollCalls { get; set; }
}
@@ -40,7 +38,8 @@ public class RollCallItemForEmployeeExcelViewModel
public bool HasLeave { get; set; }
public string TotalWorkingHours { get; set; }
public string EnterTimeDifferences { get; set; }
public string ExitTimeDifferences { get; set; }
}
public class RollCallTimeExcelViewModel

View File

@@ -113,11 +113,12 @@ public class RollCallExcelGenerator : ExcelGenerator
worksheet.Cells[i + row + 1, 1].Value = i + 1;
worksheet.Cells[i + row + 1, 2].Value = rollCall.DayOfWeekFa;
worksheet.Cells[i + row + 1, 3].Value = rollCall.DateFa;
worksheet.Cells[i + row + 1, 4].Value = "-";
worksheet.Cells[i + row + 1, 4].Value = rollCall.EnterTimeDifferences;
worksheet.Cells[i + row + 1, 5].Value = rollCall.StartsItems;
worksheet.Cells[i + row + 1, 6].Value = rollCall.EndsItems;
worksheet.Cells[i + row + 1, 7].Value = "-";
worksheet.Cells[i + row + 1, 8].Value = rollCall.TotalWorkingHours == string.Empty ? "ندارد" : rollCall.TotalWorkingHours;
worksheet.Cells[i + row + 1, 7].Value = rollCall.ExitTimeDifferences;
worksheet.Cells[i + row + 1, 8].Value = rollCall.TotalWorkingHours == string.Empty
? "ندارد" : rollCall.TotalWorkingHours;
// Style data cells
for (int j = 1; j <= 8; j++)
@@ -307,6 +308,49 @@ public class RollCallExcelGenerator : ExcelGenerator
return package.GetAsByteArray();
}
private string CalculateExitMinuteDifference(TimeSpan early, TimeSpan late)
{
if (early == TimeSpan.Zero && late == TimeSpan.Zero)
{
return "-";
}
else if (late != TimeSpan.Zero)
{
var minutes = late.TotalMinutes > 999 ? "999" : late.TotalMinutes.ToString();
return $"{minutes}+";
}
else if (early != TimeSpan.Zero)
{
var minutes = early.TotalMinutes > 999 ? "999" : early.TotalMinutes.ToString();
return $"{minutes}-";
}
else
{
return $"";
}
}
private string CalculateEntryMinuteDifference(TimeSpan early, TimeSpan late)
{
if (early == TimeSpan.Zero && late == TimeSpan.Zero)
{
return "-";
}
else if (late != TimeSpan.Zero)
{
var minutes = late.TotalMinutes > 999 ? "999" : late.TotalMinutes.ToString();
return $"{minutes}-";
}
else if (early != TimeSpan.Zero)
{
var minutes = early.TotalMinutes > 999 ? "999" : early.TotalMinutes.ToString();
return $"{minutes}+";
}
else
{
return $"";
}
}
}

View File

@@ -76,6 +76,7 @@ public interface IEmployeeApplication
Task<List<EmployeeSelectListViewModel>> WorkedEmployeesInWorkshopSelectList(long workshopId);
Task<OperationResult<EmployeeDataFromApiViewModel>> GetEmployeeDataFromApi(string nationalCode, string birthDate);
Task<List<EmployeeSelectListViewModel>> GetWorkingEmployeesSelectList(long workshopId);
#endregion

View File

@@ -87,6 +87,10 @@ public class GetInstitutionContractListItemsViewModel
public long ContractingPartyId { get; set; }
public List<InstitutionContractListWorkshop> Workshops { get; set; }
public bool IsInPersonContract { get; set; }
public bool IsOldContract { get; set; }
}
public class InstitutionContractListWorkshop

View File

@@ -7,6 +7,7 @@ using System.Threading.Tasks;
using _0_Framework.Application;
using _0_Framework.Application.Sms;
using CompanyManagment.App.Contracts.Checkout;
using CompanyManagment.App.Contracts.Law;
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
using CompanyManagment.App.Contracts.Workshop;
using CompanyManagment.App.Contracts.WorkshopPlan;
@@ -77,6 +78,8 @@ public interface IInstitutionContractApplication
/// <returns>لیست قراردادها برای چاپ</returns>
List<InstitutionContractViewModel> PrintAll(List<long> id);
[Obsolete("استفاده نشود، از متد غیرهمزمان استفاده شود")]
/// <summary>
/// چاپ یک قرارداد
/// </summary>
@@ -234,26 +237,46 @@ public interface IInstitutionContractApplication
#region Upgrade (Amendment)
Task<InstitutionContractAmendmentWorkshopsResponse> GetAmendmentWorkshops(long institutionContractId);
Task<InsertAmendmentTempWorkshopResponse> InsertAmendmentTempWorkshops(InstitutionContractAmendmentTempWorkshopViewModel request);
Task RemoveAmendmentWorkshops(Guid workshopTempId);
Task<InsitutionContractAmendmentPaymentResponse> GetAmendmentPaymentDetails(InsitutionContractAmendmentPaymentRequest request);
#endregion
Task<OperationResult> ResendVerifyLink(long institutionContractId);
/// <summary>
/// دیتای پرینت قرارداد مالی
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Task<InstitutionContractPrintViewModel> PrintOneAsync(long id);
}
public class InsitutionContractAmendmentPaymentRequest
public class InstitutionContractPrintViewModel
{
List<WorkshopTempViewModel> Workshops { get; set; }
public long InstitutionContractId { get; set; }
}
public class InsitutionContractAmendmentPaymentResponse
{
public InstitutionContractPaymentOneTimeViewModel OneTime { get; set; }
public InstitutionContractPaymentMonthlyViewModel Monthly { get; set; }
public InstitutionContratVerificationParty FirstParty { get; set; }
public InstitutionContratVerificationParty SecondParty { get; set; }
public string ContractNo { get; set; }
public string CreationDate { get; set; }
public string ContractStart { get; set; }
public string ContractEnd { get; set; }
public string OneMonthAmount { get; set; }
public string TotalAmount { get; set; }
public List<GetInstitutionVerificationDetailsWorkshopsViewModel> Workshops { get; set; }
public string TotalPrice { get; set; }
public string TaxPrice { get; set; }
public string PaymentPrice { get; set; }
public string VerifyCode { get; set; }
public string VerifyDateTime { get; set; }
public string VerifierFullName { get; set; }
public string VerifierPhoneNumber { get; set; }
public LawViewModel LawViewModel { get; set; }
public string Obligation { get; set; }
}
public class InsertAmendmentTempWorkshopResponse
{
public Guid WorkshopTempId { get; set; }
public string Amount { get; set; }
}
public class InstitutionContractAmendmentWorkshopsResponse
@@ -261,7 +284,9 @@ public class InstitutionContractAmendmentWorkshopsResponse
/// <summary>
///
/// </summary>
public List<WorkshopTempViewModel> Workshops { get; set; }
public List<InstitutionContractAmendmentTempWorkshopViewModel> Workshops { get; set; }
public Guid TempId { get; set; }
}

View File

@@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
namespace CompanyManagment.App.Contracts.InstitutionContract;
public class InsitutionContractAmendmentPaymentRequest
{
public Guid TempId { get; set; }
}

View File

@@ -0,0 +1,11 @@
namespace CompanyManagment.App.Contracts.InstitutionContract;
public class InsitutionContractAmendmentPaymentResponse
{
public InstitutionContractPaymentOneTimeViewModel OneTime { get; set; }
public InstitutionContractPaymentMonthlyViewModel Monthly { get; set; }
public string ContractStart { get; set; }
public string ContractEnd { get; set; }
public string OneMonthAmount { get; set; }
public string TotalAmount { get; set; }
}

View File

@@ -0,0 +1,64 @@
using System;
namespace CompanyManagment.App.Contracts.InstitutionContract;
public class InstitutionContractAmendmentTempWorkshopViewModel
{
public Guid TempId { get; set; }
public Guid WorkshopTempId { get; set; }
public long CurrentWorkshopId { get; set; }
public long WorkshopId { get; set; }
/// <summary>
/// نام کارگاه
/// </summary>
public string WorkshopName { get; set; }
/// <summary>
/// تعداد پرسنل
/// </summary>
public int CountPerson { get; set; }
#region ServiceSelection
/// <summary>
/// قرارداد و تصفیه
/// </summary>
public bool ContractAndCheckout { get; set; }
/// <summary>
/// بیمه
/// </summary>
public bool Insurance { get; set; }
/// <summary>
/// حضورغباب
/// </summary>
public bool RollCall { get; set; }
public bool RollCallInPerson { get; set; }
/// <summary>
/// فیش غیر رسمی
/// </summary>
public bool CustomizeCheckout { get; set; }
/// <summary>
/// خدمات حضوری قرداد و تصفیه
/// </summary>
public bool ContractAndCheckoutInPerson { get; set; }
/// <summary>
/// خدمات حضوری بیمه
/// </summary>
public bool InsuranceInPerson { get; set; }
public double Price{ get; set; }
public string PriceStr{ get; set; }
#endregion
}

View File

@@ -79,7 +79,7 @@ namespace CompanyManagment.App.Contracts.RollCall
/// <summary>
/// گزارش آنلاین حضور غیاب
/// </summary>
CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId);
CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId,WorkshopCurrentDayRollCallSearchModel searchModel);
/// <summary>
/// گزارش آفلاین حضور غیاب کارگاه
@@ -126,6 +126,13 @@ namespace CompanyManagment.App.Contracts.RollCall
/// <returns></returns>
OperationResult RecalculateValues(long workshopId, List<ReCalculateRollCallValues> command);
}
public class WorkshopCurrentDayRollCallSearchModel
{
public long EmployeeId { get; set; }
public int PersonnelCode { get; set; }
}
public class ReCalculateRollCallValues
{
public long EmployeeId { get; set; }

View File

@@ -373,7 +373,9 @@ namespace CompanyManagment.Application
Color = color,
PersonnelCode = personnelCodes.FirstOrDefault(y => x.Id == y.EmployeeId)?.PersonnelCode.ToString() ?? "-"
};
}).OrderByDescending(x => x.IsEligible).ThenByDescending(x => x.Reason).ToList();
}).OrderBy(x => x.Color switch { "orange" => 0, "white" => 1, "red" => 2, "green" => 3, "black" => 4, _ => 5 })
.ToList();
return op.Succcedded(employees);
}
}

View File

@@ -1676,6 +1676,10 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
}
public async Task<List<EmployeeSelectListViewModel>> GetWorkingEmployeesSelectList(long workshopId)
{
return await _EmployeeRepository.GetWorkingEmployeesSelectList(workshopId);
}
#endregion

View File

@@ -106,8 +106,11 @@ public class FinancialStatmentApplication : IFinancialStatmentApplication
debtor = command.DeptorString.MoneyToDouble();
}
var tDateGr = command.TdateFa.ToGeorgianDateTime();
if (!command.TdateFa.TryToGeorgianDateTime(out var tDateGr))
{
return op.Failed("تاریخ وارد شده صحیح نمی باشد");
}
if (_financialStatmentRepository.Exists(x => x.ContractingPartyId == command.ContractingPartyId))
{
var financialStatment = _financialStatmentRepository.GetDetailsByContractingPartyId(command.ContractingPartyId);

View File

@@ -1141,7 +1141,7 @@ public class InstitutionContractApplication : IInstitutionContractApplication
await _smsService.SendInstitutionVerificationLink(contractingParty.Phone, contractingPartyFullName,
entity.PublicId);
entity.PublicId, contractingParty.id,entity.id );
await _institutionContractRepository.SaveChangesAsync();
@@ -1203,7 +1203,12 @@ public class InstitutionContractApplication : IInstitutionContractApplication
throw new NotFoundException("طرف قرارداد یافت نشد");
var code = new Random().Next(1000, 9999).ToString();
institutionContract.SetVerifyCode(code);
var contractingPartyFullName = contractingParty.IsLegal == "حقیقی"
? contractingParty.FName + " " + contractingParty.LName
: contractingParty.CeoFName + " " + contractingParty.CeoLName;
institutionContract.SetVerifyCode(code,contractingPartyFullName ,contractingParty.Phone);
var transaction = await _institutionContractRepository.BeginTransactionAsync();
try
@@ -1340,11 +1345,48 @@ public class InstitutionContractApplication : IInstitutionContractApplication
return await _institutionContractRepository.GetAmendmentWorkshops(institutionContractId);
}
public async Task<InsertAmendmentTempWorkshopResponse> InsertAmendmentTempWorkshops(InstitutionContractAmendmentTempWorkshopViewModel request)
{
return await _institutionContractRepository.InsertAmendmentTempWorkshops(request);
}
public Task RemoveAmendmentWorkshops(Guid workshopTempId)
{
return _institutionContractRepository.RemoveAmendmentWorkshops(workshopTempId);
}
public Task<InsitutionContractAmendmentPaymentResponse> GetAmendmentPaymentDetails(InsitutionContractAmendmentPaymentRequest request)
{
return _institutionContractRepository.GetAmendmentPaymentDetails(request);
}
public async Task<OperationResult> ResendVerifyLink(long institutionContractId)
{
var institutionContract = _institutionContractRepository.Get(institutionContractId);
if (institutionContract == null)
{
throw new NotFoundException("رکورد مورد نظر یافت نشد");
}
if (institutionContract.VerificationStatus != InstitutionContractVerificationStatus.PendingForVerify)
{
throw new BadRequestException("این قرارداد مالی در وضعیت مناسبی برای ارسال مجدد لینک تایید نمی باشد");
}
var contractingParty = _contractingPartyRepository.Get(institutionContract.ContractingPartyId);
if (contractingParty == null)
throw new NotFoundException("طرف قرارداد یافت نشد");
var contractingPartyFullName = contractingParty.FName + " " + contractingParty.LName;
await _smsService.SendInstitutionVerificationLink(contractingParty.Phone, contractingPartyFullName,
institutionContract.PublicId, contractingParty.id, institutionContract.id);
return new OperationResult().Succcedded();
}
public async Task<InstitutionContractPrintViewModel> PrintOneAsync(long id)
{
return (await _institutionContractRepository.PrintAllAsync([id])).FirstOrDefault();
}
private async Task<OperationResult<PersonalContractingParty>> CreateLegalContractingPartyEntity(
CreateInstitutionContractLegalPartyRequest request, long representativeId, string address, string city,
@@ -1440,7 +1482,7 @@ public class InstitutionContractApplication : IInstitutionContractApplication
return operation.Succcedded(personalContractingParty);
}
private List<InstitutionContractInstallment> CalculateInstallment(double amount, int installmentCount,
public static List<InstitutionContractInstallment> CalculateInstallment(double amount, int installmentCount,
string loanStartDate, bool getRounded)
{
int day = Convert.ToInt32(loanStartDate.Substring(8, 2));

View File

@@ -1869,6 +1869,11 @@ public class InsuranceListApplication : IInsuranceListApplication
bool isManager = jobId is 10 or 16 or 17 or 18 or 3498;
if (isManager && !includeStatus)
return 0;
//پرسنل استثناء سیدعسکر موسوی زاده - فروشگاه ولی عصر
if (employeeId == 1496)
return 0;
//پرسنل استثناء
if (employeeId == 42783)
return 53082855;

View File

@@ -144,9 +144,9 @@ public class RollCallApplication : IRollCallApplication
return _rollCallRepository.GetWorkshopRollCallHistory(searchModel);
}
public CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId)
public CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId, WorkshopCurrentDayRollCallSearchModel searchModel)
{
return _rollCallRepository.GetWorkshopCurrentDayRollCalls(workshopId);
return _rollCallRepository.GetWorkshopCurrentDayRollCalls(workshopId, searchModel);
}
public List<CheckoutDailyRollCallViewModel> GetActiveEmployeeRollCallsForDuration(long employeeId, long workshopId, string startDate,

View File

@@ -674,7 +674,7 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
result.MonthlyValueAddedTaxStr= tenPercent.ToMoney();
var monthlyTotalPaymentDouble = sumOfWorkshopsPaymentDouble + tenPercent;
result.MonthlyTotalPaymentStr = monthlyTotalPaymentDouble.ToMoney();
var installmentList = InstitutionContractRepository.InstitutionMonthlyInstallmentCaculation(duration, monthlyTotalPaymentDouble, installmentstart);
var installmentList = InstitutionContractRepository.InstitutionMonthlyInstallmentCaculation((int)duration, monthlyTotalPaymentDouble, installmentstart);
#endregion

View File

@@ -12,6 +12,8 @@ public class InstitutionContractAmendmentMapping:IEntityTypeConfiguration<Instit
builder.HasKey(x => x.id);
builder.Property(x => x.VerifyCode).HasMaxLength(10);
builder.Property(x => x.VerifierFullName).HasMaxLength(100);
builder.Property(x => x.VerifierPhoneNumber).HasMaxLength(20);
builder.HasOne(x => x.InstitutionContract)
.WithMany(x => x.Amendments)

View File

@@ -30,6 +30,8 @@ public class InstitutionContractMapping : IEntityTypeConfiguration<InstitutionCo
builder.Property(x => x.HasValueAddedTax).HasMaxLength(10);
builder.Property(x => x.VerifyCode).HasMaxLength(20);
builder.Property(x => x.VerifierFullName).HasMaxLength(100);
builder.Property(x => x.VerifierPhoneNumber).HasMaxLength(20);
builder.Property(x => x.VerificationStatus).HasConversion<string>().HasMaxLength(122);

View File

@@ -0,0 +1,74 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CompanyManagment.EFCore.Migrations
{
/// <inheritdoc />
public partial class AddVerifierdetailsininstituioncontractandamendment : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "VerifierFullName",
table: "InstitutionContracts",
type: "nvarchar(100)",
maxLength: 100,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "VerifierPhoneNumber",
table: "InstitutionContracts",
type: "nvarchar(20)",
maxLength: 20,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "VerifierFullName",
table: "InstitutionContractAmendments",
type: "nvarchar(100)",
maxLength: 100,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "VerifierPhoneNumber",
table: "InstitutionContractAmendments",
type: "nvarchar(20)",
maxLength: 20,
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "VerifyCodeCreation",
table: "InstitutionContractAmendments",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "VerifierFullName",
table: "InstitutionContracts");
migrationBuilder.DropColumn(
name: "VerifierPhoneNumber",
table: "InstitutionContracts");
migrationBuilder.DropColumn(
name: "VerifierFullName",
table: "InstitutionContractAmendments");
migrationBuilder.DropColumn(
name: "VerifierPhoneNumber",
table: "InstitutionContractAmendments");
migrationBuilder.DropColumn(
name: "VerifyCodeCreation",
table: "InstitutionContractAmendments");
}
}
}

View File

@@ -3205,6 +3205,14 @@ namespace CompanyManagment.EFCore.Migrations
.HasMaxLength(122)
.HasColumnType("nvarchar(122)");
b.Property<string>("VerifierFullName")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<string>("VerifierPhoneNumber")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property<string>("VerifyCode")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
@@ -3247,10 +3255,21 @@ namespace CompanyManagment.EFCore.Migrations
b.Property<DateTime>("VerificationCreation")
.HasColumnType("datetime2");
b.Property<string>("VerifierFullName")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<string>("VerifierPhoneNumber")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property<string>("VerifyCode")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.Property<DateTime>("VerifyCodeCreation")
.HasColumnType("datetime2");
b.HasKey("id");
b.HasIndex("InstitutionContractId");

View File

@@ -1062,5 +1062,29 @@ public class EmployeeRepository : RepositoryBase<long, Employee>, IEmployeeRepos
}
#endregion
public async Task<List<EmployeeSelectListViewModel>> GetWorkingEmployeesSelectList(long workshopId)
{
var dateNow = DateTime.Now.Date;
var workshopActiveLeftWorksQuery = _context.LeftWorkList.Where(x => x.WorkshopId == workshopId &&
x.StartWorkDate <= dateNow && x.LeftWorkDate > dateNow);
var workshopActiveInsuranceLeftWorksQuery = _context.LeftWorkInsuranceList.Where(x => x.WorkshopId == workshopId &&
x.StartWorkDate <= dateNow && (x.LeftWorkDate > dateNow || x.LeftWorkDate == null));
var employeesQuery = _context.Employees.Where(x => workshopActiveLeftWorksQuery.Any(y => y.EmployeeId == x.id) ||
workshopActiveInsuranceLeftWorksQuery.Any(y => y.EmployeeId == x.id));
return await employeesQuery.Select(x => new EmployeeSelectListViewModel()
{
Id = x.id,
EmployeeFullName = x.FullName
}).ToListAsync();
}
#endregion
}

View File

@@ -10,6 +10,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AccountManagement.Application.Contracts.SubAccount;
using ZstdSharp.Unsafe;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
namespace CompanyManagment.EFCore.Repository;
@@ -266,14 +267,26 @@ public class FinancialStatmentRepository : RepositoryBase<long, FinancialStatmen
public async Task<FinancialStatmentDetailsByContractingPartyViewModel> GetDetailsByContractingParty(long contractingPartyId,FinancialStatementSearchModel searchModel)
{
var contractingParty = await _context.PersonalContractingParties
.FirstOrDefaultAsync(x=>x.id == contractingPartyId);
if (contractingParty == null)
throw new NotFoundException("طرف حساب یافت نشد");
var financialStatement = await _context.FinancialStatments
.Include(x=>x.FinancialTransactionList)
.FirstOrDefaultAsync(x=>x.ContractingPartyId == contractingPartyId);
if (financialStatement == null)
{
throw new NotFoundException("وضعیت مالی مورد نظر یافت نشد");
financialStatement = new FinancialStatment(contractingPartyId,contractingParty.FName+" "+contractingParty.LName);
await _context.AddAsync(financialStatement);
await _context.SaveChangesAsync();
}
bool searched = false;
#region Search
@@ -383,7 +396,8 @@ public class FinancialStatmentRepository : RepositoryBase<long, FinancialStatmen
};
list.Add(item);
}
list.Reverse();
var res = new FinancialStatmentDetailsByContractingPartyViewModel()
{
@@ -392,7 +406,7 @@ public class FinancialStatmentRepository : RepositoryBase<long, FinancialStatmen
TotalCredit = financialStatement.FinancialTransactionList.Sum(x => x.Creditor),
TotalDebt = financialStatement.FinancialTransactionList.Sum(x => x.Deptor),
ContractingPartyName = financialStatement.ContractingPartyName,
List = list.OrderByDescending(x=>x.DateTimeGr).ToList(),
List = list,
};
return res;
}

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
using _0_Framework.Application;
@@ -16,6 +17,7 @@ using Company.Domain.empolyerAgg;
using Company.Domain.FinancialStatmentAgg;
using Company.Domain.FinancialTransactionAgg;
using Company.Domain.InstitutionContractAgg;
using Company.Domain.InstitutionContractAmendmentTempAgg;
using Company.Domain.InstitutionContractContactInfoAgg;
using Company.Domain.InstitutionContractExtensionTempAgg;
using Company.Domain.InstitutionPlanAgg;
@@ -23,9 +25,11 @@ using Company.Domain.WorkshopAgg;
using CompanyManagment.App.Contracts.Employer;
using CompanyManagment.App.Contracts.InstitutionContract;
using CompanyManagment.App.Contracts.InstitutionContractContactinfo;
using CompanyManagment.App.Contracts.Law;
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
using CompanyManagment.App.Contracts.Workshop;
using CompanyManagment.App.Contracts.WorkshopPlan;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
@@ -42,9 +46,20 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
private readonly IEmployerRepository _employerRepository;
private readonly IWorkshopRepository _workshopRepository;
private readonly IMongoCollection<InstitutionContractExtensionTemp> _institutionExtensionTemp;
private readonly IMongoCollection<InstitutionContractAmendmentTemp> _institutionAmendmentTemp;
private readonly IPlanPercentageRepository _planPercentageRepository;
private readonly ISmsService _smsService;
private readonly InstitutionContratVerificationParty _firstParty = new()
{
Address = "رشت - خیابان حاجی آیاد - کوچه سپهدار - ساختمان داماش - واحد 17",
PhoneNumber = "09111485044",
CeoName = "سید حسن مصباح",
CompanyNameOrFullName = "نور داد مهر گستر کاسپین",
NationalCodeOrNationalId = "14009970584",
LegalType = LegalType.Legal
};
public InstitutionContractRepository(CompanyContext context, IEmployerRepository employerRepository,
IWorkshopRepository workshopRepository, IMongoDatabase database,
IPlanPercentageRepository planPercentageRepository, ISmsService smsService) : base(context)
@@ -56,6 +71,8 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
_smsService = smsService;
_institutionExtensionTemp =
database.GetCollection<InstitutionContractExtensionTemp>("InstitutionContractExtensionTemp");
_institutionAmendmentTemp =
database.GetCollection<InstitutionContractAmendmentTemp>("InstitutionContractAmendmentTemp");
}
public EditInstitutionContract GetDetails(long id)
@@ -1240,7 +1257,6 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
TotalCount = await joinedQuery.CountAsync(),
List = list.Select(x =>
{
Console.WriteLine(x.contractingParty.id);
var workshops = x.contractingParty.Employers
.SelectMany(e => e.WorkshopEmployers.Select(we => we.Workshop)).DistinctBy(w => w.id).ToList();
@@ -1267,7 +1283,6 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
var workshopDetails = currentStateWorkshops?.Select(w =>
{
Workshop workshopSelected = null;
Console.WriteLine(w.WorkshopId);
if (w.WorkshopId != null && workshops.Select(ww => ww.id).Contains(w.WorkshopId.Value))
{
workshopSelected = workshops.First(ww => ww.id == w.WorkshopId.Value);
@@ -1289,6 +1304,10 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
}
};
}).ToList() ?? [];
var employeesCount = _context.LeftWorkList
.Where(l => workshops.Select(w => w.id).Contains(l.WorkshopId))
.Count(l => l.StartWorkDate <= DateTime.Now && l.LeftWorkDate >= DateTime.Now);
return new GetInstitutionContractListItemsViewModel()
{
ContractAmount = x.contract.ContractAmount,
@@ -1303,14 +1322,17 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
Id = x.contract.id,
ContractNo = x.contract.ContractNo,
ArchiveNo = archiveCode.ToString(),
EmployeesCount = _context.LeftWorkList
.Where(l => workshops.Select(w => w.id).Contains(l.id))
.Count(l => l.StartWorkDate <= DateTime.Now && l.LeftWorkDate >= DateTime.Now),
EmployeesCount = employeesCount,
EmployerNames = employers.Select(e => e.FullName).ToList(),
ListStatus = status,
IsExpired = x.contract.ContractEndGr <= endThisMontGr,
ContractingPartyId = x.contractingParty.id,
Workshops = workshopDetails
Workshops = workshopDetails,
IsInPersonContract = x.contract.WorkshopGroup?.CurrentWorkshops
.Any(y=>y.Services.ContractInPerson)??true,
IsOldContract = x.contract.WorkshopGroup?.CurrentWorkshops == null
|| x.contract.WorkshopGroup.CurrentWorkshops.Count == 0
|| x.contract.WorkshopGroup.CurrentWorkshops.Any(y => y.Price == 0)
};
}).ToList()
};
@@ -1789,15 +1811,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
query.party.IsLegal == "حقیقی" ? query.party.Nationalcode : query.party.NationalId,
LegalType = query.party.IsLegal == "حقیقی" ? LegalType.Real : LegalType.Legal,
},
FirstParty = new InstitutionContratVerificationParty()
{
Address = "رشت - خیابان حاجی آیاد - کوچه سپهدار - ساختمان داماش - واحد 17",
PhoneNumber = "09111111111",
CeoName = "سید حسن مصباح",
CompanyNameOrFullName = "نور داد مهر گستر کاسپین",
NationalCodeOrNationalId = "1111111111",
LegalType = LegalType.Legal
}
FirstParty =_firstParty
};
return res;
@@ -2239,7 +2253,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
extensionNo, workshopsCount, employeeCount,
previousInstitutionContract.Description,
"NotOfficial", "JobRelation", hasValueAddedTax,
payment.Tax.MoneyToDouble(),[],
payment.Tax.MoneyToDouble(), [],
request.LawId);
await CreateAsync(entity);
@@ -2249,26 +2263,25 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
var workshopDetail = new InstitutionContractWorkshopInitial(
workshop.WorkshopName, workshop.RollCall, workshop.RollCallInPerson,
workshop.CustomizeCheckout, workshop.ContractAndCheckout,
workshop.ContractAndCheckoutInPerson, workshop.Insurance,
workshop.ContractAndCheckoutInPerson, workshop.Insurance,
workshop.InsuranceInPerson, workshop.CountPerson, workshop.Price);
workshopDetail.SetWorkshopGroup(entity.WorkshopGroup);
if (workshop.WorkshopId != 0)
{
workshopDetail.SetWorkshopId(workshop.WorkshopId);
}
// Set parent reference
// Add to the parent's collection
entity.WorkshopGroup.InitialWorkshops.Add(workshopDetail);
}
// Save the changes again
await SaveChangesAsync();
FinancialStatment financialStatement;
if (_context.FinancialStatments.Any(x => x.ContractingPartyId == contractingParty.id))
{
@@ -2330,7 +2343,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
await SaveChangesAsync();
await _smsService.SendInstitutionVerificationLink(contractingParty.Phone, contractingPartyFullName,
entity.PublicId);
entity.PublicId, contractingParty.id, entity.id);
await SaveChangesAsync();
@@ -2346,46 +2359,251 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
.Include(x => x.WorkshopGroup)
.ThenInclude(x => x.CurrentWorkshops)
.FirstOrDefaultAsync(x => x.id == institutionContractId);
var workshops = institutionContract.WorkshopGroup.CurrentWorkshops.Select(x => new WorkshopTempViewModel()
if (institutionContract.WorkshopGroup.CurrentWorkshops.Any(x => x.Price == 0))
{
Id = x.id,
ContractAndCheckout = x.Services.Contract,
ContractAndCheckoutInPerson = x.Services.ContractInPerson,
CustomizeCheckout = x.Services.CustomizeCheckout,
CountPerson = x.PersonnelCount,
Insurance = x.Services.Insurance,
InsuranceInPerson = x.Services.InsuranceInPerson,
RollCall = x.Services.RollCall,
WorkshopName = x.WorkshopName,
WorkshopServicesAmountStr = x.Price.ToMoney(),
WorkshopServicesAmount = x.Price,
WorkshopId = x.WorkshopId ?? 0,
RollCallInPerson = x.Services.RollCallInPerson,
throw new BadRequestException(
"این قرارداد قابل ارتقا به صورت ظاهری نیست لطفا به صورت دیتابیسی اقدام به ویرایش کنید");
}
}).ToList();
var workshops = institutionContract.WorkshopGroup.CurrentWorkshops
.Select(x => new InstitutionContractAmendmentTempPrevWorkshop(x.WorkshopName,x.PersonnelCount,
x.Services.Contract,x.Services.ContractInPerson,x.Services.Insurance,
x.Services.InsuranceInPerson,x.Services.RollCall,x.Services.RollCallInPerson,
x.Services.CustomizeCheckout,x.Price,
x.WorkshopId??0,x.id)).ToList();
var temp = new InstitutionContractAmendmentTemp(workshops, institutionContractId);
await _institutionAmendmentTemp.InsertOneAsync(temp);
var prevWorkshops = workshops.Select(x =>
new InstitutionContractAmendmentTempWorkshopViewModel()
{
WorkshopName = x.WorkshopName,
CountPerson = x.CountPerson,
ContractAndCheckout = x.ContractAndCheckout,
ContractAndCheckoutInPerson = x.ContractAndCheckoutInPerson,
Insurance = x.Insurance,
InsuranceInPerson = x.InsuranceInPerson,
RollCall = x.RollCall,
RollCallInPerson = x.RollCallInPerson,
CustomizeCheckout = x.CustomizeCheckout,
PriceStr = x.Price.ToMoney(),
Price = x.Price,
WorkshopId = x.WorkshopId,
WorkshopTempId = x.Id,
CurrentWorkshopId = x.CurrentWorkshopId,
TempId =temp.Id
})
.ToList();
var res = new InstitutionContractAmendmentWorkshopsResponse()
{
Workshops = workshops
Workshops = prevWorkshops,
TempId = temp.Id
};
return res;
}
public async Task<InsitutionContractAmendmentPaymentResponse> GetAmendmentPaymentDetails(InsitutionContractAmendmentPaymentRequest request)
public async Task<InsitutionContractAmendmentPaymentResponse> GetAmendmentPaymentDetails(
InsitutionContractAmendmentPaymentRequest request)
{
var institutionContract =await _context.InstitutionContractSet
.Include(x => x.WorkshopGroup)
.ThenInclude(x => x.CurrentWorkshops)
.FirstOrDefaultAsync(x => x.id == request.InstitutionContractId);
if (institutionContract == null)
throw new NotFoundException("قرارداد مالی یافت نشد");
var institutionContractAmendmentTemp = await _institutionAmendmentTemp
.Find(x=>x.Id == request.TempId)
.FirstOrDefaultAsync();
if (institutionContractAmendmentTemp == null)
throw new NotFoundException("دیتای وارد شده نامعتبر است");
var amendmentStart = DateTime.Now;
var amendmentEnd = institutionContract.ContractEndGr;
//TODO : محاسبه مبلغ بر اساس کارگاه های انتخاب شده
var res = new InsitutionContractAmendmentPaymentResponse();
return res;
var institutionContract = await _context.InstitutionContractSet
.Include(x=>x.WorkshopGroup)
.ThenInclude(x=>x.CurrentWorkshops)
.FirstOrDefaultAsync(x => x.id == institutionContractAmendmentTemp.InstitutionContractId);
if (institutionContract == null)
throw new NotFoundException("قرارداد مؤسسه یافت نشد");
var amendmentEnd = institutionContract.ContractEndGr;
var haContractInPerson = institutionContract.WorkshopGroup.CurrentWorkshops
.Any(x => x.Services.ContractInPerson);
if (!haContractInPerson)
{
if (institutionContractAmendmentTemp.NewWorkshops.Any(x => x.ContractAndCheckoutInPerson))
{
throw new BadRequestException("برای قرارداد آنلاین نمیتوان سرویس حضوری انتخاب کرد");
}
}
var pc = new PersianCalendar();
int startYear = pc.GetYear(amendmentStart);
int startMonth = pc.GetMonth(amendmentStart);
int startDay = pc.GetDayOfMonth(amendmentStart);
int endYear = pc.GetYear(amendmentEnd);
int endMonth = pc.GetMonth(amendmentEnd);
int endDay = pc.GetDayOfMonth(amendmentEnd);
// اختلاف خام ماه‌ها
int monthDiff = (endYear - startYear) * 12 + (endMonth - startMonth);
// اگر حتی چند روز از ماه بعدی هم گذشته بود → رند به بالا
if (endDay > startDay)
monthDiff++;
var sumOneMonth = institutionContractAmendmentTemp.NewWorkshops.Sum(x => x.PriceDifference);
var baseAmount = monthDiff * sumOneMonth;
var tax = baseAmount*0.10;
var totalPayment = tax+baseAmount;
var res = new InsitutionContractAmendmentPaymentResponse()
{
ContractStart = amendmentStart.ToFarsi(),
ContractEnd = amendmentEnd.ToFarsi(),
OneMonthAmount = sumOneMonth.ToMoney(),
TotalAmount = baseAmount.ToMoney(),
};
res.OneTime = new InstitutionContractPaymentOneTimeViewModel()
{
TotalAmount = baseAmount.ToMoney(),
PaymentAmount = totalPayment.ToMoney(),
Tax = tax.ToMoney()
};
if (haContractInPerson)
{
var installment = InstitutionMonthlyInstallmentCaculation(monthDiff,totalPayment, amendmentStart.ToFarsi());
var firstPrevInstallment = installment.First();
var lastPrevInstallment = installment.Last();
var firstInstallment = new MonthlyInstallment()
{
InstallmentAmountStr = firstPrevInstallment.InstallmentAmountStr,
InstallmentCounter = firstPrevInstallment.InstallmentCounter,
InstalmentDate = amendmentStart.ToFarsi()
};
var lastInstallment = new MonthlyInstallment()
{
InstallmentAmountStr = lastPrevInstallment.InstallmentAmountStr,
InstallmentCounter = lastPrevInstallment.InstallmentCounter,
InstalmentDate = lastPrevInstallment.InstalmentDate
};
installment.Remove(firstPrevInstallment);
installment.Remove(lastPrevInstallment);
installment.Insert(0, firstInstallment);
installment.Add(lastInstallment);
res.Monthly = new InstitutionContractPaymentMonthlyViewModel()
{
Installments = installment,
TotalAmount = baseAmount.ToMoney(),
PaymentAmount = totalPayment.ToMoney(),
Tax = tax.ToMoney()
};
}
return res;
}
public async Task<InsertAmendmentTempWorkshopResponse> InsertAmendmentTempWorkshops(
InstitutionContractAmendmentTempWorkshopViewModel request)
{
var amendmentTemp =await _institutionAmendmentTemp
.Find(x=> x.Id == request.TempId).FirstOrDefaultAsync();
if (amendmentTemp == null)
throw new BadRequestException("دیتای وارد شده نامعتبر است");
var workshopTemp = amendmentTemp.NewWorkshops
.FirstOrDefault(x => x.Id == request.WorkshopTempId);
var planForWorkshop = new WorkshopTempViewModel()
{
WorkshopName = request.WorkshopName,
CountPerson = request.CountPerson,
ContractAndCheckout = request.ContractAndCheckout,
ContractAndCheckoutInPerson = request.ContractAndCheckoutInPerson,
Insurance = request.Insurance,
InsuranceInPerson = request.InsuranceInPerson,
RollCall = request.RollCall,
RollCallInPerson = request.RollCallInPerson,
CustomizeCheckout = request.CustomizeCheckout
};
var price = _planPercentageRepository.GetInstitutionPlanForWorkshop(planForWorkshop)
.OnlineAndInPersonSumAmountDouble;
if (workshopTemp == null)
{
var newWorkshopTemp = new InstitutionContractAmendmentTempNewWorkshop(request.WorkshopName,
request.CountPerson,
request.ContractAndCheckout, request.ContractAndCheckoutInPerson,
request.Insurance, request.InsuranceInPerson,
request.RollCall, request.RollCallInPerson,
request.CustomizeCheckout, price,
request.WorkshopId,0,price);
workshopTemp = newWorkshopTemp;
amendmentTemp.NewWorkshops.Add(newWorkshopTemp);
await _institutionAmendmentTemp
.ReplaceOneAsync(x => x.Id == amendmentTemp.Id, amendmentTemp);
}
else
{
amendmentTemp.NewWorkshops.Remove(workshopTemp);
var differencePrice = price - workshopTemp.Price;
workshopTemp.Edit(request.WorkshopName, request.CountPerson,
request.ContractAndCheckout, request.ContractAndCheckoutInPerson,
request.Insurance, request.InsuranceInPerson,
request.RollCall,
request.CustomizeCheckout, price,differencePrice);
amendmentTemp.NewWorkshops.Add(workshopTemp);
await _institutionAmendmentTemp
.ReplaceOneAsync(x => x.Id == amendmentTemp.Id, amendmentTemp);
}
return new InsertAmendmentTempWorkshopResponse()
{
WorkshopTempId = workshopTemp.Id,
Amount = workshopTemp.PriceDifference.ToMoney()
};
}
public async Task RemoveAmendmentWorkshops(Guid workshopTempId)
{
var amendmentTemp = await _institutionAmendmentTemp.Find(x => x.NewWorkshops.Any(w => w.Id == workshopTempId))
.FirstOrDefaultAsync();
if (amendmentTemp == null)
throw new BadRequestException("دیتای وارد شده نامعتبر است");
var workshopTemp = amendmentTemp.NewWorkshops.FirstOrDefault(x => x.Id == workshopTempId);
if (workshopTemp == null)
throw new BadRequestException("دیتای وارد شده نامعتبر است");
if (workshopTemp.CurrentWorkshopId!=0)
throw new BadRequestException("شما نمی توانید این کارگاه را حذف کنید زیرا در قرارداد اصلی وجود دارد");
amendmentTemp.NewWorkshops.Remove(workshopTemp);
await _institutionAmendmentTemp.ReplaceOneAsync(x => x.Id == amendmentTemp.Id, amendmentTemp);
}
public async Task<List<InstitutionContractSelectListViewModel>> GetInstitutionContractSelectList(string search,
string selected)
@@ -2441,6 +2659,112 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
}
public async Task<List<InstitutionContractPrintViewModel>> PrintAllAsync(List<long> ids)
{
var query =_context.InstitutionContractSet
.Include(x=>x.WorkshopGroup)
.ThenInclude(x=>x.InitialWorkshops)
.Include(x=>x.WorkshopGroup)
.ThenInclude(x=>x.CurrentWorkshops)
.Where(x=>ids.Contains(x.id));
var contractingPartyIds = query.Select(x => x.ContractingPartyId).ToList();
var contractingParties = await _context.PersonalContractingParties
.Where(x => contractingPartyIds.Contains(x.id))
.ToListAsync();
var list = query.ToList();
if (list.Count == 0)
throw new NotFoundException("قرارداد مؤسسه یافت نشد");
var res = new List<InstitutionContractPrintViewModel>();
foreach (var institution in list)
{
var contractingParty = contractingParties.FirstOrDefault(x => x.id == institution.ContractingPartyId);
if (contractingParty == null)
{
throw new NotFoundException("طرف حساب یافت نشد");
}
var law = await _context.Laws
.FirstOrDefaultAsync(x => x.id == institution.LawId);
var secondParty = new InstitutionContratVerificationParty()
{
Address = contractingParty.Address,
PhoneNumber = contractingParty.Phone,
CeoName = contractingParty.IsLegal == "حقیقی"
? $"{contractingParty.FName} {contractingParty.LName}"
: $"{contractingParty.CeoFName} {contractingParty.CeoLName}",
CompanyNameOrFullName = contractingParty.IsLegal == "حقیقی"
? $"{contractingParty.FName} {contractingParty.LName}"
: contractingParty.LName,
NationalCodeOrNationalId =
contractingParty.IsLegal == "حقیقی" ? contractingParty.Nationalcode : contractingParty.NationalId,
LegalType = contractingParty.IsLegal == "حقیقی" ? LegalType.Real : LegalType.Legal,
};
var lawViewModel = new LawViewModel()
{
Id = law.id,
CreatedAt = law.CreationDate,
HeadTitle = law.HeadTitle,
IsActive = law.IsActive,
Items = law.Items.Select(x => new LawItemViewModel()
{
Details = x.Details,
Header = x.Header
}).ToList(),
Notifications = law.Notifications,
Title = law.Title,
Type = law.Type,
Version = law.Version
};
var item = new InstitutionContractPrintViewModel()
{
ContractStart = institution.ContractStartFa,
ContractEnd = institution.ContractEndFa,
ContractNo = institution.ContractNo,
CreationDate = institution.CreationDate.ToFarsi(),
FirstParty = _firstParty,
SecondParty = secondParty,
LawViewModel = lawViewModel,
Obligation = institution.Obligation.ToMoney(),
PaymentPrice = institution.TotalAmount.ToMoney(),
TotalPrice = (institution.TotalAmount - institution.ValueAddedTax).ToMoney(),
TaxPrice = institution.ValueAddedTax.ToMoney(),
VerifierFullName = institution.VerifierFullName,
VerifierPhoneNumber = institution.VerifierPhoneNumber,
VerifyCode = institution.VerifyCode,
VerifyDateTime = institution.VerifyCodeCreation.ToFarsi(),
Workshops = institution.WorkshopGroup.CurrentWorkshops
.Select(x => new GetInstitutionVerificationDetailsWorkshopsViewModel()
{
Name = x.WorkshopName,
PersonnelCount = x.PersonnelCount,
Services = new WorkshopServicesViewModel()
{
Contract = x.Services.Contract,
ContractInPerson = x.Services.ContractInPerson,
CustomizeCheckout = x.Services.CustomizeCheckout,
Insurance = x.Services.Insurance,
InsuranceInPerson = x.Services.InsuranceInPerson,
RollCall = x.Services.RollCall,
RollCallInPerson = x.Services.RollCallInPerson
},
Price = x.Price.ToMoney()
}).ToList()
};
res.Add(item);
}
return res;
}
private InstitutionContractExtensionPaymentResponse CalculateInPersonPayment(
InstitutionContractExtensionPlanDetail selectedPlan, double baseAmount, double tenPercent,
@@ -2464,7 +2788,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
// حالت پرداخت اقساطی
var monthlyTax = baseAmount * 0.10;
var monthlyTotal = baseAmount + monthlyTax;
var installments = InstitutionMonthlyInstallmentCaculation(duration, monthlyTotal, selectedPlan.ContractStart);
var installments = InstitutionMonthlyInstallmentCaculation((int)duration, monthlyTotal, selectedPlan.ContractStart);
res.Monthly = new()
{
@@ -2546,7 +2870,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
return result;
}
public static List<MonthlyInstallment> InstitutionMonthlyInstallmentCaculation(InstitutionContractDuration duration,
public static List<MonthlyInstallment> InstitutionMonthlyInstallmentCaculation(int duration,
double monthlyTotalPaymentDouble,
string installmentstart)
{
@@ -2554,7 +2878,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
var installmentList = new List<MonthlyInstallment>();
int instalmentCount = (int)duration;
int instalmentCount = duration;
var instalmentAmount = monthlyTotalPaymentDouble / instalmentCount;
int currentInstallmentStartDay = int.Parse(installmentstart.Substring(8, 2));
bool endOfMonth = currentInstallmentStartDay == 31;
@@ -2614,6 +2938,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
#endregion
#region CustomViewModels

View File

@@ -1724,9 +1724,86 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
.Include(x => x.LeftWorkInsurances)
.Where(x => x.LeftWorkInsurances.Any(l => l.StartWorkDate <= firstDayOfMonth &&
(l.LeftWorkDate == null || l.LeftWorkDate >= firstDayOfMonth)));
var query = notCreatedWorkshop.Select(result=>new InsuranceListViewModel
{
Year = searchModel.Year,
Month = searchModel.Month,
WorkShopId = result.id,
WorkShopCode = result.InsuranceWorkshopInfo != null
? result.InsuranceWorkshopInfo.InsuranceCode
: result.InsuranceCode,
WorkShopName = result.InsuranceWorkshopInfo != null
? result.InsuranceWorkshopInfo.WorkshopName
: result.WorkshopFullName,
TypeOfInsuranceSend = result.TypeOfInsuranceSend == "NormalList" ? "عادی" :
result.TypeOfInsuranceSend == "Govermentlist" ? "کمک دولت" :
result.TypeOfInsuranceSend == "Familylist" ? "خانوادگی" : "",
FixedSalary = result.FixedSalary,
StrFixedSalary = result.FixedSalary ? "دارد" : "ندارد",
EmployerName = result.InsuranceWorkshopInfo != null
? result.InsuranceWorkshopInfo.EmployerName
: result.WorkshopFullName,
Branch = "",
City = "",
ArchiveCode = result.ArchiveCode,
});
if (!string.IsNullOrEmpty(searchModel.Month) && searchModel.Month != "0")
query = query.Where(x => x.Month == searchModel.Month).OrderByDescending(x => x.WorkShopName)
.ThenByDescending(x => x.EmployerName).ThenByDescending(x => x.Year);
var workshopList = await notCreatedWorkshop.Skip(searchModel.PageIndex).Take(30).ToListAsync();
var workshopIds = workshopList.Select(x=>x.id);
if (!string.IsNullOrEmpty(searchModel.Year) && searchModel.Year != "0")
query = query.Where(x => x.Year == searchModel.Year).OrderByDescending(x => x.EmployerName)
.ThenByDescending(x => x.WorkShopName).ThenByDescending(x => x.Month);
if (!string.IsNullOrEmpty(searchModel.WorkShopCode))
query = query.Where(x => x.WorkShopCode == searchModel.WorkShopCode).OrderByDescending(x => x.Year)
.ThenByDescending(x => x.Month).ThenByDescending(x => x.EmployerName);
if (!string.IsNullOrEmpty(searchModel.WorkShopName))
query = query.Where(x => x.WorkShopName.Contains(searchModel.WorkShopName))
.OrderByDescending(x => x.EmployerName).ThenByDescending(x => x.Year).OrderByDescending(x => x.Month);
if (searchModel.WorkshopId > 0)
{
var workshopName = query.FirstOrDefault(u => u.WorkShopId == searchModel.WorkshopId)?.WorkShopName;
query = query.Where(x => x.WorkShopName.Contains(workshopName)).OrderByDescending(x => x.EmployerName)
.ThenByDescending(x => x.Year).ThenByDescending(x => x.Month);
}
if (searchModel.EmployerId > 0)
{
var employerName = query.FirstOrDefault(u => u.EmployerId == searchModel.EmployerId)?.EmployerName;
query = query.Where(x => x.EmployerName.Contains(employerName)).OrderByDescending(x => x.EmployerName)
.ThenByDescending(x => x.Year).ThenByDescending(x => x.Month);
}
if (!string.IsNullOrEmpty(searchModel.EmployerName))
query = query.Where(x => x.EmployerName.Contains(searchModel.EmployerName))
.OrderByDescending(x => x.EmployerName).ThenByDescending(x => x.Year).OrderByDescending(x => x.Month);
if (searchModel.FixedSalary != null)
query = query.Where(x => x.FixedSalary == searchModel.FixedSalary);
if (!string.IsNullOrEmpty(searchModel.TypeOfInsuranceSend) && searchModel.TypeOfInsuranceSend != "0")
query = query.Where(x => x.TypeOfInsuranceSend == searchModel.TypeOfInsuranceSend);
if (!string.IsNullOrEmpty(searchModel.City) && searchModel.City != "0")
query = query.Where(x => x.City == searchModel.City);
if (!string.IsNullOrEmpty(searchModel.Branch))
query = query.Where(x => x.Branch.Contains(searchModel.Branch));
var workshopList = await query.Skip(searchModel.PageIndex).Take(30).ToListAsync();
var workshopIds = workshopList.Select(x=>x.WorkShopId);
var employers =await _context.WorkshopEmployers
.Where(x=>workshopIds.Contains(x.WorkshopId))
@@ -1735,20 +1812,16 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
var res = workshopList.Select(x =>
{
var employer = employers.FirstOrDefault(e => e.WorkshopId ==x.id)?.Employer;
var employer = employers.FirstOrDefault(e => e.WorkshopId ==x.WorkShopId)?.Employer;
return new InsuranceListViewModel
{
WorkShopId = x.id,
WorkShopCode = x.InsuranceCode,
WorkShopName = x.InsuranceWorkshopInfo != null
? x.InsuranceWorkshopInfo.WorkshopName
: x.WorkshopFullName,
WorkShopId = x.WorkShopId,
WorkShopCode = x.WorkShopCode,
WorkShopName = x.WorkShopName,
EmployerName = employer != null
? employer.FullName
: (x.InsuranceWorkshopInfo != null
? x.InsuranceWorkshopInfo.EmployerName
: x.WorkshopFullName),
: (x.EmployerName),
Year = searchModel.Year,
Month = searchModel.Month,
TypeOfInsuranceSend = x.TypeOfInsuranceSend == "NormalList" ? "عادی" :

View File

@@ -1052,11 +1052,11 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
//گزارش آنلاین حضور غیاب کارگاه
public CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId)
public CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId,
WorkshopCurrentDayRollCallSearchModel searchModel)
{
var date = DateTime.Now.Date;
//get active leaves for workshop which are active today and accepted and are either روزانه and استحقاقی or استعلاجی
var leaves = _context.LeaveList
.Where(x =>
@@ -1070,7 +1070,11 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
//var workingEmployees =
// _context.LeftWorkList.Where(x => x.WorkshopId == workshopId && x.StartWorkDate < date && x.LeftWorkDate.Date > date);
if (searchModel.PersonnelCode>0)
{
personnelCodes = personnelCodes.Where(x=>x.PersonnelCode == searchModel.PersonnelCode);
}
//get activated employees
var activeEmployees =
@@ -1084,6 +1088,15 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
x.WorkshopId == workshopId && (x.ShiftDate.Date == date || x.EndDate == null) && x.RollCallModifyType != RollCallModifyType.Undefined);
if (searchModel.EmployeeId>0)
{
leaves = leaves.Where(x=>x.WorkshopId == searchModel.EmployeeId);
personnelCodes = personnelCodes.Where(x=>x.EmployeeId == searchModel.EmployeeId);
activeEmployees = activeEmployees.Where(x=>x.EmployeeId == searchModel.EmployeeId);
rollCallsQuery = rollCallsQuery.Where(x=>x.EmployeeId == searchModel.EmployeeId);
}
var mustBePresent = activeEmployees.Where(x => !leaves.Any(y => y.EmployeeId == x.EmployeeId));
@@ -1517,7 +1530,9 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
StartDate = y.StartDate.Value.ToString("HH:mm"),
EndDate = y.EndDate!.Value.ToString("HH:mm"),
StartDateGr = y.StartDate.Value,
EndDateGr = y.EndDate.Value
EndDateGr = y.EndDate.Value,
EntryTimeDifferences = CalculateEntryTimeDifferences( y.EarlyEntryDuration, y.LateEntryDuration),
ExitTimeDifferences = CalculateExitTimeDifferences(y.EarlyExitDuration, y.LateExitDuration)
}),
TotalWorkingHoursSpan = new TimeSpan(rollCallsList.Where(y => x.Date == y.ShiftDate.Date)
.Sum(y => (y.EndDate!.Value - y.StartDate.Value).Ticks)),

View File

@@ -1,28 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices.ComTypes;
using System.Security.AccessControl;
using System.Threading;
using System.Threading.Tasks;
using _0_Framework.Application;
using _0_Framework.Application.Sms;
using Company.Domain.SmsResultAgg;
using CompanyManagment.App.Contracts.SmsResult;
using IPE.SmsIrClient;
using IPE.SmsIrClient.Models.Requests;
using IPE.SmsIrClient.Models.Results;
using Microsoft.Extensions.Configuration;
using static System.Runtime.InteropServices.JavaScript.JSType;
namespace _0_Framework.Application.Sms;
namespace CompanyManagment.EFCore.Services;
public class SmsService : ISmsService
{
private readonly IConfiguration _configuration;
private readonly ISmsResultRepository _smsResultRepository;
public SmsIr SmsIr { get; set; }
public SmsService(IConfiguration configuration)
public SmsService(IConfiguration configuration, ISmsResultRepository smsResultRepository)
{
_configuration = configuration;
_smsResultRepository = smsResultRepository;
SmsIr = new SmsIr("Og5M562igmzJRhQPnq0GdtieYdLgtfikjzxOmeQBPxJjZtyge5Klc046Lfw1mxSa");
}
@@ -204,8 +206,7 @@ public class SmsService : ISmsService
int pageSize = 100; // max: 100
SmsIr smsIr = new SmsIr("Og5M562igmzJRhQPnq0GdtieYdLgtfikjzxOmeQBPxJjZtyge5Klc046Lfw1mxSa");
var response = await smsIr.GetArchivedReportAsync(pageNumber, pageSize, unixTimestamp, unixTimestamp2);
MessageReportResult[] messages = response.Data;
foreach (var message in messages)
{
@@ -331,7 +332,7 @@ public class SmsService : ISmsService
}
}
public async Task<bool> SendInstitutionVerificationLink(string number,string fullName, Guid institutionId)
public async Task<bool> SendInstitutionVerificationLink(string number, string fullName, Guid institutionId, long contractingPartyId, long institutionContractId)
{
var guidStr=institutionId.ToString();
var firstPart = guidStr.Substring(0, 15);
@@ -342,15 +343,25 @@ public class SmsService : ISmsService
new("CODE1",firstPart),
new("CODE2",secondPart)
});
var smsResult = new SmsResult(verificationSendResult.Data.MessageId, verificationSendResult.Message, "لینک تاییدیه قرارداد مالی",
fullName, number, contractingPartyId, institutionContractId);
await _smsResultRepository.CreateAsync(smsResult);
await _smsResultRepository.SaveChangesAsync();
return verificationSendResult.Status == 0;
}
public async Task<bool> SendInstitutionVerificationCode(string number, string code)
public async Task<bool> SendInstitutionVerificationCode(string number, string code, string contractingPartyFullName,
long contractingPartyId, long institutionContractId)
{
var verificationSendResult =await SmsIr.VerifySendAsync(number, 965348, new VerifySendParameter[]
{
new("VERIFYCODE", code)
});
var smsResult = new SmsResult(verificationSendResult.Data.MessageId, verificationSendResult.Message, "کد تاییدیه قرارداد مالی",
contractingPartyFullName, number, contractingPartyId, institutionContractId);
await _smsResultRepository.CreateAsync(smsResult);
await _smsResultRepository.SaveChangesAsync();
return verificationSendResult.Status == 0;
}

View File

@@ -527,6 +527,229 @@ public class institutionContractController : AdminBaseController
var res =await _institutionContractApplication.GetAmendmentWorkshops(institutionContractId);
return res;
}
[HttpPost("resend-verify-link/{institutionContractId}")]
public async Task<OperationResult> ResendVerifyLink(long institutionContractId)
{
var res = await _institutionContractApplication.ResendVerifyLink(institutionContractId);
return res;
}
[HttpPost("amendment/insert-temp-workshops")]
public async Task<ActionResult<InsertAmendmentTempWorkshopResponse>> InsertAmendmentTempWorkshops([FromBody]InstitutionContractAmendmentTempWorkshopViewModel request)
{
var res =await _institutionContractApplication.InsertAmendmentTempWorkshops(request);
return res;
}
[HttpDelete("amendment/remove-temp-workshops/{workshopTempId:guid}")]
public async Task<ActionResult> RemoveAmendmentWorkshops(Guid workshopTempId)
{
await _institutionContractApplication.RemoveAmendmentWorkshops(workshopTempId);
return Ok();
}
[HttpPost("amendment/payment-details")]
public async Task<ActionResult<InsitutionContractAmendmentPaymentResponse>> GetAmendmentPaymentDetails([FromBody]InsitutionContractAmendmentPaymentRequest request)
{
var res =await _institutionContractApplication.GetAmendmentPaymentDetails(request);
return res;
}
[HttpGet("edit-old/{id}")]
public ActionResult<EditInstitutionContract> GetEditOldDetails(long id)
{
var representativList = new List<RepresentativeViewModel>();
var contractingPartyList = new List<PersonalContractingPartyViewModel>();
var res = _institutionContractApplication.GetDetails(id);
var representative = new RepresentativeViewModel
{
Id = res.RepresentativeId,
FullName = res.RepresentativeName
};
representativList.Add(representative);
var contractingParty = new PersonalContractingPartyViewModel
{
id = res.ContractingPartyId,
FullName = _contractingPartyApplication.GetFullName(res.ContractingPartyId)
};
contractingPartyList.Add(contractingParty);
res.RepresentativeSelectList =
new SelectList(representativList, "Id", "FullName");
res.ContractingPartiesSelectList =
new SelectList(contractingPartyList, "id", "FullName");
var employer = _employerApplication.GetEmployerByContracrtingPartyID(res.ContractingPartyId);
var emplId = employer.Select(x => x.Id).ToList();
var w = _workshopApplication.GetWorkshopsByEmployerId(emplId);
var workshopIds = w.Select(x => x.Id).ToList();
var workshopCount = Convert.ToString(w.Count);
var pCount = 0;
if (workshopIds.Count > 0)
{
foreach (var workshopId in workshopIds)
{
var p = _workshopApplication.PersonnelCount(workshopId);
pCount += p;
}
res.EmployeeCount = Convert.ToString(pCount);
}
else
{
res.EmployeeCount = "0";
}
res.WorkshopCount = workshopCount;
var contactInfo = _contactInfoApplication.GetContactInfolist(id);
if (contactInfo.Count > 0)
{
res.ContactInfoCounter = contactInfo.Count;
res.ContactInformationList = contactInfo;
}
else
{
res.ContactInfoCounter = 0;
}
if (res.HasValueAddedTax == "true")
{
res.ContractAmount -= res.ValueAddedTax;
res.ContractAmountOAlone = res.ContractAmount.ToMoney();
res.ValueAddedTaxStr = res.ValueAddedTax.ToMoney();
}
else
{
res.ContractAmountOAlone = res.ContractAmountString;
res.ValueAddedTaxStr = "0";
}
return res;
}
[HttpPost("edit-old")]
public ActionResult<OperationResult> EditOld([FromBody] EditInstitutionContract command)
{
var op = new OperationResult();
var phoneNumber = command.ContactInformationList.FirstOrDefault(x =>
x.SendSmsString == "true" && x.Position == "طرف قرارداد" && x.PhoneType == "شماره همراه");
var conractingParty = _contractingPartyApplication.GetDetails(command.ContractingPartyId);
if (conractingParty.IsLegal == "حقیقی" && string.IsNullOrWhiteSpace(conractingParty.Nationalcode))
return new JsonResult(op.Failed("کد ملی طرف حساب وجود ندارد"));
if (conractingParty.IsLegal == "حقوقی" && string.IsNullOrWhiteSpace(conractingParty.NationalId))
return new JsonResult(op.Failed("شناسه ملی طرف حساب وجود ندارد"));
if (phoneNumber == null)
return new JsonResult(op.Failed("تعیین شماره همراه با سمت طرف قرارداد اجباریست"));
//if (string.IsNullOrWhiteSpace(command.HasValueAddedTax))
// command.HasValueAddedTax = "false";
var result = _institutionContractApplication.Edit(command);
var contractingPartyId = _institutionContractApplication.GetDetails(result.SendId);
var counter = command.ContactInformationList.Count;
var getOldContarct = _institutionContractApplication.NewSearch(new InstitutionContractSearchModel()
{ ContractingPartyId = contractingPartyId.ContractingPartyId, IsActiveString = "both" }).Where(x=>x.IsActiveString == "false" || x.IsActiveString == "blue").ToList();
if (result.IsSuccedded && counter > 0)
{
if (getOldContarct.Count > 0)
{
foreach (var item in getOldContarct)
{
_contactInfoApplication.RemoveContactInfo(item.Id);
foreach (var phone in command.ContactInformationList)
{
if (phone.PhoneNumber != null)
{
var contactinfo = new CreateContactInfo
{
InstitutionContractId = item.Id,
PhoneType = phone.PhoneType,
Position = phone.Position,
PhoneNumber = phone.PhoneNumber,
FnameLname = phone.FnameLname,
SendSms = phone.SendSmsString == "true" ? true : false
};
_contactInfoApplication.Create(contactinfo);
}
Thread.Sleep(500);
}
}
}
_contactInfoApplication.RemoveContactInfo(command.Id);
foreach (var item in command.ContactInformationList)
{
if (item.PhoneNumber != null)
{
var contactinfo = new CreateContactInfo
{
InstitutionContractId = result.SendId,
PhoneType = item.PhoneType,
Position = item.Position,
PhoneNumber = item.PhoneNumber,
FnameLname = item.FnameLname,
SendSms = item.SendSmsString == "true" ? true : false
};
_contactInfoApplication.Create(contactinfo);
}
Thread.Sleep(500);
}
//ساخت اکانت کلاینت
var userPass = conractingParty.IsLegal == "حقیقی"
? conractingParty.Nationalcode
: conractingParty.NationalId;
var checkExistAccount = _accountApplication.CheckExistClientAccount(userPass);
if (!checkExistAccount)
{
var createAcc = new RegisterAccount
{
Fullname = conractingParty.LName,
Username = userPass,
Password = userPass,
Mobile = phoneNumber.PhoneNumber,
NationalCode = userPass
};
var res = _accountApplication.RegisterClient(createAcc);
if (res.IsSuccedded)
_institutionContractApplication.CreateContractingPartyAccount(command.ContractingPartyId, res.SendId);
}
}
//Thread.Sleep(500);
//for (int i = 0; i <= counter - 1; i++)
//{
// if (command.ContactInformationList[i].PhoneNumber != null)
// {
// var contactinfo = new CreateContactInfo()
// {
// InstitutionContractId = result.SendId,
// PhoneType = command.ContactInformationList[i].PhoneType,
// Position = command.ContactInformationList[i].Position,
// PhoneNumber = command.ContactInformationList[i].PhoneNumber,
// FnameLname = command.ContactInformationList[i].FnameLname,
// SendSms = command.ContactInformationList[i].SendSmsString == "true" ? true : false
// };
// _contactInfoApplication.Create(contactinfo);
// }
// Thread.Sleep(500);
//}
return result;
}
[HttpGet("print/{id}")]
public async Task<ActionResult<InstitutionContractPrintViewModel>> PrintOne(long id)
{
var res =await _institutionContractApplication.PrintOneAsync(id);
return res;
}
}

View File

@@ -871,6 +871,14 @@
</div>
<div class="child-check level2">
<label class="btn btn-icon waves-effect btn-default m-b-5 open-close">
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn" />
</label>
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="1004" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> قرارداد های مالی </span> </label>
</div>
</div>
@* بررسی مدارک پرسنل *@
<div class="parent-check">

View File

@@ -881,6 +881,15 @@
</div>
<div class="child-check level2">
<label class="btn btn-icon waves-effect btn-default m-b-5 open-close">
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn" />
</label>
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="1004" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> قرارداد های مالی </span> </label>
</div>
</div>
@* بررسی مدارک پرسنل *@
<div class="parent-check">

View File

@@ -195,7 +195,7 @@
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1">
<div class="w-100 my-1">
<div class="absenceHeadColorTop" style="border-radius: 10px 10px 0 0;">غیبت</div>
<div class="absenceHeadColorTop" style="border-radius: 10px 10px 0 0;">عدم حضور</div>
<div class="Rtable-row Rtable-row--head align-items-center d-flex table-rollcall-absent absenceHeadColor">
<div class="Rtable-cell column-heading width1">ردیف</div>
<div class="Rtable-cell column-heading width2">نام پرسنل</div>
@@ -328,7 +328,7 @@
<div class="btnsRollCallOnlline">
<button class="btnRollCallStatus active" onclick="loadRollCallStatus('all')">آنلاین</button>
<button class="btnRollCallStatus" onclick="loadRollCallStatus('leave')">مرخصی <span id="leaveCount"></span></button>
<button class="btnRollCallStatus" onclick="loadRollCallStatus('absent')">غیبت <span id="absentCount"></span></button>
<button class="btnRollCallStatus" onclick="loadRollCallStatus('absent')">عدم حضور <span id="absentCount"></span></button>
</div>
</div>
<div class="wrapper">

View File

@@ -43,7 +43,7 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.RollCall
WorkshopId = workshopId,
};
RollCallViewModels = _rollCallApplication.GetWorkshopCurrentDayRollCalls(workshopId);
RollCallViewModels = _rollCallApplication.GetWorkshopCurrentDayRollCalls(workshopId, new WorkshopCurrentDayRollCallSearchModel());
return Page();
}
else
@@ -56,7 +56,7 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.RollCall
public IActionResult OnGetCurrentDayAjax(string type, long workshopId)
{
RollCallViewModels = _rollCallApplication.GetWorkshopCurrentDayRollCalls(workshopId);
RollCallViewModels = _rollCallApplication.GetWorkshopCurrentDayRollCalls(workshopId, new WorkshopCurrentDayRollCallSearchModel());
List<object> data = new();
switch (type)
@@ -83,7 +83,7 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.RollCall
public IActionResult OnGetCurrentAjaxCount(long workshopId)
{
RollCallViewModels = _rollCallApplication.GetWorkshopCurrentDayRollCalls(workshopId);
RollCallViewModels = _rollCallApplication.GetWorkshopCurrentDayRollCalls(workshopId, new WorkshopCurrentDayRollCallSearchModel());
var absentEmployeesCount = RollCallViewModels.AbsentEmployees.Count(x => !x.HasLeave);
var leaveEmployeesCount = RollCallViewModels.AbsentEmployees.Count(x => x.HasLeave);

View File

@@ -127,7 +127,7 @@
</a>
</div>
<div class="gwb-card" permission="1002">
<div class="gwb-card" permission="1004">
<a href="https://admin@(AppSetting.Value.Domain)/workflow/institution-contract" class="click loadingButton">
<div class="d-flex align-items-center justify-content-between p-1 w-100">
<div class="d-flex align-items-center">

View File

@@ -0,0 +1,35 @@
using _0_Framework.Application;
using Company.Domain.CheckoutAgg;
using CompanyManagment.App.Contracts.Employee;
using CompanyManagment.App.Contracts.RollCall;
using Microsoft.AspNetCore.Mvc;
using ServiceHost.BaseControllers;
namespace ServiceHost.Areas.Client.Controllers;
public class RollCallController:ClientBaseController
{
private long _workshopId;
private readonly IRollCallApplication _rollCallApplication;
private readonly IEmployeeApplication _employeeApplication;
public RollCallController(IRollCallApplication rollCallApplication,IAuthHelper authHelper, IEmployeeApplication employeeApplication)
{
_rollCallApplication = rollCallApplication;
_employeeApplication = employeeApplication;
_workshopId = authHelper.GetWorkshopId();
}
[HttpGet("current-day")]
public ActionResult<CurrentDayRollCall> GetCurrentDay(WorkshopCurrentDayRollCallSearchModel searchModel)
{
var res = _rollCallApplication.GetWorkshopCurrentDayRollCalls(_workshopId, searchModel);
return res;
}
[HttpGet("employee-select-list")]
public async Task<ActionResult<List<EmployeeSelectListViewModel>>> GetEmployeeSelectList()
{
var res = await _employeeApplication.GetWorkingEmployeesSelectList(_workshopId);
return res;
}
}

View File

@@ -231,7 +231,7 @@
<div class="day-off-parent">
<div class="day-off-title mb-2">
روزهای تعطیل هفته
روزهای فعالیت مجموعه
</div>
<div class="day-off-button-container mb-3">

View File

@@ -382,7 +382,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
IsAbsent = x.IsAbsent,
TotalWorkingHours = x.TotalWorkingHours,
StartsItems = string.Join(Environment.NewLine, x.RollCallTimesList.Select(tr=>tr.StartDate)),
EndsItems= string.Join(Environment.NewLine, x.RollCallTimesList.Select(tr=>tr.EndDate))
EndsItems= string.Join(Environment.NewLine, x.RollCallTimesList.Select(tr=>tr.EndDate)),
EnterTimeDifferences = string.Join(Environment.NewLine, x.RollCallTimesList.Select(tr=>tr.EntryTimeDifferences)),
ExitTimeDifferences = string.Join(Environment.NewLine, x.RollCallTimesList.Select(tr=>tr.ExitTimeDifferences))
}).ToList()
};

View File

@@ -234,7 +234,7 @@
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1">
<div class="w-100 my-1">
<div class="absenceHeadColorTop" style="border-radius: 10px 10px 0 0;">غیبت</div>
<div class="absenceHeadColorTop" style="border-radius: 10px 10px 0 0;">عدم حضور</div>
<div class="Rtable-row Rtable-row--head align-items-center d-flex table-rollcall-absent absenceHeadColor">
<div class="Rtable-cell column-heading width1">ردیف</div>
<div class="Rtable-cell column-heading width2">نام پرسنل</div>
@@ -367,7 +367,7 @@
<div class="btnsRollCallOnlline">
<button class="btnRollCallStatus active" onclick="loadRollCallStatus('all')">آنلاین</button>
<button class="btnRollCallStatus" onclick="loadRollCallStatus('leave')">مرخصی <span id="leaveCount"></span></button>
<button class="btnRollCallStatus" onclick="loadRollCallStatus('absent')">غیبت <span id="absentCount"></span></button>
<button class="btnRollCallStatus" onclick="loadRollCallStatus('absent')">عدم حضور <span id="absentCount"></span></button>
</div>
</div>
<div class="wrapper">

View File

@@ -81,7 +81,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
WorkshopId = workshopId,
};
RollCallViewModels = _rollCallApplication.GetWorkshopCurrentDayRollCalls(workshopId);
RollCallViewModels = _rollCallApplication.GetWorkshopCurrentDayRollCalls(workshopId, new WorkshopCurrentDayRollCallSearchModel());
return Page();
}
else
@@ -103,7 +103,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
var workshopId = _passwordHasher.SlugDecrypt(workshopHash);
if (workshopId > 0)
{
RollCallViewModels = _rollCallApplication.GetWorkshopCurrentDayRollCalls(workshopId);
RollCallViewModels = _rollCallApplication.GetWorkshopCurrentDayRollCalls(workshopId, new WorkshopCurrentDayRollCallSearchModel());
List<object> data = new();
switch (type)
@@ -143,7 +143,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
var workshopId = _passwordHasher.SlugDecrypt(workshopHash);
if (workshopId > 0)
{
RollCallViewModels = _rollCallApplication.GetWorkshopCurrentDayRollCalls(workshopId);
RollCallViewModels = _rollCallApplication.GetWorkshopCurrentDayRollCalls(workshopId, new WorkshopCurrentDayRollCallSearchModel());
var absentEmployeesCount = RollCallViewModels.AbsentEmployees.Count(x => !x.HasLeave);
var leaveEmployeesCount = RollCallViewModels.AbsentEmployees.Count(x => x.HasLeave);

View File

@@ -223,7 +223,7 @@
<div class="day-off-parent">
<div class="day-off-title mb-2">
روزهای تعطیل هفته
روزهای فعالیت مجموعه
</div>
<div class="day-off-button-container mb-3">

View File

@@ -383,7 +383,7 @@
<div class="day-off-parent">
<div class="day-off-title mb-2">
روزهای تعطیل هفته
روزهای فعالیت مجموعه
</div>
<div class="day-off-button-container mb-3">

View File

@@ -393,7 +393,7 @@
<div class="day-off-parent">
<div class="day-off-title mb-2">
روزهای تعطیل هفته
روزهای فعالیت مجموعه
</div>
<div class="day-off-button-container mb-3">

View File

@@ -17,7 +17,7 @@
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
<h6 class="m-0">پرینت حضور و غیاب انفرادی @Model.PersianMonthName ماه @Model.PersianYear</h6>
</div>
```````
<div class="modal-body" id="divTablescrollbar">
<div class="row main-table">
@@ -121,7 +121,17 @@
<span class="m-0">@item.DateFa</span>
</td>
<td style="font-family: 'IranText' !important; font-size: 10px !important; text-align: center">
-
@if (item.RollCallTimesList.Any())
{
@foreach (var rollCallItem in item.RollCallTimesList)
{
<div>@(rollCallItem.EntryTimeDifferences ?? "-")</div>
}
}
else
{
<span>-</span>
}
</td>
<td style="font-family: 'IranText' !important; font-size: 10px !important; text-align: center">
@if (item.RollCallTimesList.Any())
@@ -150,7 +160,17 @@
}
</td>
<td style="font-family: 'IranText' !important; font-size: 10px !important; text-align: center">
-
@if (item.RollCallTimesList.Any())
{
@foreach (var rollCallItem in item.RollCallTimesList)
{
<div>@(rollCallItem.ExitTimeDifferences ?? "-")</div>
}
}
else
{
<span>-</span>
}
</td>
<td style="font-family: 'IranText' !important; font-size: 10px !important; text-align: center">
@item.TotalWorkingHours

View File

@@ -90,7 +90,7 @@
<div class="day-off-parent">
<div class="day-off-title mb-2">
روزهای تعطیل هفته
روزهای فعالیت مجموعه
</div>
<div class="day-off-button-container mb-3">

View File

@@ -154,7 +154,7 @@
<div class="day-off-parent">
<div class="day-off-title mb-2">
روزهای تعطیل هفته
روزهای فعالیت مجموعه
</div>
<div class="day-off-button-container mb-3">

View File

@@ -218,7 +218,7 @@
<div class="day-off-parent mb-4">
<div class="day-off-title mb-2">
روزهای تعطیل هفته
روزهای فعالیت مجموعه
</div>
<div class="day-off-button-container mb-3">

View File

@@ -168,7 +168,7 @@
<div class="day-off-parent">
<div class="day-off-title mb-2">
روزهای تعطیل هفته
روزهای فعالیت مجموعه
</div>
<div class="day-off-button-container mb-3">

View File

@@ -71,7 +71,7 @@
<li class="active" data-menu="absent">
<div class="d-flex align-items-center justify-content-between" id="clickAbsentTab">
<a href="javascript:void(0);">غیبت</a>
<a href="javascript:void(0);">عدم حضور</a>
<div>
<div id="CountAbsentLoading" class="spinner-grow text-danger" role="status" style="align-items: center;justify-content: center;display: flex;margin: 0 0 0 9px;">
<span class="visually-hidden">Loading...</span>
@@ -218,7 +218,7 @@
<div class="Rtable-row SubAccountRowMobile align-items-center position-relative openAction">
<div class="Rtable-cell d-md-block d-flex width2">
<div class="Rtable-cell--content text-start">
<div class="roleName">غیبت</div>
<div class="roleName">عدم حضور</div>
</div>
</div>
<div>

View File

@@ -420,7 +420,7 @@ input:checked + .sliderEUP:before {
background-color: #ffffff;
background: rgba(209, 50, 50, 0.15);
transition: ease .2s;
width: 55px;
/*width: 55px;*/
}
.btn-workflow-rollcall-edit {

View File

@@ -292,7 +292,7 @@ function loadEmployeeListByWorkFlowsAbsents(date) {
</button>
<button type="button" class="btn-workflow-absent" onclick="confirmAbsentAlert(${rollCallItem.employeeId}, '${data.dateTimeFa}')">
<span class="mx-1">غیبت</span>
<span class="mx-1 text-nowrap">عدم حضور</span>
</button>
<button class="btn-workflow-rollcall-edit position-relative" onclick="showModalEditRollCall(${rollCallItem.employeeId}, '${data.dateTimeFa}')">
@@ -1028,7 +1028,7 @@ function showModalEditLeave(leaveId) {
function confirmAbsentAlert(employeeId, dateFa) {
swal({
title: "آیا از تایید این غیبت اطمینان دارید؟",
title: "آیا از تایید این عدم حضور اطمینان دارید؟",
text: "",
type: "warning",
showCancelButton: true,