merg from master

This commit is contained in:
SamSys
2025-11-20 16:02:29 +03:30
27 changed files with 13780 additions and 1519 deletions

View File

@@ -0,0 +1,9 @@
namespace _0_Framework.Application.Enums
{
public class CheckoutDynamicDeductionItem
{
public string Name { get; set; }
public int Count { get; set; }
public string Amount { get; set; }
}
}

View File

@@ -25,23 +25,23 @@ public class JobSchedulerRegistrator
public void Register()
{
//RecurringJob.AddOrUpdate(
// "InstitutionContract.CreateFinancialTransaction",
// () => CreateFinancialTransaction(),
// "*/30 * * * *" // هر 30 دقیقه یکبار چک کن
//);
RecurringJob.AddOrUpdate(
"InstitutionContract.CreateFinancialTransaction",
() => CreateFinancialTransaction(),
"*/30 * * * *" // هر 30 دقیقه یکبار چک کن
);
//RecurringJob.AddOrUpdate(
// "InstitutionContract.SendMonthlySms",
// () => SendMonthlySms(),
// "*/20 * * * *" // هر 30 دقیقه یکبار چک کن
//);
RecurringJob.AddOrUpdate(
"InstitutionContract.SendMonthlySms",
() => SendFirstDayOfMonthSms(),
"*/20 * * * *" // هر 30 دقیقه یکبار چک کن
);
//RecurringJob.AddOrUpdate(
// "InstitutionContract.SendReminderSms",
// () => SendReminderSms(),
// "*/1 * * * *" // هر 1 دقیقه یکبار چک کن
//);
RecurringJob.AddOrUpdate(
"InstitutionContract.SendReminderSms",
() => SendReminderSms(),
"*/1 * * * *" // هر 1 دقیقه یکبار چک کن
);
RecurringJob.AddOrUpdate(
"InstitutionContract.SendBlockSms",
() => SendBlockSms(),
@@ -98,8 +98,8 @@ public class JobSchedulerRegistrator
/// ارسال پیامک صورت حساب ماهانه
/// </summary>
/// <returns></returns>
[DisableConcurrentExecution(timeoutInSeconds: 1000)]
public async System.Threading.Tasks.Task SendMonthlySms()
[DisableConcurrentExecution(timeoutInSeconds: 600)]
public async System.Threading.Tasks.Task SendFirstDayOfMonthSms()
{
//var now = new DateTime(2025,11,21, 10,30,0);
var now = DateTime.Now;

View File

@@ -5,6 +5,7 @@ using _0_Framework.InfraStructure.Mongo;
using AccountManagement.Configuration;
using BackgroundInstitutionContract.Task;
using BackgroundInstitutionContract.Task.Jobs;
using CompanyManagment.App.Contracts.Hubs;
using CompanyManagment.EFCore.Services;
using Hangfire;
using Microsoft.AspNetCore.Identity;
@@ -45,7 +46,10 @@ QueryBootstrapper.Configure(builder.Services);
JobsBootstrapper.Configure(builder.Services);
builder.Services.AddHttpClient();
builder.Services.AddHttpContextAccessor();
builder.Services.AddSignalR();
var app = builder.Build();
app.MapHub<SendSmsHub>("/sendSmsHub");
app.MapHangfireDashboard();
app.MapGet("/", () => "Hello World!");

View File

@@ -25,7 +25,8 @@
//mahan Docker
//"MesbahDb": "Data Source=localhost,5069;Initial Catalog=mesbah_db;User ID=sa;Password=YourPassword123;TrustServerCertificate=True;",
"HangfireDb": "Data Source=.;Initial Catalog=hangfire_db;Integrated Security=True;TrustServerCertificate=true;"
//"HangfireDb": "Data Source=.;Initial Catalog=hangfire_db;Integrated Security=True;TrustServerCertificate=true;",
"HangfireDb": "Data Source=185.208.175.186;Initial Catalog=hangfire_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]18[3019]#@ATt;TrustServerCertificate=true;"
},
"GoogleRecaptchaV3": {

View File

@@ -2,8 +2,27 @@
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
"ConnectionStrings": {
//local
//"MesbahDb": "Data Source=.;Initial Catalog=mesbah_db;Integrated Security=True;TrustServerCertificate=true;",
"MesbahDb": "Data Source=185.208.175.186;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]18[3019]#@ATt;TrustServerCertificate=true;",
//dad-mehr
//"MesbahDb": "Data Source=.;Initial Catalog=teamWork;Integrated Security=True;TrustServerCertificate=true;",
//"TestDb": "Data Source=.;Initial Catalog=TestDb;Integrated Security=True;TrustServerCertificate=true;",
"TestDb": "Data Source=185.208.175.186;Initial Catalog=TestDb;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]18[3019]#@ATt;TrustServerCertificate=true;",
//"MesbahDb": "Data Source=.\\MSSQLSERVER2019;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=mesbah_db;Password=sa142857$@;"
//"HangfireDb": "Data Source=.;Initial Catalog=hangfire_db;Integrated Security=True;TrustServerCertificate=true;",
"HangfireDb": "Data Source=185.208.175.186;Initial Catalog=hangfire_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]18[3019]#@ATt;TrustServerCertificate=true;"
},
"MongoDb": {
"ConnectionString": "mongodb://localhost:27017",
"DatabaseName": "Gozareshgir"
}
}

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using _0_Framework.Application;
using _0_Framework.Application.Enums;
using _0_Framework.Domain;
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
@@ -33,7 +34,8 @@ public class CustomizeCheckout : EntityBase
ICollection<CustomizeCheckoutSalaryAid> customizeCheckoutSalaryAids,
ICollection<CustomizeCheckoutReward> customizeCheckoutRewards, TimeSpan lateToWorkValue, double settingSalary,
double dailyWage, WorkshopShiftStatus shiftStatus, IrregularShift irregularShift,
ICollection<CustomizeRotatingShift> customizeRotatingShifts, ICollection<CustomizeCheckoutRegularShift> employeeSettingsShifts)
ICollection<CustomizeRotatingShift> customizeRotatingShifts, ICollection<CustomizeCheckoutRegularShift> employeeSettingsShifts,
ICollection<CheckoutDynamicDeductionItem> checkoutDynamicDeductions)
{
YearInt = Convert.ToInt32(contractStart.ToFarsi().Substring(0, 4));
MonthInt = Convert.ToInt32(contractStart.ToFarsi().Substring(5, 2));
@@ -83,6 +85,7 @@ public class CustomizeCheckout : EntityBase
IrregularShift = irregularShift;
CustomizeRotatingShifts = customizeRotatingShifts;
RegularShifts = employeeSettingsShifts;
CheckoutDynamicDeductions = checkoutDynamicDeductions;
}
@@ -286,6 +289,7 @@ public class CustomizeCheckout : EntityBase
public ICollection<CustomizeCheckoutLoanInstallments> CustomizeCheckoutLoanInstallments { get; set; }
public ICollection<CustomizeCheckoutSalaryAid> CustomizeCheckoutSalaryAids { get; set; }
public ICollection<CustomizeCheckoutReward> CustomizeCheckoutRewards { get; set; }
public ICollection<CheckoutDynamicDeductionItem> CheckoutDynamicDeductions { get; private set; }
public IrregularShift IrregularShift { get; set; }
public ICollection<CustomizeRotatingShift> CustomizeRotatingShifts { get; set; }

