Merge branch 'InsuranceEmployeeShareoCheckout'

This commit is contained in:
SamSys
2025-10-29 11:11:52 +03:30
21 changed files with 23019 additions and 114 deletions

View File

@@ -0,0 +1,15 @@
namespace _0_Framework.Application.Enums;
public enum TypeOfCheckoutWarning
{
/// <summary>
/// هشدار های متفرقه
/// </summary>
OthersWarning,
/// <summary>
/// هشدار سهم بیمه کارگر
/// </summary>
InsuranceEmployeeShare,
}

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Security.AccessControl;
using _0_Framework.Application;
using _0_Framework.Domain;
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
@@ -12,25 +13,25 @@ namespace Company.Domain.CheckoutAgg;
public class Checkout : EntityBase
{
private Checkout()
{
}
public Checkout()
{
}
public Checkout(string employeeFullName, string fathersName, string nationalCode, string dateOfBirth,
long employeeId, string workshopName, long workshopId, string contractNo, DateTime contractStart,
DateTime contractEnd, string month, string year, long contractId, long workingHoursId,
DateTime contractEnd, string month, string year, long contractId, long workingHoursId,
double monthlySalary, double baseYearsPay, double consumableItems, double housingAllowance,
double overtimePay, double nightworkPay, double fridayPay, double missionPay, double shiftPay,
double familyAllowance, double bonusesPay, double yearsPay, double leavePay,
double insuranceDeduction, double taxDeducation, double installmentDeduction,
double salaryAidDeduction, double absenceDeduction, string sumOfWorkingDays
, string archiveCode, string personnelCode,
, string archiveCode, string personnelCode,
string totalClaims, string totalDeductions, double totalPayment, string signature, double marriedAllowance, bool leaveCheckout,
double creditLeaves, double absencePeriod, double averageHoursPerDay, bool hasRollCall, string overTimeWorkvalue,
string overNightWorkValue, string fridayWorkValue, string rotatingShifValue, string absenceValue,
string totalDayOfLeaveCompute, string totalDayOfYearsCompute, string totalDayOfBunosesCompute,
ICollection<CheckoutLoanInstallment> loanInstallments,
ICollection<CheckoutSalaryAid> salaryAids,CheckoutRollCall checkoutRollCall,TimeSpan employeeMandatoryHours)
ICollection<CheckoutSalaryAid> salaryAids, CheckoutRollCall checkoutRollCall, TimeSpan employeeMandatoryHours, bool hasInsuranceShareTheSameAsList)
{
EmployeeFullName = employeeFullName;
FathersName = fathersName;
@@ -91,6 +92,7 @@ public class Checkout : EntityBase
SalaryAids = salaryAids;
CheckoutRollCall = checkoutRollCall;
EmployeeMandatoryHours = employeeMandatoryHours;
HasInsuranceShareTheSameAsList = hasInsuranceShareTheSameAsList;
}
@@ -99,7 +101,7 @@ public class Checkout : EntityBase
public string Signature { get; private set; }
public string FathersName { get; private set; }
public string NationalCode { get; private set; }
public string DateOfBirth { get; private set; }
public string DateOfBirth { get; private set; }
public long EmployeeId { get; private set; }
public string WorkshopName { get; private set; }
@@ -135,7 +137,7 @@ public class Checkout : EntityBase
public double SalaryAidDeduction { get; private set; }
public double AbsenceDeduction { get; private set; }
public string SumOfWorkingDays { get; private set; }
public string ArchiveCode { get; private set; }
public string PersonnelCode { get; private set; }
@@ -157,58 +159,70 @@ public class Checkout : EntityBase
//میانگین ساعت کار در یک روز
public double AverageHoursPerDay { get; private set; }
public bool HasRollCall { get; private set; }
/// <summary>
/// مقدار اضافه کار
/// </summary>
/// <summary>
/// مقدار اضافه کار
/// </summary>
public string OverTimeWorkValue { get; private set; }
/// <summary>
/// مقدار شبکاری
/// </summary>
/// <summary>
/// مقدار شبکاری
/// </summary>
public string OverNightWorkValue { get; private set; }
/// <summary>
/// مقدار جمعه کاری
/// </summary>
public string FridayWorkValue { get; private set; }
/// <summary>
/// درصد نوبت کاری
/// </summary>
public string RotatingShiftValue { get; private set; }
/// <summary>
/// <summary>
/// مقدار جمعه کاری
/// </summary>
public string FridayWorkValue { get; private set; }
/// <summary>
/// درصد نوبت کاری
/// </summary>
public string RotatingShiftValue { get; private set; }
/// <summary>
/// مقدار غیبت
/// </summary>
public string AbsenceValue { get; private set; }
public string AbsenceValue { get; private set; }
/// <summary>
/// تعداد روزهای محاسبه شده برای مزد مرخصی
/// </summary>
public string TotalDayOfLeaveCompute { get; private set; }
/// <summary>
/// تعداد روزهای محاسبه شده برای سنوات
/// </summary>
public string TotalDayOfYearsCompute { get; private set; }
/// <summary>
/// تعداد روزهای محاسبه شده برای عیدی و پاداش
/// </summary>
public string TotalDayOfBunosesCompute { get; private set; }
/// <summary>
/// تعداد روزهای محاسبه شده برای مزد مرخصی
/// </summary>
public string TotalDayOfLeaveCompute { get; private set; }
/// <summary>
/// تعداد روزهای محاسبه شده برای سنوات
/// </summary>
public string TotalDayOfYearsCompute { get; private set; }
/// <summary>
/// تعداد روزهای محاسبه شده برای عیدی و پاداش
/// </summary>
public string TotalDayOfBunosesCompute { get; private set; }
/// <summary>
/// دارای تداخل مبلغ است. این در زمانی اتفاق می افتد که فیش مبلغ آن تغییر کرده ولی به دلیل مسائل قانونی امکان صدور دوباره آن وجود ندارد
/// </summary>
public bool HasAmountConflict { get; private set; }
/// <summary>
/// دارای تداخل مبلغ است. این در زمانی اتفاق می افتد که فیش مبلغ آن تغییر کرده ولی به دلیل مسائل قانونی امکان صدور دوباره آن وجود ندارد
/// </summary>
public bool HasAmountConflict { get; private set; }
/// <summary>
/// ساعت موظفی پرسنل در ماه
/// </summary>
/// <summary>
/// ساعت موظفی پرسنل در ماه
/// </summary>
public TimeSpan EmployeeMandatoryHours { get; set; }
#region valueObjects
public ICollection<CheckoutLoanInstallment> LoanInstallments { get; set; } = [];
public ICollection<CheckoutSalaryAid> SalaryAids { get; set; } = [];
/// <summary>
/// آیا حق بیمه مشابه لیست بیمه حساب شده؟
/// </summary>
public bool HasInsuranceShareTheSameAsList { get; private set; }
/// <summary>
/// آیا فیش نیاز به بروزرسانی دارد
/// </summary>
public bool IsUpdateNeeded { get; private set; }
public List<CheckoutWarningMessage> CheckoutWarningMessageList { get; set; }
#region valueObjects
public ICollection<CheckoutLoanInstallment> LoanInstallments { get; set; } = [];
public ICollection<CheckoutSalaryAid> SalaryAids { get; set; } = [];
public CheckoutRollCall CheckoutRollCall { get; private set; }
#endregion
@@ -277,7 +291,7 @@ public class Checkout : EntityBase
var year = contarctStart.ToFarsiYear();
var sumYear = year.Substring(Math.Max(0, year.Length - 2));
ContractNo = archiveCode + "/" + personnelCode + "/" + sumYear + "/" + month;
}
public void Active()
@@ -312,7 +326,7 @@ public class Checkout : EntityBase
}
public void SetSalaryAid(ICollection<CheckoutSalaryAid> salaryAids,double salaryAidAmount)
public void SetSalaryAid(ICollection<CheckoutSalaryAid> salaryAids, double salaryAidAmount)
{
SalaryAids = salaryAids;
SalaryAidDeduction = salaryAidAmount;
@@ -330,30 +344,45 @@ public class Checkout : EntityBase
public void SetAmountConflict(bool hasAmountConflict)
{
HasAmountConflict = hasAmountConflict;
HasAmountConflict = hasAmountConflict;
}
public void SetEmployeeMandatoryHours(TimeSpan employeeMandatoryHours)
{
EmployeeMandatoryHours = employeeMandatoryHours;
}
public void SetInsuranceShare()
{
HasInsuranceShareTheSameAsList = true;
}
/// <summary>
/// نیاز به آپدیت
/// </summary>
public void SetUpdateNeeded()
{
IsUpdateNeeded = true;
}
}
public class CheckoutRollCall
{
private CheckoutRollCall(){}
public CheckoutRollCall(TimeSpan totalMandatoryTimeSpan, TimeSpan totalPresentTimeSpan, TimeSpan totalBreakTimeSpan,
TimeSpan totalWorkingTimeSpan, TimeSpan totalPaidLeaveTmeSpan, TimeSpan totalSickLeaveTimeSpan,
ICollection<CheckoutRollCallDay> rollCallDaysCollection)
{
TotalMandatoryTimeSpan = totalMandatoryTimeSpan;
TotalPresentTimeSpan = totalPresentTimeSpan;
TotalBreakTimeSpan = totalBreakTimeSpan;
TotalWorkingTimeSpan = totalWorkingTimeSpan;
TotalPaidLeaveTmeSpan = totalPaidLeaveTmeSpan;
TotalSickLeaveTimeSpan = totalSickLeaveTimeSpan;
RollCallDaysCollection = rollCallDaysCollection;
}
private CheckoutRollCall() { }
public CheckoutRollCall(TimeSpan totalMandatoryTimeSpan, TimeSpan totalPresentTimeSpan, TimeSpan totalBreakTimeSpan,
TimeSpan totalWorkingTimeSpan, TimeSpan totalPaidLeaveTmeSpan, TimeSpan totalSickLeaveTimeSpan,
ICollection<CheckoutRollCallDay> rollCallDaysCollection)
{
TotalMandatoryTimeSpan = totalMandatoryTimeSpan;
TotalPresentTimeSpan = totalPresentTimeSpan;
TotalBreakTimeSpan = totalBreakTimeSpan;
TotalWorkingTimeSpan = totalWorkingTimeSpan;
TotalPaidLeaveTmeSpan = totalPaidLeaveTmeSpan;
TotalSickLeaveTimeSpan = totalSickLeaveTimeSpan;
RollCallDaysCollection = rollCallDaysCollection;
}
/// <summary>
@@ -394,27 +423,27 @@ public class CheckoutRollCall
public class CheckoutRollCallDay
{
private CheckoutRollCallDay(){}
public CheckoutRollCallDay(DateTime date, string firstStartDate, string firstEndDate,
string secondStartDate, string secondEndDate, TimeSpan breakTimeSpan,
bool isSliced, TimeSpan workingTimeSpan, bool isAbsent, bool isFriday,
bool isHoliday, string leaveType)
{
Date = date;
FirstStartDate = firstStartDate;
FirstEndDate = firstEndDate;
SecondStartDate = secondStartDate;
SecondEndDate = secondEndDate;
BreakTimeSpan = breakTimeSpan;
IsSliced = isSliced;
WorkingTimeSpan = workingTimeSpan;
IsAbsent = isAbsent;
IsFriday = isFriday;
IsHoliday = isHoliday;
LeaveType = leaveType;
}
private CheckoutRollCallDay() { }
public CheckoutRollCallDay(DateTime date, string firstStartDate, string firstEndDate,
string secondStartDate, string secondEndDate, TimeSpan breakTimeSpan,
bool isSliced, TimeSpan workingTimeSpan, bool isAbsent, bool isFriday,
bool isHoliday, string leaveType)
{
Date = date;
FirstStartDate = firstStartDate;
FirstEndDate = firstEndDate;
SecondStartDate = secondStartDate;
SecondEndDate = secondEndDate;
BreakTimeSpan = breakTimeSpan;
IsSliced = isSliced;
WorkingTimeSpan = workingTimeSpan;
IsAbsent = isAbsent;
IsFriday = isFriday;
IsHoliday = isHoliday;
LeaveType = leaveType;
}
public long Id { get; set; }
public long Id { get; set; }
/// <summary>
/// تاریخ
@@ -458,12 +487,12 @@ public class CheckoutRollCallDay
/// <summary>
/// آیا غیبت است
/// </summary>
public bool IsAbsent { get; private set; }
public bool IsAbsent { get; private set; }
/// <summary>
/// آیا جمعه است
/// </summary>
public bool IsFriday { get; private set; }
public bool IsFriday { get; private set; }
/// <summary>
/// آیا تعطیل رسمی است
@@ -475,6 +504,6 @@ public class CheckoutRollCallDay
/// </summary>
public string LeaveType { get; private set; }
public long CheckoutId { get; set; }
public long CheckoutId { get; set; }
}

View File

@@ -0,0 +1,32 @@
using _0_Framework.Application.Enums;
using _0_Framework.Domain;
namespace Company.Domain.CheckoutAgg;
public class CheckoutWarningMessage : EntityBaseWithoutCreationDate
{
public CheckoutWarningMessage(string warningMessage, long checkoutId, TypeOfCheckoutWarning typeOfCheckoutWarning)
{
WarningMessage = warningMessage;
CheckoutId = checkoutId;
TypeOfCheckoutWarning = typeOfCheckoutWarning;
}
/// <summary>
/// پیام هشدار
/// </summary>
public string WarningMessage { get; private set; }
/// <summary>
/// آی دی فیش حقوقی
/// </summary>
public long CheckoutId { get; private set; }
/// <summary>
/// نوع هشدار فیش حقوقی
/// </summary>
public TypeOfCheckoutWarning TypeOfCheckoutWarning { get; private set; }
public Checkout Checkout { get; set; }
}

View File

@@ -51,6 +51,14 @@ public interface IInsuranceListRepository:IRepository<long, InsuranceList>
List<EmployeeInsurancListDataViewModel> GetEmployeeInsuranceDataAmonthAgo(DateTime currentMonthStartDate, long workshopId);
#endregion
/// <summary>
/// دریافت اطلاعات بیمه کارکنان برای استفاده در فیش حقوقی
/// </summary>
/// <param name="startDate"></param>
/// <param name="workshopId"></param>
/// <returns></returns>
List<EmployeeInsurancListDataViewModel> EmployeeInsuranceDataBy(DateTime startDate, long workshopId);
/// <summary>
/// بدست آوردن اطلاعات محاسباتی ماه پرسنل برای ویرایش
/// </summary>

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using _0_Framework.Application.Enums;
using CompanyManagment.App.Contracts.Employer;
using CompanyManagment.App.Contracts.Loan;
using CompanyManagment.App.Contracts.RollCall;
@@ -133,6 +134,15 @@ public class CheckoutViewModel
/// </summary>
public string TotalPaidLeave { get; set; }
/// <summary>
/// آیا فیش نیاز به بروزرسانی دارد
/// </summary>
public bool IsUpdateNeeded { get; set; }
/// <summary>
/// لیست پیام های هشدار فیش حقوقی
/// </summary>
public List<CheckoutWarningMessageModel> CheckoutWarningMessageList { get; set; }
public bool HasSignCheckout { get; set; }

View File

@@ -0,0 +1,25 @@
using _0_Framework.Application.Enums;
namespace CompanyManagment.App.Contracts.Checkout;
/// <summary>
/// مدل هشدار فیش حقوقی
/// </summary>
public class CheckoutWarningMessageModel
{
/// <summary>
/// پیام هشدار
/// </summary>
public string WarningMessage { get; set; }
/// <summary>
/// آی دی فیش حقوقی
/// </summary>
public long CheckoutId { get; set; }
/// <summary>
/// نوع هشدار فیش حقوقی
/// </summary>
public TypeOfCheckoutWarning TypeOfCheckoutWarning { get; set; }
}

View File

@@ -31,6 +31,50 @@ public interface IInsuranceListApplication
double GetRoundValue(double value);
OperationResult ConfirmInsuranceList(long id);
#region New
/// <summary>
/// دستمزد روزانه مشاغل مقطوع بیمه
/// </summary>
/// <param name="year"></param>
/// <param name="workshopId"></param>
/// <param name="employeeId"></param>
/// <param name="startDateGr"></param>
/// <param name="endDateGr"></param>
/// <param name="jobId"></param>
/// <param name="population"></param>
/// <param name="insuranceJobId"></param>
/// <returns></returns>
double? GetDailyWageFixedSalary(string year, long workshopId, long employeeId, DateTime? startDateGr,
DateTime? endDateGr, long jobId, string population, long? insuranceJobId);
/// <summary>
/// محاسبه مزایای ماهانه
/// </summary>
/// <param name="endMonthCurrentDay"></param>
/// <param name="consumableItemsItemValue"></param>
/// <param name="housingAllowanceItemValue"></param>
/// <param name="maritalStatus"></param>
/// <param name="countWorkingDays"></param>
/// <param name="typeOfInsuranceSendWorkshop"></param>
/// <param name="jobId"></param>
/// <param name="employeeId"></param>
/// <param name="includeStatus"></param>
/// <returns></returns>
public double GetMonthlyBenefits(int endMonthCurrentDay, double consumableItemsItemValue,
double housingAllowanceItemValue, double maritalStatus, int countWorkingDays,
string typeOfInsuranceSendWorkshop, long jobId, long employeeId, bool includeStatus);
/// <summary>
///
/// </summary>
/// <param name="yearlysalaryItemValue"></param>
/// <param name="employeeId"></param>
/// <param name="workshopId"></param>
/// <param name="year"></param>
/// <returns></returns>
public double ComputeDailyWage(double yearlysalaryItemValue, long employeeId, long workshopId, string year);
#endregion
List<InsuranceListViewModel> SearchForClient(InsuranceListSearchModel searchModel);
//farokhiChanges

View File

@@ -193,8 +193,19 @@ public class CheckoutApplication : ICheckoutApplication
//حق بیمه سهم کارگر
#region InsuranceDeduction
var insuranceOverTime = command.HasInsuranceChekoutOverTime ? command.OvertimePay : 0;
var insuranceDeduction = (monthlyWage + bacicYears + consumableItem + housingAllowance + marriedAllowance + insuranceOverTime) * 7 / 100;
double insuranceDeduction = 0;
bool hasInsuranceShareTheSameAsList = false;
if (command.InsuranceDeduction == 0)
{
var insuranceOverTime = command.HasInsuranceChekoutOverTime ? command.OvertimePay : 0;
insuranceDeduction = (monthlyWage + bacicYears + consumableItem + housingAllowance + marriedAllowance + insuranceOverTime) * 7 / 100;
}
else
{
insuranceDeduction = command.InsuranceDeduction;
hasInsuranceShareTheSameAsList = true;
}
#endregion
@@ -375,7 +386,7 @@ public class CheckoutApplication : ICheckoutApplication
, command.OvertimePay, command.NightworkPay, command.FridayPay, 0, command.ShiftPay, familyAllowance, bunos, years, command.LeavePay, insuranceDeduction, 0, command.InstallmentDeduction, command.SalaryAidDeduction, command.AbsenceDeduction, sumOfWorkingDays,
command.ArchiveCode, command.PersonnelCode, totalClaims, totalDeductions, totalPayment, command.Signature, marriedAllowance, command.LeaveCheckout, command.CreditLeaves, command.AbsencePeriod, command.AverageHoursPerDay, command.HasRollCall, command.OverTimeWorkValue, command.OverNightWorkValue
, command.FridayWorkValue, command.RotatingShiftValue, command.AbsenceValue, command.TotalDayOfLeaveCompute, command.TotalDayOfYearsCompute, command.TotalDayOfBunosesCompute,
loanInstallments, salaryAids,checkoutRollCall,command.EmployeeMandatoryHours);
loanInstallments, salaryAids,checkoutRollCall,command.EmployeeMandatoryHours, hasInsuranceShareTheSameAsList);
_checkoutRepository.CreateCkeckout(checkout).GetAwaiter().GetResult();
//_checkoutRepository.SaveChanges();

