Compare commits
33 Commits
Feature/au
...
Feature/In
| Author | SHA1 | Date | |
|---|---|---|---|
| 595b2c8a2d | |||
| 6b6b0767e3 | |||
| 3d86ba401f | |||
| 6a6e2e532a | |||
| ca6638d6a3 | |||
| 608fb824dc | |||
| 4686151bbb | |||
| d7fae42e4f | |||
| 2cfe480733 | |||
|
|
c574ce534d | ||
| 174edbf87d | |||
| a827470831 | |||
| c9b61c3fc6 | |||
| 45002b88c4 | |||
| 0bacb24aa2 | |||
| 7fd8851f71 | |||
| bc6ae854f8 | |||
| 68f1f81b53 | |||
| d4c2ab939e | |||
| 5822005b68 | |||
| 53aeb60861 | |||
| c2a08d9c33 | |||
| 85e2481680 | |||
| b711e803a9 | |||
| 232a834dc9 | |||
| 55f7b4f7c0 | |||
| c5b521bc50 | |||
| acdd7de4f6 | |||
| 78458f24e5 | |||
| fde58a7c75 | |||
|
|
dbddccf011 | ||
| 7d6b57affd | |||
| c8018948c2 |
@@ -204,8 +204,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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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 $"";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,47 @@ 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 VerifyDate { get; set; }
|
||||
public string VerifyTime { 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 +285,9 @@ public class InstitutionContractAmendmentWorkshopsResponse
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<WorkshopTempViewModel> Workshops { get; set; }
|
||||
public List<InstitutionContractAmendmentTempWorkshopViewModel> Workshops { get; set; }
|
||||
|
||||
public Guid TempId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
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));
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
@@ -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,113 @@ 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,
|
||||
VerifyDate = institution.VerifyCodeCreation.ToFarsi(),
|
||||
VerifyTime = institution.VerifyCodeCreation.ToString("HH:mm:ss"),
|
||||
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 +2789,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 +2871,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 +2879,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 +2939,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region CustomViewModels
|
||||
|
||||
|
||||
@@ -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" ? "عادی" :
|
||||
|
||||
@@ -1517,7 +1517,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)),
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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"> <span style="bottom: 2px;position: relative"> قرارداد های مالی </span> </label>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@* بررسی مدارک پرسنل *@
|
||||
<div class="parent-check">
|
||||
|
||||
@@ -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"> <span style="bottom: 2px;position: relative"> قرارداد های مالی </span> </label>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@* بررسی مدارک پرسنل *@
|
||||
<div class="parent-check">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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()
|
||||
|
||||
};
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user