View File

@@ -9,6 +9,7 @@ using Company.Domain.CustomizeCheckoutTempAgg.ValueObjects;
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
using System.Linq;
using _0_Framework.Application.Enums;
namespace Company.Domain.CustomizeCheckoutTempAgg;
@@ -21,7 +22,8 @@ public class CustomizeCheckoutTemp : EntityBase
{
LateToWorkValue = lateToWorkValue;
}
public CustomizeCheckoutTemp(DateTime contractStart, DateTime contractEnd, long employeeId, string employeeFName,
public CustomizeCheckoutTemp(
DateTime contractStart, DateTime contractEnd, long employeeId, string employeeFName,
string employeeLName, DateTime employeeDateOfBirth,
string employeeNationalCode, string workshopFullName, long workshopId, long? contractId,
double monthlySalary, double fridayPay, double overTimePay, double baseYearsPay, double bonusesPay,
@@ -37,7 +39,8 @@ public class CustomizeCheckoutTemp : EntityBase
ICollection<CustomizeCheckoutTempSalaryAid> customizeCheckoutSalaryAids,
ICollection<CustomizeCheckoutTempReward> customizeCheckoutRewards,
TimeSpan lateToWorkValue, double settingSalary, double dailyWage, WorkshopShiftStatus shiftStatus, IrregularShift irregularShift,
ICollection<CustomizeRotatingShift> customizeRotatingShifts, ICollection<CustomizeCheckoutRegularShift> employeeSettingsShifts)
ICollection<CustomizeRotatingShift> customizeRotatingShifts, ICollection<CustomizeCheckoutRegularShift> employeeSettingsShifts,
ICollection<CheckoutDynamicDeductionItem> checkoutDynamicDeductions)
{
YearInt = Convert.ToInt32(contractStart.ToFarsi().Substring(0, 4));
MonthInt = Convert.ToInt32(contractStart.ToFarsi().Substring(5, 2));
@@ -87,6 +90,7 @@ public class CustomizeCheckoutTemp : EntityBase
IrregularShift = irregularShift;
CustomizeRotatingShifts = customizeRotatingShifts;
RegularShifts = employeeSettingsShifts;
CheckoutDynamicDeductions = checkoutDynamicDeductions;
}
#region Getters
@@ -123,6 +127,7 @@ public class CustomizeCheckoutTemp : EntityBase
public IrregularShift IrregularShift { get; set; }
public ICollection<CustomizeRotatingShift> CustomizeRotatingShifts { get; set; }
public ICollection<CustomizeCheckoutRegularShift> RegularShifts { get; set; }
public ICollection<CheckoutDynamicDeductionItem> CheckoutDynamicDeductions { get; private set; }
#endregion
@@ -389,4 +394,4 @@ public class CustomizeCheckoutTemp : EntityBase
{
HasAmountConflict = hasConflict;
}
}
}

View File

@@ -1,8 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.AccessControl;
using _0_Framework.Application;
using _0_Framework.Application.Enums;
using _0_Framework.Domain.CustomizeCheckoutShared.Base;
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
@@ -18,8 +20,6 @@ namespace CompanyManagment.App.Contracts.CustomizeCheckout;
public class CustomizeCheckoutMandatoryViewModel
{
/// <summary>
/// حقوق ماهانه
/// </summary>
@@ -159,7 +159,7 @@ public class CustomizeCheckoutMandatoryViewModel
/// </summary>
public double TotalDeductionsDouble => FineAbsenceDeduction + InsuranceDeduction + LateToWorkDeduction +
EarlyExitDeduction + SalaryAidDeduction + InstallmentDeduction +
FineDeduction + TaxDeduction;
FineDeduction + TaxDeduction+ DynamicDeductions.Sum(x=>x.Amount.MoneyToDouble());
/// <summary>
/// مجموع مطالبات
@@ -207,6 +207,8 @@ public class CustomizeCheckoutMandatoryViewModel
public ICollection<CustomizeRotatingShift> CustomizeRotatingShifts { get; set; } = [];
public ICollection<CustomizeSifts> EmployeeSettingsShifts { get; set; } = [];
public List<CheckoutDynamicDeductionItem> DynamicDeductions { get; set; } = new();
}

View File