View File

@@ -1707,7 +1707,7 @@ public class InsuranceListApplication : IInsuranceListApplication
return result;
}
private double? GetDailyWageFixedSalary(string year, long workshopId, long employeeId, DateTime? startDateGr, DateTime? endDateGr, long jobId, string population, long? insuranceJobId)
public double? GetDailyWageFixedSalary(string year, long workshopId, long employeeId, DateTime? startDateGr, DateTime? endDateGr, long jobId, string population, long? insuranceJobId)
{
double? result = 0;
@@ -1858,7 +1858,7 @@ public class InsuranceListApplication : IInsuranceListApplication
/// <param name="jobId"></param>
/// <param name="employeeId"></param>
/// <returns></returns>
private double GetMonthlyBenefits(int endMonthCurrentDay, double consumableItemsItemValue, double housingAllowanceItemValue, double maritalStatus, int countWorkingDays, string typeOfInsuranceSendWorkshop, long jobId, long employeeId, bool includeStatus)
public double GetMonthlyBenefits(int endMonthCurrentDay, double consumableItemsItemValue, double housingAllowanceItemValue, double maritalStatus, int countWorkingDays, string typeOfInsuranceSendWorkshop, long jobId, long employeeId, bool includeStatus)
{
//ToDo
//افزودن شرط مشمول مزایای
@@ -1898,7 +1898,7 @@ public class InsuranceListApplication : IInsuranceListApplication
private double ComputeDailyWage(double yearlysalaryItemValue, long employeeId, long workshopId, string year)
public double ComputeDailyWage(double yearlysalaryItemValue, long employeeId, long workshopId, string year)
{
double dailyWage = yearlysalaryItemValue;
InsuranceListSearchModel searchModel = new InsuranceListSearchModel();

View File

@@ -230,6 +230,8 @@ public class CompanyContext : DbContext
#endregion
public DbSet<CheckoutWarningMessage> CheckoutWarningMessages { get; set; }
public DbSet<CustomizeCheckout> CustomizeCheckouts { get; set; }
public DbSet<CustomizeCheckoutTemp> CustomizeCheckoutTemps { get; set; }
public DbSet<TaxLeftWorkItem> TaxLeftWorkItems { get; set; }

View File

@@ -50,12 +50,18 @@ class CheckoutMapping : IEntityTypeConfiguration<Checkout>
builder.Property(x => x.TotalDayOfLeaveCompute).HasMaxLength(10);
builder.Property(x => x.TotalDayOfYearsCompute).HasMaxLength(10);
builder.Property(x => x.TotalDayOfBunosesCompute).HasMaxLength(10);
builder.Property(x => x.EmployeeMandatoryHours).HasTimeSpanConversion();
builder.HasOne(x => x.Workshop)
.WithMany(x => x.Checkouts)
.HasForeignKey(x => x.WorkshopId);
builder.HasMany(x => x.CheckoutWarningMessageList)
.WithOne(x => x.Checkout)
.HasForeignKey(x => x.CheckoutId);
builder.OwnsMany(x => x.LoanInstallments, installments =>
{
installments.Property(x => x.AmountForMonth).HasMaxLength(25);

View File

@@ -0,0 +1,26 @@
using System;
using _0_Framework.Application.Enums;
using Company.Domain.CheckoutAgg;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace CompanyManagment.EFCore.Mapping;
public class CheckoutWarningMessageMapping : IEntityTypeConfiguration<CheckoutWarningMessage>
{
public void Configure(EntityTypeBuilder<CheckoutWarningMessage> builder)
{
builder.ToTable("CheckoutWarningMessage");
builder.HasKey(x => x.id);
builder.Property(x => x.WarningMessage).HasMaxLength(150);
builder.Property(x => x.TypeOfCheckoutWarning).HasConversion(
v => v.ToString(),
v => (TypeOfCheckoutWarning)Enum.Parse(typeof(TypeOfCheckoutWarning), v)).HasMaxLength(30);
builder.HasOne(x => x.Checkout)
.WithMany(x => x.CheckoutWarningMessageList)
.HasForeignKey(x => x.CheckoutId);
}
}

View File

@@ -0,0 +1,29 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CompanyManagment.EFCore.Migrations
{
/// <inheritdoc />
public partial class hasInsuranceShareTheSameAsList_checkoutTable : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "HasInsuranceShareTheSameAsList",
table: "Checkouts",
type: "bit",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "HasInsuranceShareTheSameAsList",
table: "Checkouts");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,58 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CompanyManagment.EFCore.Migrations
{
/// <inheritdoc />
public partial class CheckoutWarningMessage : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsUpdateNeeded",
table: "Checkouts",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.CreateTable(
name: "CheckoutWarningMessage",
columns: table => new
{
id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
WarningMessage = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: true),
CheckoutId = table.Column<long>(type: "bigint", nullable: false),
TypeOfCheckoutWarning = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CheckoutWarningMessage", x => x.id);
table.ForeignKey(
name: "FK_CheckoutWarningMessage_Checkouts_CheckoutId",
column: x => x.CheckoutId,
principalTable: "Checkouts",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_CheckoutWarningMessage_CheckoutId",
table: "CheckoutWarningMessage",
column: "CheckoutId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CheckoutWarningMessage");
migrationBuilder.DropColumn(
name: "IsUpdateNeeded",
table: "Checkouts");
}
}
}

View File

@@ -415,6 +415,9 @@ namespace CompanyManagment.EFCore.Migrations
b.Property<bool>("HasAmountConflict")
.HasColumnType("bit");
b.Property<bool>("HasInsuranceShareTheSameAsList")
.HasColumnType("bit");
b.Property<bool>("HasRollCall")
.HasColumnType("bit");
@@ -431,6 +434,9 @@ namespace CompanyManagment.EFCore.Migrations
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.Property<bool>("IsUpdateNeeded")
.HasColumnType("bit");
b.Property<bool>("LeaveCheckout")
.HasColumnType("bit");
@@ -543,6 +549,33 @@ namespace CompanyManagment.EFCore.Migrations
b.ToTable("Checkouts", (string)null);
});
modelBuilder.Entity("Company.Domain.CheckoutAgg.CheckoutWarningMessage", b =>
{
b.Property<long>("id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
b.Property<long>("CheckoutId")
.HasColumnType("bigint");
b.Property<string>("TypeOfCheckoutWarning")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b.Property<string>("WarningMessage")
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.HasKey("id");
b.HasIndex("CheckoutId");
b.ToTable("CheckoutWarningMessage", (string)null);
});
modelBuilder.Entity("Company.Domain.ClassifiedSalaryAgg.ClassifiedSalary", b =>
{
b.Property<long>("id")
@@ -7211,6 +7244,17 @@ namespace CompanyManagment.EFCore.Migrations
b.Navigation("Workshop");
});
modelBuilder.Entity("Company.Domain.CheckoutAgg.CheckoutWarningMessage", b =>
{
b.HasOne("Company.Domain.CheckoutAgg.Checkout", "Checkout")
.WithMany("CheckoutWarningMessageList")
.HasForeignKey("CheckoutId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Checkout");
});
modelBuilder.Entity("Company.Domain.ClientEmployeeWorkshopAgg.ClientEmployeeWorkshop", b =>
{
b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee")
@@ -10730,6 +10774,11 @@ namespace CompanyManagment.EFCore.Migrations
b.Navigation("PetitionsList");
});
modelBuilder.Entity("Company.Domain.CheckoutAgg.Checkout", b =>
{
b.Navigation("CheckoutWarningMessageList");
});
modelBuilder.Entity("Company.Domain.ContarctingPartyAgg.PersonalContractingParty", b =>
{
b.Navigation("ContractingPartyBankAccounts");

View File

@@ -524,6 +524,8 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
entity.SetLoanInstallment(command.LoanInstallments, command.InstallmentDeduction);
entity.SetCheckoutRollCall(command.CheckoutRollCall);
entity.SetEmployeeMandatoryHours(command.EmployeeMandatoryHours);
if(command.HasInsuranceShareTheSameAsList)
entity.SetInsuranceShare();
await _context.SaveChangesAsync();
}
@@ -1992,7 +1994,7 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
// );
var checkouts =
_context.CheckoutSet.Where(x => workshopAcounts.Contains(x.WorkshopId))
_context.CheckoutSet.Include(w=>w.CheckoutWarningMessageList).Where(x => workshopAcounts.Contains(x.WorkshopId))
.Join(_context.Workshops.AsSplitQuery(),
ch => ch.WorkshopId,
workshop => workshop.id,
@@ -2261,7 +2263,14 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
CreationDate = x.ch.CreationDate,
EmployerName = $"{x.workshopEmployer.Employer.FName} {x.workshopEmployer.Employer.LName}",
IsBlockCantracingParty = x.contractingParty.IsBlock,
HasSignCheckout = x.option != null ? x.option.SignCheckout : x.workshop.SignCheckout
HasSignCheckout = x.option != null ? x.option.SignCheckout : x.workshop.SignCheckout,
IsUpdateNeeded = x.ch.IsUpdateNeeded,
CheckoutWarningMessageList = x.ch.CheckoutWarningMessageList.Select(wm=> new CheckoutWarningMessageModel
{
WarningMessage = wm.WarningMessage,
TypeOfCheckoutWarning = wm.TypeOfCheckoutWarning,
}).ToList()
}).OrderByDescending(x=>x.Id).Take(3000).ToList().DistinctBy(x => x.Id)
@@ -2299,7 +2308,14 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
CreationDate = x.ch.CreationDate,
EmployerName = $"{x.workshopEmployer.Employer.FName} {x.workshopEmployer.Employer.LName}",
IsBlockCantracingParty = x.contractingParty.IsBlock,
HasSignCheckout = x.option != null ? x.option.SignCheckout : x.workshop.SignCheckout
HasSignCheckout = x.option != null ? x.option.SignCheckout : x.workshop.SignCheckout,
IsUpdateNeeded = x.ch.IsUpdateNeeded,
CheckoutWarningMessageList = x.ch.CheckoutWarningMessageList.Select(wm => new CheckoutWarningMessageModel
{
WarningMessage = wm.WarningMessage,
TypeOfCheckoutWarning = wm.TypeOfCheckoutWarning,
}).ToList()
}).OrderByDescending(x => x.Id)
.GroupBy(x => x.Id)
@@ -2365,7 +2381,14 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
CreationDate = x.ch.CreationDate,
EmployerName = $"{x.workshopEmployer.Employer.FName} {x.workshopEmployer.Employer.LName}",
IsBlockCantracingParty = x.contractingParty.IsBlock,
HasSignCheckout = x.option != null ? x.option.SignCheckout : x.workshop.SignCheckout
HasSignCheckout = x.option != null ? x.option.SignCheckout : x.workshop.SignCheckout,
IsUpdateNeeded = x.ch.IsUpdateNeeded,
CheckoutWarningMessageList = x.ch.CheckoutWarningMessageList.Select(wm => new CheckoutWarningMessageModel
{
WarningMessage = wm.WarningMessage,
TypeOfCheckoutWarning = wm.TypeOfCheckoutWarning,
}).ToList()
}).GroupBy(x => x.Id).Select(x => x.First()).ToList()
.OrderByDescending(x => x.ContractStartGr).ToList();
@@ -2398,7 +2421,14 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
CreationDate = x.ch.CreationDate,
EmployerName = $"{x.workshopEmployer.Employer.FName} {x.workshopEmployer.Employer.LName}",
IsBlockCantracingParty = x.contractingParty.IsBlock,
HasSignCheckout = x.option != null ? x.option.SignCheckout : x.workshop.SignCheckout
HasSignCheckout = x.option != null ? x.option.SignCheckout : x.workshop.SignCheckout,
IsUpdateNeeded = x.ch.IsUpdateNeeded,
CheckoutWarningMessageList = x.ch.CheckoutWarningMessageList.Select(wm => new CheckoutWarningMessageModel
{
WarningMessage = wm.WarningMessage,
TypeOfCheckoutWarning = wm.TypeOfCheckoutWarning,
}).ToList()
}).GroupBy(x => x.Id)
.Select(x => x.First()).ToList()