@@ -4,6 +4,7 @@ using System;
using System.Collections.Generic;
using System.Runtime;
using System.Security.AccessControl;
using _0_Framework.Application.Enums;
using _0_Framework.Domain.CustomizeCheckoutShared.Base;
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
@@ -12,113 +13,115 @@ using CompanyManagment.App.Contracts.Loan;
using CompanyManagment.App.Contracts.Reward;
using CompanyManagment.App.Contracts.SalaryAid;
namespace CompanyManagment.App.Contracts.CustomizeCheckout
namespace CompanyManagment.App.Contracts.CustomizeCheckout;
public class CustomizeCheckoutViewModel
{
public class CustomizeCheckoutViewModel
{
public long Id { get; set; }
public DateTime CreationDate { get; set; }
public string Month { get; set; }
public string Year { get; set; }
public int PrintCounter { get; set; }
public long Id { get; set; }
public DateTime CreationDate { get; set; }
public string Month { get; set; }
public string Year { get; set; }
public int PrintCounter { get; set; }
public long EmployeeId { get; set; }
public string EmployeeFName { get; set; }
public string EmployeeLName { get; set; }
public string EmployeeFullName => $"{EmployeeFName} {EmployeeLName}";
public string FatherName { get; set; }
public string NationalCode { get; set; }
public string DateOfBirth { get; set; }
public long PersonnelCode { get; set; }
public string PersonnelCodeString => PersonnelCode.ToString();
public long EmployeeId { get; set; }
public string EmployeeFName { get; set; }
public string EmployeeLName { get; set; }
public string EmployeeFullName => $"{EmployeeFName} {EmployeeLName}";
public string FatherName { get; set; }
public string NationalCode { get; set; }
public string DateOfBirth { get; set; }
public long PersonnelCode { get; set; }
public string PersonnelCodeString => PersonnelCode.ToString();
public string WorkshopName { get; set; }
public long WorkshopId { get; set; }
public string WorkshopName { get; set; }
public long WorkshopId { get; set; }
public long EmployerId { get; set; }
public string EmployerName { get; set; }
public List<EmployerViewModel> EmployerList { get; set; }
public long EmployerId { get; set; }
public string EmployerName { get; set; }
public List<EmployerViewModel> EmployerList { get; set; }
public long ContractId { get; set; }
public string ContractNo { get; set; }
public DateTime ContractStartGr { get; set; }
public DateTime ContractEndGr { get; set; }
public string ContractStartFa { get; set; }
public string ContractEndFa { get; set; }
//[JsonIgnore]
//public string LastDayOfWork => LeftWorkDateGr.AddDays(-1).ToFarsi();
//[JsonIgnore]
//public string LeftWorkDateFa => LeftWorkDateGr.ToFarsi();
public DateTime LeftWorkDateGr { get; set; }
public long ContractId { get; set; }
public string ContractNo { get; set; }
public DateTime ContractStartGr { get; set; }
public DateTime ContractEndGr { get; set; }
public string ContractStartFa { get; set; }
public string ContractEndFa { get; set; }
//[JsonIgnore]
//public string LastDayOfWork => LeftWorkDateGr.AddDays(-1).ToFarsi();
//[JsonIgnore]
//public string LeftWorkDateFa => LeftWorkDateGr.ToFarsi();
public DateTime LeftWorkDateGr { get; set; }
public string SumOfWorkingDays { get; set; }
public string SumOfWorkingDays { get; set; }
public string MonthlySalary { get; set; }
public string BaseYearsPay { get; set; }
public string MonthlySalary { get; set; }
public string BaseYearsPay { get; set; }
public string MarriedAllowance { get; set; }
public string OvertimePay { get; set; }
public string NightworkPay { get; set; }
public string FridayPay { get; set; }
public string MissionPay { get; set; }
public string ShiftPay { get; set; }
public string FamilyAllowance { get; set; }
public string BonusesPay { get; set; }
public string LeavePay { get; set; }
public string RewardPay { get; set; }
public string MarriedAllowance { get; set; }
public string OvertimePay { get; set; }
public string NightworkPay { get; set; }
public string FridayPay { get; set; }
public string MissionPay { get; set; }
public string ShiftPay { get; set; }
public string FamilyAllowance { get; set; }
public string BonusesPay { get; set; }
public string LeavePay { get; set; }
public string RewardPay { get; set; }
public bool IsBirthday { get; set; } = true;
public string FineDeduction { get; set; }
public string InsuranceDeduction { get; set; }
public string TaxDeducation { get; set; }
public string InstallmentDeduction { get; set; }
public string SalaryAidDeduction { get; set; }
public string AbsenceDeduction { get; set; }
public string EarlyExitDeduction { get; set; }
public string LateToWorkDeduction { get; set; }
public bool IsBirthday { get; set; } = true;
public string FineDeduction { get; set; }
public string InsuranceDeduction { get; set; }
public string TaxDeducation { get; set; }
public string InstallmentDeduction { get; set; }
public string SalaryAidDeduction { get; set; }
public string AbsenceDeduction { get; set; }
public string EarlyExitDeduction { get; set; }
public string LateToWorkDeduction { get; set; }
public string TotalClaims { get; set; }
public string TotalDeductions { get; set; }
public string TotalPayment { get; set; }
public string TotalClaims { get; set; }
public string TotalDeductions { get; set; }
public string TotalPayment { get; set; }
public List<FineViewModel> FineViewModelList { get; set; }
public List<RewardViewModel> RewardViewModels { get; set; }
public List<LoanInstallmentViewModel> InstallmentViewModels { get; set; }
public List<SalaryAidViewModel> SalaryAidViewModels { get; set; }
public bool TotalPaymentHide { get; set; }
public PersonnelCheckoutDailyRollCallViewModel MonthlyRollCall { get; set; }
public double TotalPaymentD { get; set; }
public List<FineViewModel> FineViewModelList { get; set; }
public List<RewardViewModel> RewardViewModels { get; set; }
public List<LoanInstallmentViewModel> InstallmentViewModels { get; set; }
public List<SalaryAidViewModel> SalaryAidViewModels { get; set; }
public bool TotalPaymentHide { get; set; }
public PersonnelCheckoutDailyRollCallViewModel MonthlyRollCall { get; set; }
public double TotalPaymentD { get; set; }
public string TotalLateToWorkDeduction { get; set; }
public string TotalLateToWorkDeduction { get; set; }
public string LateToWorkValue { get; set; }
public string LateToWorkValue { get; set; }
public string SettingSalary { get; set; }
public string DailyWage { get; set; }
public WorkshopShiftStatus ShiftStatus { get; set; }
public string SettingSalary { get; set; }
public string DailyWage { get; set; }
public WorkshopShiftStatus ShiftStatus { get; set; }
public string EmployeePicture { get; set; }
public string EmployeePicture { get; set; }
public IrregularShift IrregularShift { get; set; }
public List<CustomizeRotatingShift> CustomizeRotatingShifts { get; set; }
public List<CustomizeSifts> RegularShift { get; set; }
public IrregularShift IrregularShift { get; set; }
public List<CustomizeRotatingShift> CustomizeRotatingShifts { get; set; }
public List<CustomizeSifts> RegularShift { get; set; }
public bool HasAmountConflict { get; set; }
public bool HasAmountConflict { get; set; }
//public bool HasLeft { get; set; }
//public string IsBlockCantracingParty { get; set; }
//public string IsActiveString { get; set; }
//public long WorkingHoursId { get; set; }
//public string ArchiveCode { get; set; }
//public string ConsumableItems { get; set; }
//public string HousingAllowance { get; set; }
//public string YearsPay { get; set; }
// New: up to three dynamic deduction items (name, count, amount)
public List<CheckoutDynamicDeductionItem> CheckoutDynamicDeductions { get; set; } = new List<CheckoutDynamicDeductionItem>();
//public bool HasLeft { get; set; }
//public string IsBlockCantracingParty { get; set; }
//public string IsActiveString { get; set; }
//public long WorkingHoursId { get; set; }
//public string ArchiveCode { get; set; }
//public string ConsumableItems { get; set; }
//public string HousingAllowance { get; set; }
//public string YearsPay { get; set; }
}
}

View File

@@ -123,7 +123,7 @@ namespace CompanyManagment.Application
result.LateToWorkDeduction, result.EarlyExitDeduction, result.RewardPay, result.SalaryAidDeduction, result.InstallmentDeduction, result.FineDeduction,
result.TaxDeduction, result.SumOfWorkingDays, result.TotalClaimsStr, result.TotalDeductionsStr, result.TotalPayment, contract?.ContractNo ?? "-",
fines, loanInstallments, salaryAids, rewards, result.LateToWorkValue, result.SettingSalary, result.DailyWage, result.ShiftStatus, result.IrregularShift, result.CustomizeRotatingShifts,
regularShift);
regularShift,result.DynamicDeductions);
_customizeCheckoutRepository.Create(entity);
@@ -187,7 +187,7 @@ namespace CompanyManagment.Application
computations.LateToWorkDeduction, computations.EarlyExitDeduction, computations.RewardPay, computations.SalaryAidDeduction, computations.InstallmentDeduction, computations.FineDeduction,
computations.TaxDeduction, computations.SumOfWorkingDays, computations.TotalClaimsStr, computations.TotalDeductionsStr, computations.TotalPayment, contract?.ContractNo ?? "-",
fines, loanInstallments, salaryAids, rewards, computations.LateToWorkValue, computations.SettingSalary, computations.DailyWage, computations.ShiftStatus, computations.IrregularShift,
computations.CustomizeRotatingShifts, regularShift);
computations.CustomizeRotatingShifts, regularShift,computations.DynamicDeductions);
_customizeCheckoutRepository.Create(entity);
_customizeCheckoutRepository.RemoveEmployeeCustomizeCheckoutInDates(command.WorkshopId, employeeId, command.ContractStart, command.ContractEnd);

View File

@@ -98,7 +98,7 @@ namespace CompanyManagment.Application
result.LateToWorkDeduction, result.EarlyExitDeduction, result.RewardPay, result.SalaryAidDeduction, result.InstallmentDeduction, result.FineDeduction,
result.TaxDeduction, result.SumOfWorkingDays, result.TotalClaimsStr, result.TotalDeductionsStr, result.TotalPayment, contract?.ContractNo ?? "-",
fines, loanInstallments, salaryAids, rewards, result.LateToWorkValue, result.SettingSalary, result.DailyWage, result.ShiftStatus, result.IrregularShift, result.CustomizeRotatingShifts,
regularShift);
regularShift,result.DynamicDeductions);
_customizeCheckoutTempRepository.Create(entity);
@@ -146,7 +146,8 @@ namespace CompanyManagment.Application
var regularShift = computations.EmployeeSettingsShifts.Select(x =>
new CustomizeCheckoutRegularShift(x.StartTime, x.EndTime, x.Placement)).ToList();
var entity = new CustomizeCheckoutTemp(command.ContractStart, command.ContractEnd, employeeId, employee.FName, employee.LName, employee.DateOfBirth, employee.NationalCode,
workshop.WorkshopFullName, command.WorkshopId, contract?.Id,
computations.MonthlySalary, computations.FridayPay, computations.OverTimePay, computations.BaseYearsPay,
@@ -155,7 +156,7 @@ namespace CompanyManagment.Application
computations.LateToWorkDeduction, computations.EarlyExitDeduction, computations.RewardPay, computations.SalaryAidDeduction, computations.InstallmentDeduction, computations.FineDeduction,
computations.TaxDeduction, computations.SumOfWorkingDays, computations.TotalClaimsStr, computations.TotalDeductionsStr, computations.TotalPayment, contract?.ContractNo ?? "-",
fines, loanInstallments, salaryAids, rewards, computations.LateToWorkValue, computations.SettingSalary, computations.DailyWage, computations.ShiftStatus, computations.IrregularShift,
computations.CustomizeRotatingShifts, regularShift);
computations.CustomizeRotatingShifts, regularShift,computations.DynamicDeductions);
_customizeCheckoutTempRepository.Create(entity);
_customizeCheckoutTempRepository.RemoveEmployeeTemporaryCheckoutInDates(command.WorkshopId, employeeId, command.ContractStart, command.ContractEnd);
}

View File

@@ -131,5 +131,12 @@ public class CustomizeCheckoutMapping : IEntityTypeConfiguration<CustomizeChecko
// .HasForeignKey(x => x.EmployeeId);
#endregion
builder.OwnsMany(x => x.CheckoutDynamicDeductions, dynamicDeduction =>
{
dynamicDeduction.Property(x => x.Name).HasMaxLength(100);
dynamicDeduction.Property(x => x.Count);
dynamicDeduction.Property(x => x.Amount).HasMaxLength(30);
});
}
}

View File

@@ -129,5 +129,12 @@ public class CustomizeCheckoutTempMapping : IEntityTypeConfiguration<CustomizeCh
// .HasForeignKey(x => x.EmployeeId);
#endregion
builder.OwnsMany(x => x.CheckoutDynamicDeductions, dynamicDeduction =>
{
dynamicDeduction.Property(x => x.Name).HasMaxLength(100);
dynamicDeduction.Property(x => x.Count);
dynamicDeduction.Property(x => x.Amount).HasMaxLength(30);
});
}
}

View File