View File

@@ -7,11 +7,14 @@ using System.Runtime.CompilerServices;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using _0_Framework.Application;
using _0_Framework.Application.Enums;
using _0_Framework.InfraStructure;
using AccountMangement.Infrastructure.EFCore;
using Company.Domain.CheckoutAgg;
using Company.Domain.EmployeeAgg;
using Company.Domain.EmployeeChildrenAgg;
using Company.Domain.EmployeeInsurancListDataAgg;
using Company.Domain.empolyerAgg;
using Company.Domain.InsuranceListAgg;
using Company.Domain.InsuranceWorkshopAgg;
using Company.Domain.InsuranceYearlySalaryAgg;
@@ -132,6 +135,11 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
var id = insuranceListObj.id;
if (command.EmployeeInsurancListDataList != null && command.EmployeeInsurancListDataList.Count > 0)
{
var farisMonthName = Tools.ToFarsiMonthByNumber(command.Month);
var checkouts = _context.CheckoutSet.Where(x =>
x.WorkshopId == command.WorkshopId && x.Year == command.Year && x.Month == farisMonthName &&
x.IsActiveString == "true");
foreach (var item in command.EmployeeInsurancListDataList)
{
if (item.EmployeeInsurancListDataId == 0)
@@ -158,6 +166,29 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
item.LeftWorkDate, item.JobId, item.IncludeStatus, item.BaseYears,
item.MarriedAllowance, item.OverTimePay, item.FamilyAllowance);
}
if (checkouts.Any())
{
var checkout = checkouts.FirstOrDefault(x => x.EmployeeId == item.EmployeeId);
if (checkout != null)
{
if (item.InsuranceShare.ToMoney() != checkout.InsuranceDeduction.ToMoney())
{
checkout.SetUpdateNeeded();
if (!_context.CheckoutWarningMessages.Any(x => x.CheckoutId == checkout.id && x.TypeOfCheckoutWarning != TypeOfCheckoutWarning.InsuranceEmployeeShare))
{
var createWarrning =
new CheckoutWarningMessage(
"مبلغ بیمه سهم کارگر با مبلغ محاسبه شده در لیست بیمه مغایرت دارد", checkout.id, TypeOfCheckoutWarning.InsuranceEmployeeShare);
_context.CheckoutWarningMessages.Add(createWarrning);
}
_context.SaveChanges();
}
}
}
}
_employeeInsurancListDataRepository.SaveChanges();
@@ -698,6 +729,11 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
var id = insuranceListObj.id;
if (command.EmployeeInsurancListDataList != null && command.EmployeeInsurancListDataList.Count > 0)
{
var farisMonthName = Tools.ToFarsiMonthByNumber(command.Month);
var checkouts = _context.CheckoutSet.Where(x =>
x.WorkshopId == command.WorkshopId && x.Year == command.Year && x.Month == farisMonthName &&
x.IsActiveString == "true");
foreach (var item in command.EmployeeInsurancListDataList)
{
var employeeInsurancListData = new EmployeeInsurancListData(id,
@@ -711,6 +747,28 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
item.LeftWorkDate, item.JobId, item.IncludeStatus, item.BaseYears, item.MarriedAllowance,
item.OverTimePay, item.FamilyAllowance);
_employeeInsurancListDataRepository.Create(employeeInsurancListData);
if (checkouts.Any())
{
var checkout = checkouts.FirstOrDefault(x => x.EmployeeId == item.EmployeeId);
if (checkout != null)
{
if (item.InsuranceShare.ToMoney() != checkout.InsuranceDeduction.ToMoney())
{
checkout.SetUpdateNeeded();
if (!_context.CheckoutWarningMessages.Any(x => x.CheckoutId == checkout.id && x.TypeOfCheckoutWarning != TypeOfCheckoutWarning.InsuranceEmployeeShare))
{
var createWarrning =
new CheckoutWarningMessage(
"مبلغ بیمه سهم کارگر با مبلغ محاسبه شده در لیست بیمه مغایرت دارد", checkout.id, TypeOfCheckoutWarning.InsuranceEmployeeShare);
_context.CheckoutWarningMessages.Add(createWarrning);
}
_context.SaveChanges();
}
}
}
}
_employeeInsurancListDataRepository.SaveChanges();
@@ -1411,6 +1469,27 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
}
public List<EmployeeInsurancListDataViewModel> EmployeeInsuranceDataBy(DateTime startDate, long workshopId)
{
var res = _context.InsuranceListSet
.Where(x => x.StartDate <= startDate && x.EndDate >= startDate &&
x.WorkshopId == workshopId)
.Join(_context.EmployeeInsurancListDataSet,
insuranceList => insuranceList.id,
employeeInsurancListData => employeeInsurancListData.InsuranceListId,
(insuranceList, employeeInsurancListData) => new EmployeeInsurancListDataViewModel
{
InsuranceListId = insuranceList.id,
EmployeeId = employeeInsurancListData.EmployeeId,
WorkingDays = employeeInsurancListData.WorkingDays,
BenefitsIncludedNonContinuous = employeeInsurancListData.BenefitsIncludedNonContinuous,
InsuranceShare = employeeInsurancListData.InsuranceShare,
});
return res.ToList();
}
public List<EmployeeDetailsForInsuranceListViewModel> GetEmployeeInsuranceDataForEdit(long insuranceListId,
DateTime startDate, DateTime endDate)
{

View File

@@ -32,6 +32,12 @@ using ServiceHost.Hubs;
using System.Diagnostics.Contracts;
using WorkFlow.Application.Contracts.WorkFlow;
using System.Globalization;
using Company.Domain.LeftWorkInsuranceAgg;
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
using Company.Domain.InsuranceListAgg;
using CompanyManagment.App.Contracts.InsuranceList;
using CompanyManagment.EFCore.Repository;
using System.Linq;
namespace ServiceHost.Areas.Admin.Pages.Company.Checkouts;
@@ -59,6 +65,9 @@ public class IndexModel : PageModel
private readonly IYearlySalaryApplication _yearlySalaryApplication;
private readonly IYearlySalaryRepository _yearlySalaryRepository;
private readonly IWorkFlowApplication _workFlowApplication;
private readonly ILeftWorkInsuranceRepository _leftWorkInsuranceRepository;
private readonly IInsuranceListApplication _insuranceListApplication;
private readonly IInsuranceListRepository _insuranceListRepository;
public List<CheckoutViewModel> chekoutlist;
@@ -100,7 +109,7 @@ public class IndexModel : PageModel
ILeaveApplication leaveApplication, IHubContext<CheckoutHub> hubContext,
IEmployeeComputeOptionsApplication employeeComputeOptionsApplication,
IRollCallMandatoryApplication rollCallMandatoryApplication,
IRollCallEmployeeStatusApplication rollCallEmployeeStatusApp, IWorkFlowApplication workFlowApplication)
IRollCallEmployeeStatusApplication rollCallEmployeeStatusApp, IWorkFlowApplication workFlowApplication, ILeftWorkInsuranceRepository leftWorkInsuranceRepository, IInsuranceListApplication insuranceListApplication, IInsuranceListRepository insuranceListRepository)
{
_contractApplication = contractApplication;
_workshopApplication = workshopApplication;
@@ -124,6 +133,9 @@ public class IndexModel : PageModel
_rollCallMandatoryApplication = rollCallMandatoryApplication;
_rollCallEmployeeStatusApp = rollCallEmployeeStatusApp;
_workFlowApplication = workFlowApplication;
_leftWorkInsuranceRepository = leftWorkInsuranceRepository;
_insuranceListApplication = insuranceListApplication;
_insuranceListRepository = insuranceListRepository;
}
public string Message { get; set; }
@@ -165,7 +177,7 @@ public class IndexModel : PageModel
var searchResult = await _checkoutApplication.SearchCheckoutOptimized(searchModel);
var result = new MainViewModel();
var result = new CompanyManagment.App.Contracts.Checkout.MainViewModel();
result.IsSysManager = accountId is 2 or 3;
result.MainList = searchResult;
if (searchModel.WorkshopId != 0 || searchModel.EmployeeId != 0)
@@ -759,11 +771,36 @@ public class IndexModel : PageModel
var maxNumber = Convert.ToDouble(ContractsId.Count());
if (ContractsId.Count > 0)
{
#region Insurance
var watch = new Stopwatch();
watch.Start();
var contractpData = _contractApplication.GetDetails(ContractsId[0]);
var startMonthFa = $"{ConvertYear}/{ConvertMonth.PadLeft(2, '0')}/01";
DateTime startDateGr = startMonthFa.ToGeorgianDateTime();
DateTime endDateGr = startMonthFa.FindeEndOfMonth().ToGeorgianDateTime();
int endOfMonth = Convert.ToInt32((startMonthFa.FindeEndOfMonth()).Substring(8, 2));
var insuranceListData =
_insuranceListRepository.EmployeeInsuranceDataBy(startDateGr, contractpData.WorkshopIds);
var yearlysaleries = _yearlySalaryApplication.GetInsuranceItems(startDateGr, endDateGr, ConvertYear);
var insuranceEmployeeData =
_leftWorkInsuranceRepository.GetEmployeeInsuranceLeftWorksAndInformation(contractpData.WorkshopIds, startDateGr,
endDateGr);
Console.WriteLine("checkout-test-timer" + watch.Elapsed);
watch.Stop();
#endregion
//int i = 0;
foreach (var item in ContractsId)
{
var contract = _contractApplication.GetDetails(item);
//var workingHours = _workingHoursApplication.GetByContractId(contract.Id);
var workingHours = _workingHoursTempApplication.GetByContractIdConvertToShiftwork4(contract.Id);
var separation = _contractApplication.contractSeparation(ConvertYear, ConvertMonth,
@@ -992,7 +1029,78 @@ public class IndexModel : PageModel
officialHoliday, totalHoursH, totalHoursM, consumableItemDouble, housingAllowanceDouble,
familyAllowanceDouble, marriedAllowanceDouble, workshop.IsOldContract);
#region Insurance
double insuranceShare = 0;
//اگر پرسنل داری شروع بکار بیمه بود
var insuranceEmployeeDataItem =
insuranceEmployeeData.FirstOrDefault(x => x.EmployeeId == contract.EmployeeId);
//اگر لیست بیمه برای پرسنل ساخته شده بود
var insuranceListDataWithDetails =
insuranceListData.FirstOrDefault(x => x.EmployeeId == contract.EmployeeId);
if (insuranceListDataWithDetails != null)
{
insuranceShare = insuranceListDataWithDetails.InsuranceShare;
}
else
{
if (insuranceEmployeeDataItem != null && insuranceEmployeeDataItem.StartWorkDateGr <= separation.ContractEndGr)
{
var workingDays = Tools.GetEmployeeInsuranceWorkingDays(insuranceEmployeeDataItem.StartWorkDateGr, separation.LeftWorkDate, startDateGr, endDateGr, insuranceEmployeeDataItem.EmployeeId);
var leftWorkFa = workingDays.hasLeftWorkInMonth ? separation.LeftWorkDate.ToFarsi() : "";
//به دست آوردن دستمزد روزانه با توجه به اینکه کارگاه مشاغل مقطوع است یا خیر
double dailyWage = 0;
if (workshop.FixedSalary)
{
var res = _insuranceListApplication.GetDailyWageFixedSalary(ConvertYear, workshop.Id, insuranceEmployeeDataItem.EmployeeId, startDateGr,
endDateGr, insuranceEmployeeDataItem.JobId, workshop.Population, workshop.InsuranceJobId);
dailyWage = res ?? 0;
}
else
{
var res = _insuranceListApplication.ComputeDailyWage(yearlysaleries.DayliWage, insuranceEmployeeDataItem.EmployeeId, workshop.Id, ConvertYear);
dailyWage = res;
}
//بدست آوردن پایه سنوات
var baseYears = _insuranceListRepository.GetEmployeeInsuranceBaseYear(insuranceEmployeeDataItem.EmployeeId, workshop.Id,
workingDays.countWorkingDays, startDateGr, endDateGr, workingDays.startWork, workingDays.endWork, workingDays.hasLeftWorkInMonth);
//جمع مزد روزانه و پایه سنوات
var dailyWagePlusBaseYears = dailyWage + baseYears.baseYear;
//دستمزد ماهانه با محاسبه پایه سنوات
var monthlySalary = _insuranceListApplication.GetRoundValue(dailyWagePlusBaseYears * workingDays.countWorkingDays);
//حق تاهل
var marriedAllowance = employee.MaritalStatus == "متاهل" ? yearlysaleries.MarriedAllowance : 0;
//محاسبه مزایای ماهانه
var monthlyBenefits = _insuranceListApplication.GetMonthlyBenefits(endOfMonth, yearlysaleries.ConsumableItems, yearlysaleries.HousingAllowance, marriedAllowance, workingDays.countWorkingDays, workshop.TypeOfInsuranceSend, insuranceEmployeeDataItem.JobId, insuranceEmployeeDataItem.EmployeeId, insuranceEmployeeDataItem.IncludeStatus);
if (workshop.InsuranceCheckoutOvertime)
{
monthlyBenefits = _insuranceListApplication.GetRoundValue(monthlyBenefits += overTimeWorking);
}
//محاسبه جمع مزایای مشمول و دستمزد ماهانه
var benefitsIncludedContinuous = monthlyBenefits + monthlySalary;
//محاسبه حق بیمه سهم بیمه شده
insuranceShare = (benefitsIncludedContinuous * 7) / 100;
}
}
#endregion
var command = new CreateCheckout
{
EmployeeFullName = employee.EmployeeFullName,
@@ -1098,7 +1206,11 @@ public class IndexModel : PageModel
DailySalaryAffected = mandatoryCompute.DailySalaryAffected,
#region InsuranceShare
InsuranceDeduction = _insuranceListApplication.GetRoundValue(insuranceShare),
#endregion

View File

@@ -2,8 +2,135 @@
@{
<style>
.btn-lime {
background-color: #84cc16;
border: 1px solid #84cc16;
background-color: #84cc16;
border: 1px solid #84cc16;
}
.fulltext {
opacity: 0;
white-space: nowrap;
}
.ellipsed {
display: block;
width: 100%;
text-overflow: ellipsis;
overflow-x: clip;
white-space: nowrap;
}
.date-box {
display: flex;
align-items: center;
}
.tooltipfull-containerText {
cursor: pointer;
position: absolute;
display: inline-block;
right: -2px;
top: 13px;
}
.tooltip {
opacity: 0;
z-index: 99;
color: #fff;
width: 220px;
display: block;
font-size: 14px;
font-family: 'IranSans';
padding: 5px 10px;
border-radius: 3px;
text-align: center;
/*text-shadow: 1px 1px 2px #111;*/
background: #e67e22;
border: 1px solid #e67e22;
box-shadow: 0 0 3px rgba(0,0,0,0.5);
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
-ms-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
-webkit-transform: scale(0);
-moz-transform: scale(0);
-o-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
position: absolute;
right: -50px;
bottom: 40px;
}
.tooltip:before, .tooltip:after {
content: '';
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #e67e22;
position: absolute;
bottom: -10px;
left: 70%;
}
.tooltip-container:hover .tooltip, a:hover .tooltip {
opacity: 1;
-webkit-transform: scale(1);
-moz-transform: scale(1);
-o-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
}
.tooltipfull {
opacity: 0;
z-index: 99;
color: #fff;
/* width: 180px;*/
display: block;
font-size: 12px;
font-family: 'IranSans';
padding: 5px 10px;
border-radius: 15px;
text-align: center;
/*text-shadow: 1px 1px 2px #111;*/
background: #950000;
border: 1px solid #950000;
box-shadow: 0 0 3px rgba(0,0,0,0.5);
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
/* -ms-transition: all .2s ease-in-out;*/
transition: all .2s ease-in-out;
-webkit-transform: scale(0);
-moz-transform: scale(0);
-o-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
position: absolute;
right: -2px;
bottom: 20px;
white-space: nowrap;
}
.tooltipfull:before, .tooltipfull:after {
content: '';
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #950000;
position: absolute;
bottom: -10px;
left: 50%;
}
.tooltipfull-containerText:hover .tooltipfull, a:hover .tooltipfull {
opacity: 1;
-webkit-transform: scale(1);
-moz-transform: scale(1);
-o-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
}
</style>
@@ -102,14 +229,41 @@
<td class="code-td">
<span class="ellipsed">
@item.Month
@{
<span>&nbsp;</span>
if(item.IsUpdateNeeded){
<i style="color: #cb1c1c; font-size:17px !important" class="fa fa-exclamation-triangle" aria-hidden="true"></i>
}
}
</span>
<div class="tooltipfull-containerText">
<p class="fulltext">
@item.Month
</p>
<span class="tooltipfull">
@item.Month
</span>
@{
if (item.IsUpdateNeeded)
{
foreach (var warning in item.CheckoutWarningMessageList)
{
<p class="fulltext">
@warning.WarningMessage
</p>
<span class="tooltipfull" style="right: -103px;bottom: 20px;">
@warning.WarningMessage
</span>
}
}
else
{
<p class="fulltext">
@item.Month
</p>
<span class="tooltipfull">
@item.Month
</span>
}
}
</div>
</td>
<td class="name-td">