@@ -0,0 +1,68 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CompanyManagment.EFCore.Migrations
{
/// <inheritdoc />
public partial class adddynamicdeductiontocustomizecheckouts : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "CustomizeCheckouts_CheckoutDynamicDeductions",
columns: table => new
{
CustomizeCheckoutid = table.Column<long>(type: "bigint", nullable: false),
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
Count = table.Column<int>(type: "int", nullable: false),
Amount = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_CustomizeCheckouts_CheckoutDynamicDeductions", x => new { x.CustomizeCheckoutid, x.Id });
table.ForeignKey(
name: "FK_CustomizeCheckouts_CheckoutDynamicDeductions_CustomizeCheckouts_CustomizeCheckoutid",
column: x => x.CustomizeCheckoutid,
principalTable: "CustomizeCheckouts",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "CustomizeCheckoutTemps_CheckoutDynamicDeductions",
columns: table => new
{
CustomizeCheckoutTempid = table.Column<long>(type: "bigint", nullable: false),
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
Count = table.Column<int>(type: "int", nullable: false),
Amount = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_CustomizeCheckoutTemps_CheckoutDynamicDeductions", x => new { x.CustomizeCheckoutTempid, x.Id });
table.ForeignKey(
name: "FK_CustomizeCheckoutTemps_CheckoutDynamicDeductions_CustomizeCheckoutTemps_CustomizeCheckoutTempid",
column: x => x.CustomizeCheckoutTempid,
principalTable: "CustomizeCheckoutTemps",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CustomizeCheckouts_CheckoutDynamicDeductions");
migrationBuilder.DropTable(
name: "CustomizeCheckoutTemps_CheckoutDynamicDeductions");
}
}
}

View File

@@ -7548,6 +7548,36 @@ namespace CompanyManagment.EFCore.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.OwnsMany("_0_Framework.Application.Enums.CheckoutDynamicDeductionItem", "CheckoutDynamicDeductions", b1 =>
{
b1.Property<long>("CustomizeCheckoutid")
.HasColumnType("bigint");
b1.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property<int>("Id"));
b1.Property<string>("Amount")
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b1.Property<int>("Count")
.HasColumnType("int");
b1.Property<string>("Name")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b1.HasKey("CustomizeCheckoutid", "Id");
b1.ToTable("CustomizeCheckouts_CheckoutDynamicDeductions");
b1.WithOwner()
.HasForeignKey("CustomizeCheckoutid");
});
b.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.CustomizeRotatingShift", "CustomizeRotatingShifts", b1 =>
{
b1.Property<long>("CustomizeCheckoutid")
@@ -7809,6 +7839,8 @@ namespace CompanyManagment.EFCore.Migrations
.HasForeignKey("CustomizeCheckoutid");
});
b.Navigation("CheckoutDynamicDeductions");
b.Navigation("CheckoutFines");
b.Navigation("CustomizeCheckoutLoanInstallments");
@@ -7842,6 +7874,36 @@ namespace CompanyManagment.EFCore.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.OwnsMany("_0_Framework.Application.Enums.CheckoutDynamicDeductionItem", "CheckoutDynamicDeductions", b1 =>
{
b1.Property<long>("CustomizeCheckoutTempid")
.HasColumnType("bigint");
b1.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property<int>("Id"));
b1.Property<string>("Amount")
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b1.Property<int>("Count")
.HasColumnType("int");
b1.Property<string>("Name")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b1.HasKey("CustomizeCheckoutTempid", "Id");
b1.ToTable("CustomizeCheckoutTemps_CheckoutDynamicDeductions");
b1.WithOwner()
.HasForeignKey("CustomizeCheckoutTempid");
});
b.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.ValueObjects.CustomizeRotatingShift", "CustomizeRotatingShifts", b1 =>
{
b1.Property<long>("CustomizeCheckoutTempid")
@@ -8103,6 +8165,8 @@ namespace CompanyManagment.EFCore.Migrations
.HasForeignKey("CustomizeCheckoutTempid");
});
b.Navigation("CheckoutDynamicDeductions");
b.Navigation("CheckoutFines");
b.Navigation("CustomizeCheckoutLoanInstallments");

View File

@@ -230,8 +230,8 @@ namespace CompanyManagment.EFCore.Repository
ShiftStatus = x.ShiftStatus,
IrregularShift = x.IrregularShift,
CustomizeRotatingShifts = x.CustomizeRotatingShifts.ToList(),
RegularShift = x.RegularShifts.Select(s => (CustomizeSifts)s).ToList()
RegularShift = x.RegularShifts.Select(s => (CustomizeSifts)s).ToList(),
CheckoutDynamicDeductions = x.CheckoutDynamicDeductions.ToList()
}).ToList();
List<WorkshopViewModel> workshopsList = workshopsQuery.Select(x => new WorkshopViewModel
{

View File

@@ -371,7 +371,8 @@ namespace CompanyManagment.EFCore.Repository
ShiftStatus = x.ShiftStatus,
IrregularShift = x.IrregularShift,
CustomizeRotatingShifts = x.CustomizeRotatingShifts.ToList(),
RegularShift = x.RegularShifts.Select(x => (CustomizeSifts)x).ToList()
RegularShift = x.RegularShifts.Select(x => (CustomizeSifts)x).ToList(),
CheckoutDynamicDeductions = x.CheckoutDynamicDeductions.ToList()
}).ToList();
List<WorkshopViewModel> workshopsList = workshopsQuery.Select(x => new WorkshopViewModel

View File

@@ -3427,11 +3427,24 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
x.ContractAmountDouble > 0).GroupBy(x => x.ContractingPartyId).Select(x => x.First()).ToListAsync();
var contractingPartyList = await _context.PersonalContractingParties
.Where(x => institutionContracts.Select(ins => ins.ContractingPartyId).Contains(x.id)).ToListAsync();
var financialStatmentList = await _context.FinancialStatments.AsSplitQuery()
.Where(x => institutionContracts.Select(ins => ins.ContractingPartyId).Contains(x.ContractingPartyId))
.Include(x => x.FinancialTransactionList).Where(
x => x.FinancialTransactionList.Count > 0).ToListAsync();
var phoneNumberList = await _context.InstitutionContractContactInfos
.Where(x => institutionContracts.Select(ins => ins.Id).Contains(x.InstitutionContractId))
.Where(x => x.SendSms && x.PhoneType == "شماره همراه" && !string.IsNullOrWhiteSpace(x.PhoneNumber) &&
x.PhoneNumber.Length == 11).ToListAsync();
foreach (var item in institutionContracts)
{
try
{
var contractingParty = await _context.PersonalContractingParties.FirstOrDefaultAsync(x => x.id == item.ContractingPartyId);
var contractingParty = contractingPartyList.FirstOrDefault(x => x.id == item.ContractingPartyId);
if (contractingParty != null && contractingParty.IsBlock == "true")
{
@@ -3443,26 +3456,25 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
var isLegal = contractingParty.IsLegal == "حقوقی" ? true : false;
var hasFinancialStatment =await _context.FinancialStatments.Include(x => x.FinancialTransactionList).AnyAsync(
x => x.ContractingPartyId == item.ContractingPartyId && x.FinancialTransactionList.Count > 0);
var hasPhonNumber =await _context.InstitutionContractContactInfos
.AnyAsync(x => x.InstitutionContractId == item.Id && x.SendSms && x.PhoneType == "شماره همراه" &&
x.PhoneNumber.Length == 11);
var hasFinancialStatment =
financialStatmentList.Any(x => x.ContractingPartyId == item.ContractingPartyId & x.FinancialTransactionList.Count > 0);
var hasPhonNumber = phoneNumberList.Any(x => x.InstitutionContractId == item.Id);
if (hasFinancialStatment && hasPhonNumber)
{
var transactions = GetFinancialByContractingPartyId(contractingParty.id).GetAwaiter().GetResult();
var debtor = transactions.FinancialTransactionViewModels.Sum(x => x.Deptor);
var creditor = transactions.FinancialTransactionViewModels.Sum(x => x.Creditor);
var transactions = financialStatmentList.FirstOrDefault(x => x.ContractingPartyId == item.ContractingPartyId);
var debtor = transactions.FinancialTransactionList.Sum(x => x.Deptor);
var creditor = transactions.FinancialTransactionList.Sum(x => x.Creditor);
var id = $"{item.ContractingPartyId}";
var aprove = $"{transactions.Id}";
var aprove = $"{transactions.id}";
var balance = debtor - creditor;
if (balance > 0)
{
@@ -3470,10 +3482,10 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
var taxAndFinancial = "بابت قرارداد مابین (حسابداری و مالیات)";
var jobRelationContract = transactions.FinancialTransactionViewModels
var jobRelationContract = transactions.FinancialTransactionList
.OrderByDescending(x => x.TdateGr).FirstOrDefault(x =>
x.TypeOfTransaction == "debt" && x.DescriptionOption == jobRelation);
var taxAndFinancialContract = transactions.FinancialTransactionViewModels
var taxAndFinancialContract = transactions.FinancialTransactionList
.OrderByDescending(x => x.TdateGr).FirstOrDefault(x =>
x.TypeOfTransaction == "debt" && x.DescriptionOption == taxAndFinancial);
@@ -3486,9 +3498,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
if (balance >= sumOfAmounts)
{
var phoneNumbers = new List<CreateContactInfo>();
phoneNumbers = await _context.InstitutionContractContactInfos.Where(n =>
n.InstitutionContractId == item.Id && n.SendSms && n.PhoneType == "شماره همراه" &&
!string.IsNullOrWhiteSpace(n.PhoneNumber))
phoneNumbers = phoneNumberList.Where(x => x.InstitutionContractId == item.Id)
.Select(x => new CreateContactInfo
{
PhoneType = x.PhoneType,
@@ -3496,7 +3506,8 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
InstitutionContractId = x.InstitutionContractId,
SendSms = x.SendSms
}).Where(x => x.PhoneNumber.Length == 11).ToListAsync();
}).Where(x => x.PhoneNumber.Length == 11).ToList();
var accountType = item.OfficialCompany == "Official" ? "ol" : "nol";
@@ -3568,7 +3579,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
var contractingPartyList = await _context.PersonalContractingParties
.Where(x=> institutionContracts.Select(ins => ins.ContractingPartyId).Contains(x.id)).ToListAsync();
var financialStamentList = await _context.FinancialStatments.AsSplitQuery()
var financialStatmentList = await _context.FinancialStatments.AsSplitQuery()
.Where(x=> institutionContracts.Select(ins => ins.ContractingPartyId).Contains(x.ContractingPartyId))
.Include(x => x.FinancialTransactionList).Where(
x => x.FinancialTransactionList.Count > 0).ToListAsync();
@@ -3602,7 +3613,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
if (!string.IsNullOrWhiteSpace(contractingParty.IsActiveString) && isActive)
{
var hasFinancialStatement =
financialStamentList.Any(x => x.ContractingPartyId == item.ContractingPartyId);
financialStatmentList.Any(x => x.ContractingPartyId == item.ContractingPartyId);
var hasPhonNumber = phoneNumberList.Any(x => x.InstitutionContractId == item.Id);
@@ -3621,7 +3632,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
SendSms = x.SendSms
}).Where(x => x.PhoneNumber.Length == 11).ToList();
var transactions = financialStamentList.FirstOrDefault(x=>x.ContractingPartyId == item.ContractingPartyId);
var transactions = financialStatmentList.FirstOrDefault(x=>x.ContractingPartyId == item.ContractingPartyId);
var debtor = transactions.FinancialTransactionList.Sum(x => x.Deptor);
var creditor = transactions.FinancialTransactionList.Sum(x => x.Creditor);

View File

@@ -412,17 +412,23 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
DateTimeGr = x.Key.Date,
IsSliced = x.Count() > 2,
IsAbsent = false,
EnterDifferencesMinutes1 = firstRollCall != null && firstRollCall.LateEntryDuration > TimeSpan.Zero && workshopId == 170
EnterDifferencesMinutes1 = firstRollCall != null && firstRollCall.LateEntryDuration > TimeSpan.Zero
? CalculateEntryMinuteDifference(firstRollCall.EarlyEntryDuration,
firstRollCall.LateEntryDuration)
: "",
ExitDifferencesMinutes1 = "",
ExitDifferencesMinutes1 = firstRollCall != null && firstRollCall.EarlyExitDuration > TimeSpan.Zero
? CalculateExitMinuteDifference(firstRollCall.EarlyExitDuration,
firstRollCall.LateExitDuration)
: "",
EnterDifferencesMinutes2 = secondRollCall != null && secondRollCall.LateEntryDuration > TimeSpan.Zero && workshopId == 170 && hasSecondTimeDiff
EnterDifferencesMinutes2 = secondRollCall != null && secondRollCall.LateEntryDuration > TimeSpan.Zero && hasSecondTimeDiff
? CalculateEntryMinuteDifference(secondRollCall.EarlyEntryDuration,
secondRollCall.LateEntryDuration)
: "",
ExitDifferencesMinutes2 = ""
ExitDifferencesMinutes2 = secondRollCall != null && secondRollCall.EarlyExitDuration > TimeSpan.Zero && hasSecondTimeDiff
? CalculateExitMinuteDifference(secondRollCall.EarlyExitDuration,
secondRollCall.LateExitDuration)
: ""
};
});
presentDays = presentDays.Select(x => new CheckoutDailyRollCallViewModel
@@ -1749,17 +1755,23 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
IsSliced = x.Count() > 2,
IsAbsent = false,
EnterDifferencesMinutes1 = firstRollCall != null && firstRollCall.LateEntryDuration > TimeSpan.Zero && workshopId == 170
EnterDifferencesMinutes1 = firstRollCall != null && firstRollCall.LateEntryDuration > TimeSpan.Zero
? CalculateEntryMinuteDifference(firstRollCall.EarlyEntryDuration,
firstRollCall.LateEntryDuration)
: "",
ExitDifferencesMinutes1 = "",
ExitDifferencesMinutes1 = firstRollCall != null && firstRollCall.EarlyExitDuration > TimeSpan.Zero
? CalculateExitMinuteDifference(firstRollCall.EarlyExitDuration,
firstRollCall.LateExitDuration)
: "",
EnterDifferencesMinutes2 = secondRollCall != null && secondRollCall.LateEntryDuration > TimeSpan.Zero && workshopId == 170&& hasSecondTimeDiff
EnterDifferencesMinutes2 = secondRollCall != null && secondRollCall.LateEntryDuration > TimeSpan.Zero && hasSecondTimeDiff
? CalculateEntryMinuteDifference(secondRollCall.EarlyEntryDuration,
secondRollCall.LateEntryDuration)
: "",
ExitDifferencesMinutes2 = ""
ExitDifferencesMinutes2 = secondRollCall != null && secondRollCall.EarlyExitDuration > TimeSpan.Zero && hasSecondTimeDiff
? CalculateExitMinuteDifference(secondRollCall.EarlyExitDuration,
secondRollCall.LateExitDuration)
: ""
};
});
presentDays = presentDays.Select(x => new CheckoutDailyRollCallViewModel
@@ -1814,9 +1826,6 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
//حضور غیاب گروهی از پرسنل برای پرینت گروهی فیش حقوقی غیر رسمی نهایی
public List<PersonnelCheckoutDailyRollCallViewModel> GetEmployeeRollCallsForMonthForKababMahdi(IEnumerable<long> employeeIds, long workshopId, DateTime start, DateTime end)
{
var rollCalls = _context.RollCalls.Where(x =>
employeeIds.Contains(x.EmployeeId) && workshopId == x.WorkshopId && x.StartDate != null &&
x.EndDate != null && x.RollCallModifyType != RollCallModifyType.Undefined &&

View File

@@ -152,7 +152,6 @@ namespace ServiceHost.Areas.Client.Pages.Company.CustomizeCheckout
public IActionResult OnGetPrintOne(long checkoutId, int yearFa, int monthFa)
{
List<long> id = new() { checkoutId };
Console.WriteLine(id);
var result = _customizeCheckoutTempApplication.PrintAll(_workshopId, id).FirstOrDefault();
return Partial("PrintOneCheckoutTemporary", result);
}

View File

@@ -170,7 +170,11 @@
</table>
</div>
</div>
@{
var firstDynamicData = Model.CheckoutDynamicDeductions.FirstOrDefault();
var secondDynamicData = Model.CheckoutDynamicDeductions.Skip(1).FirstOrDefault();
var thirdDynamicData = Model.CheckoutDynamicDeductions.Skip(2).FirstOrDefault();
}
<div class="row" style="margin-top: 10px;padding: 0 12px;">
<fieldset style="border: 1px solid black !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden;padding: 0;">
<table style="/* table-layout: fixed; */ width: 100%">
@@ -277,27 +281,27 @@
<td style="padding-right: 8px; border-left: 1px solid #000;"> عیدی </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.BonusesPay == "0" ? "-" : Model.BonusesPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
<td style="padding-right: 8px; border-left: 1px solid #000;">@firstDynamicData?.Name </td>
<td style="text-align: center; border-left: 1px solid #000;">@firstDynamicData?.Count </td>
<td style="text-align: center;">@firstDynamicData?.Amount </td>
</tr>
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">10</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> سنوات </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.BaseYearsPay == "0" ? "-" : Model.BaseYearsPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
<td style="padding-right: 8px; border-left: 1px solid #000;">@secondDynamicData?.Name </td>
<td style="text-align: center; border-left: 1px solid #000;">@secondDynamicData?.Count </td>
<td style="text-align: center;">@secondDynamicData?.Amount </td>
</tr>
<tr style="font-size: 12px;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">11</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> مزد مرخصی </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.LeavePay == "0" ? "-" : Model.LeavePay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
<td style="padding-right: 8px; border-left: 1px solid #000;">@thirdDynamicData?.Name </td>
<td style="text-align: center; border-left: 1px solid #000;">@thirdDynamicData?.Count </td>
<td style="text-align: center;">@thirdDynamicData?.Amount </td>
</tr>
<tr style="font-size: 12px; height: 20px; background-color: #dddcdc !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; border-bottom: 1px solid #000; border-top: 1px solid #000; ">
<td style="text-align: center; padding: 2px "></td>
@@ -528,7 +532,7 @@
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;@(day.IsHoliday || day.IsFriday ? "background-color: #BBBBBB !important;" : "background-color: #efefef !important;") -webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.ExitDifferencesMinutes1</td>
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;@(day.IsHoliday || day.IsFriday ? "background-color: #BBBBBB !important;" : "background-color: #efefef !important;") -webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EnterDifferencesMinutes1</td>
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;@(day.IsHoliday || day.IsFriday ? "background-color: #BBBBBB !important;" : "background-color: #efefef !important;") -webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EnterDifferencesMinutes2</td>
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.StartDate2</td>
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate2</td>

View File

@@ -172,7 +172,11 @@
</table>
</div>
</div>
@{
var firstDynamicData = Model.CheckoutDynamicDeductions.FirstOrDefault();
var secondDynamicData = Model.CheckoutDynamicDeductions.Skip(1).FirstOrDefault();
var thirdDynamicData = Model.CheckoutDynamicDeductions.Skip(2).FirstOrDefault();
}
<div class="row" style="margin-top: 10px;padding: 0 12px;">
<fieldset style="border: 1px solid black !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden;padding: 0;">
@@ -280,27 +284,27 @@
<td style="padding-right: 8px; border-left: 1px solid #000;"> عیدی </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.BonusesPay == "0" ? "-" : Model.BonusesPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
<td style="padding-right: 8px; border-left: 1px solid #000;">@firstDynamicData?.Name </td>
<td style="text-align: center; border-left: 1px solid #000;">@firstDynamicData?.Count </td>
<td style="text-align: center;">@firstDynamicData?.Amount </td>
</tr>
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">10</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> سنوات </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.BaseYearsPay == "0" ? "-" : Model.BaseYearsPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
<td style="padding-right: 8px; border-left: 1px solid #000;">@secondDynamicData?.Name </td>
<td style="text-align: center; border-left: 1px solid #000;">@secondDynamicData?.Count </td>
<td style="text-align: center;">@secondDynamicData?.Amount </td>
</tr>
<tr style="font-size: 12px;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">11</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> مزد مرخصی </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.LeavePay == "0" ? "-" : Model.LeavePay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
<td style="padding-right: 8px; border-left: 1px solid #000;">@thirdDynamicData?.Name </td>
<td style="text-align: center; border-left: 1px solid #000;">@thirdDynamicData?.Count </td>
<td style="text-align: center;">@thirdDynamicData?.Amount </td>
</tr>
<tr style="font-size: 12px; height: 20px; background-color: #dddcdc !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; border-bottom: 1px solid #000; border-top: 1px solid #000; ">
<td style="text-align: center; padding: 2px "></td>

View File

@@ -147,7 +147,12 @@
</table>
</div>
</div>
@{
var firstDynamicData = Model.CheckoutDynamicDeductions.FirstOrDefault();
Console.WriteLine(firstDynamicData.Name);
var secondDynamicData = Model.CheckoutDynamicDeductions.Skip(1).FirstOrDefault();
var thirdDynamicData = Model.CheckoutDynamicDeductions.Skip(2).FirstOrDefault();
}
<div class="row" style="margin-top: 10px;padding: 0 12px;">
<fieldset style="border: 1px solid black !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden;padding: 0;">
<table style="/* table-layout: fixed; */ width: 100%">
@@ -254,27 +259,27 @@
<td style="padding-right: 8px; border-left: 1px solid #000;"> عیدی </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.BonusesPay == "0" ? "-" : Model.BonusesPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
<td style="padding-right: 8px; border-left: 1px solid #000;">@firstDynamicData?.Name</td>
<td style="text-align: center; border-left: 1px solid #000;">@firstDynamicData?.Count </td>
<td style="text-align: center;">@firstDynamicData?.Amount </td>
</tr>
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">10</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> سنوات </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.BaseYearsPay == "0" ? "-" : Model.BaseYearsPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
<td style="padding-right: 8px; border-left: 1px solid #000;">@secondDynamicData?.Name </td>
<td style="text-align: center; border-left: 1px solid #000;">@secondDynamicData?.Count </td>
<td style="text-align: center;">@secondDynamicData?.Amount </td>
</tr>
<tr style="font-size: 12px;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">11</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> مزد مرخصی </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.LeavePay == "0" ? "-" : Model.LeavePay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
<td style="padding-right: 8px; border-left: 1px solid #000;">@thirdDynamicData?.Name </td>
<td style="text-align: center; border-left: 1px solid #000;">@thirdDynamicData?.Count </td>
<td style="text-align: center;">@thirdDynamicData?.Amount </td>
</tr>
<tr style="font-size: 12px; height: 20px; background-color: #dddcdc !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; border-bottom: 1px solid #000; border-top: 1px solid #000; ">
<td style="text-align: center; padding: 2px "></td>
@@ -505,7 +510,7 @@
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;@(day.IsHoliday || day.IsFriday ? "background-color: #BBBBBB !important;" : "background-color: #efefef !important;") -webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.ExitDifferencesMinutes1</td>
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;@(day.IsHoliday || day.IsFriday ? "background-color: #BBBBBB !important;" : "background-color: #efefef !important;") -webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EnterDifferencesMinutes1</td>
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;@(day.IsHoliday || day.IsFriday ? "background-color: #BBBBBB !important;" : "background-color: #efefef !important;") -webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EnterDifferencesMinutes2</td>
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.StartDate2</td>
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate2</td>

View File

@@ -146,6 +146,12 @@
</table>
</div>
</div>
@{
var firstDynamicData = Model.CheckoutDynamicDeductions.FirstOrDefault();
var secondDynamicData = Model.CheckoutDynamicDeductions.Skip(1).FirstOrDefault();
var thirdDynamicData = Model.CheckoutDynamicDeductions.Skip(2).FirstOrDefault();
}
<div class="row" style="margin-top: 10px;padding: 0 12px;">
<fieldset style="border: 1px solid black !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden;padding: 0;">
@@ -253,27 +259,27 @@
<td style="padding-right: 8px; border-left: 1px solid #000;"> عیدی </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.BonusesPay == "0" ? "-" : Model.BonusesPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> @firstDynamicData?.Name </td>
<td style="text-align: center; border-left: 1px solid #000;"> @firstDynamicData?.Count </td>
<td style="text-align: center;"> @firstDynamicData?.Amount </td>
</tr>
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">10</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> سنوات </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.BaseYearsPay == "0" ? "-" : Model.BaseYearsPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> @secondDynamicData?.Name </td>
<td style="text-align: center; border-left: 1px solid #000;"> @secondDynamicData?.Count </td>
<td style="text-align: center;"> @secondDynamicData?.Amount</td>
</tr>
<tr style="font-size: 12px;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">11</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> مزد مرخصی </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.LeavePay == "0" ? "-" : Model.LeavePay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> @thirdDynamicData?.Name </td>
<td style="text-align: center; border-left: 1px solid #000;"> @thirdDynamicData?.Count </td>
<td style="text-align: center;"> @thirdDynamicData?.Amount</td>
</tr>
<tr style="font-size: 12px; height: 20px; background-color: #dddcdc !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; border-bottom: 1px solid #000; border-top: 1px solid #000; ">
<td style="text-align: center; padding: 2px "></td>
@@ -504,7 +510,7 @@
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;@(day.IsHoliday || day.IsFriday ? "background-color: #BBBBBB !important;" : "background-color: #efefef !important;") -webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.ExitDifferencesMinutes1</td>
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;@(day.IsHoliday || day.IsFriday ? "background-color: #BBBBBB !important;" : "background-color: #efefef !important;") -webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EnterDifferencesMinutes1</td>
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;@(day.IsHoliday || day.IsFriday ? "background-color: #BBBBBB !important;" : "background-color: #efefef !important;") -webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EnterDifferencesMinutes2</td>
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.StartDate2</td>
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate2</td>

View File

@@ -13,4 +13,8 @@
<PackageReference Include="PersianTools.Core" Version="2.0.4" />
</ItemGroup>
<ItemGroup>
<Folder Include="Domain\CustomizeCheckoutShared\ValueObjects\" />
</ItemGroup>
</Project>