This commit is contained in:
SamSys
2025-11-20 15:51:03 +03:30
37 changed files with 38540 additions and 4160 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

@@ -75,5 +75,5 @@ public interface IPersonalContractingPartyRepository :IRepository<long, Personal
Task<GetLegalContractingPartyDetailsViewModel> GetLegalDetails(long id);
Task<PersonalContractingParty> GetByNationalCode(string nationalCode);
Task<PersonalContractingParty> GetByRegisterId(string registerId);
Task<PersonalContractingParty> GetByNationalId(string registerId);
}

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);
}

File diff suppressed because it is too large Load Diff

View File

@@ -209,6 +209,11 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
if (apiRespons.ResponseContext.Status.Code == 14)
throw new InternalServerException("سیستم احراز هویت در دسترس نمی باشد");
if (apiRespons.ResponseContext.Status.Code == 2)
{
throw new InternalServerException("سیستم احراز هویت در دسترس نمی باشد");
}
if (apiRespons.ResponseContext.Status.Code != 0)
return op.Failed($"{apiRespons.ResponseContext.Status.Message}");

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

@@ -11,7 +11,7 @@ public class InstitutinContractContactInfoMapping : IEntityTypeConfiguration<Ins
builder.ToTable("InstitutinContractContactInfo");
builder.HasKey(x => x.id);
builder.Property(x => x.FnameLname).HasMaxLength(50);
builder.Property(x => x.FnameLname).HasMaxLength(150);
builder.Property(x => x.PhoneNumber).HasMaxLength(20);
builder.Property(x => x.PhoneType).HasMaxLength(20);
builder.Property(x => x.Position).HasMaxLength(50);

View File

@@ -14,8 +14,8 @@ public class PersonalContractingpartyMapping : IEntityTypeConfiguration<Personal
builder.HasKey(x => x.id);
//builder.Property(x => x.LegalName).HasMaxLength(255).IsRequired();
builder.Property(x => x.FName).HasMaxLength(50).IsRequired();
builder.Property(x => x.LName).HasMaxLength(50).IsRequired();
builder.Property(x => x.FName).HasMaxLength(150).IsRequired();
builder.Property(x => x.LName).HasMaxLength(150).IsRequired();
builder.Property(x => x.SureName).HasMaxLength(50).IsRequired(false);
builder.Property(x => x.Nationalcode).HasMaxLength(10).IsRequired();
builder.Property(x => x.IdNumber).HasMaxLength(20).IsRequired(false);

View File

@@ -0,0 +1,58 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CompanyManagment.EFCore.Migrations
{
/// <inheritdoc />
public partial class changemaxlengthofcontractingparty : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "LName",
table: "PersonalContractingParties",
type: "nvarchar(150)",
maxLength: 150,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50);
migrationBuilder.AlterColumn<string>(
name: "FName",
table: "PersonalContractingParties",
type: "nvarchar(150)",
maxLength: 150,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "LName",
table: "PersonalContractingParties",
type: "nvarchar(50)",
maxLength: 50,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(150)",
oldMaxLength: 150);
migrationBuilder.AlterColumn<string>(
name: "FName",
table: "PersonalContractingParties",
type: "nvarchar(50)",
maxLength: 50,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(150)",
oldMaxLength: 150);
}
}
}

View File

@@ -0,0 +1,40 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CompanyManagment.EFCore.Migrations
{
/// <inheritdoc />
public partial class changemaxlengthofcontactinfoofinstitutioncontract : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "FnameLname",
table: "InstitutinContractContactInfo",
type: "nvarchar(150)",
maxLength: 150,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "FnameLname",
table: "InstitutinContractContactInfo",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(150)",
oldMaxLength: 150,
oldNullable: true);
}
}
}

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

@@ -793,8 +793,8 @@ namespace CompanyManagment.EFCore.Migrations
b.Property<string>("FName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<string>("FatherName")
.HasMaxLength(20)
@@ -835,8 +835,8 @@ namespace CompanyManagment.EFCore.Migrations
b.Property<string>("LName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<string>("LegalPosition")
.HasMaxLength(50)
@@ -3611,8 +3611,8 @@ namespace CompanyManagment.EFCore.Migrations
.HasColumnType("datetime2");
b.Property<string>("FnameLname")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<long>("InstitutionContractId")
.HasColumnType("bigint");
@@ -7531,6 +7531,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")
@@ -7792,6 +7822,8 @@ namespace CompanyManagment.EFCore.Migrations
.HasForeignKey("CustomizeCheckoutid");
});
b.Navigation("CheckoutDynamicDeductions");
b.Navigation("CheckoutFines");
b.Navigation("CustomizeCheckoutLoanInstallments");
@@ -7825,6 +7857,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")
@@ -8086,6 +8148,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

@@ -768,9 +768,9 @@ public class PersonalContractingPartyRepository : RepositoryBase<long, PersonalC
return await _context.PersonalContractingParties.FirstOrDefaultAsync(x => x.Nationalcode == nationalCode);
}
public async Task<PersonalContractingParty> GetByRegisterId(string registerId)
public async Task<PersonalContractingParty> GetByNationalId(string nationalId)
{
return await _context.PersonalContractingParties.FirstOrDefaultAsync(x => x.RegisterId == registerId);
return await _context.PersonalContractingParties.FirstOrDefaultAsync(x => x.NationalId == nationalId);
}
#endregion

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
@@ -1736,17 +1742,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
@@ -1801,9 +1813,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 &&

File diff suppressed because it is too large Load Diff

View File

@@ -28,7 +28,8 @@ public class UidService : IUidService
{
_httpClient = new HttpClient()
{
BaseAddress = new Uri(BaseUrl)
BaseAddress = new Uri(BaseUrl),
Timeout = new TimeSpan(0, 0, 12)
};
_authorizedPersonApplication = authorizedPersonApplication;
_authorizedBankDetailsApplication = authorizedBankDetailsApplication;
@@ -63,6 +64,7 @@ public class UidService : IUidService
try
{
var requestResult = await _httpClient.PostAsync("inquiry/person/v2", contentType);
if (!requestResult.IsSuccessStatusCode)
return null;
var responseResult = await requestResult.Content.ReadFromJsonAsync<PersonalInfoResponse>();
@@ -79,7 +81,7 @@ public class UidService : IUidService
return responseResult;
}
catch
{
{
return new PersonalInfoResponse(new UidBasicInformation(),
new IdentificationInformation(default, default, default, default, default), new RegistrationStatus(),
new ResponseContext(new UidStatus(14, "")));

View File

@@ -130,7 +130,43 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.AndroidApk
}
}
private async System.Threading.Tasks.Task CreateDadmehrWorkshopFaceEmbedding()
public IActionResult OnPostShiftDateNew()
{
var startRollCall = new DateTime(2025, 4, 21);
//var employees = _context.CustomizeWorkshopEmployeeSettings
// .Where(x => x.WorkshopShiftStatus == WorkshopShiftStatus.Rotating).Select(x => x.EmployeeId).ToList();
var rollCalls = _context.RollCalls.Where(x => x.ShiftDate >= startRollCall && x.EndDate != null).ToList();
var r1 = rollCalls.ToList();
Console.ForegroundColor = ConsoleColor.DarkRed;
Console.WriteLine("endStep 1 ============");
SetBreakTime(r1);
ViewData["message"] = "تومام یک";
return Page();
}
public async Task<IActionResult> OnPostShiftDateNew2()
{
//var startRollCall = new DateTime(2025, 3, 21);
//var rollCalls = _context.RollCalls.Where(x => x.StartDate >= startRollCall && x.EndDate != null ).ToList();
//var r1 = rollCalls.Skip(10000).Take(10000).ToList();
//Console.ForegroundColor = ConsoleColor.DarkRed;
//Console.WriteLine("endStep 1 ============");
//SetRollCall(r1);
//await ChangeFridayWorkToWeeklyDayOfWeek();
//await SetPublicId();
await CreateDadmehrWorkshopFaceEmbedding();
ViewData["message"] = "تومام دو";
return Page();
}
private async System.Threading.Tasks.Task CreateDadmehrWorkshopFaceEmbedding()
{
var basePath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "faces");
@@ -211,42 +247,7 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.AndroidApk
}
}
}
public IActionResult OnPostShiftDateNew()
{
var startRollCall = new DateTime(2025, 4, 21);
//var employees = _context.CustomizeWorkshopEmployeeSettings
// .Where(x => x.WorkshopShiftStatus == WorkshopShiftStatus.Rotating).Select(x => x.EmployeeId).ToList();
var rollCalls = _context.RollCalls.Where(x => x.ShiftDate >= startRollCall && x.EndDate != null).ToList();
var r1 = rollCalls.ToList();
Console.ForegroundColor = ConsoleColor.DarkRed;
Console.WriteLine("endStep 1 ============");
SetBreakTime(r1);
ViewData["message"] = "تومام یک";
return Page();
}
public async Task<IActionResult> OnPostShiftDateNew2()
{
//var startRollCall = new DateTime(2025, 3, 21);
//var rollCalls = _context.RollCalls.Where(x => x.StartDate >= startRollCall && x.EndDate != null ).ToList();
//var r1 = rollCalls.Skip(10000).Take(10000).ToList();
//Console.ForegroundColor = ConsoleColor.DarkRed;
//Console.WriteLine("endStep 1 ============");
//SetRollCall(r1);
//await ChangeFridayWorkToWeeklyDayOfWeek();
//await SetPublicId();
await UpdateInstitutionContract();
ViewData["message"] = "تومام دو";
return Page();
}
public async Task<IActionResult> OnPostPaymentGateWay(CancellationToken cancellationToken)
{
var command = new CreatePaymentGatewayRequest()

File diff suppressed because one or more lines are too long

View File

@@ -1,116 +0,0 @@
using _0_Framework.Application;
using AccountManagement.Application.Contracts.Account;
using CompanyManagment.App.Contracts.AdminMonthlyOverview;
using CompanyManagment.App.Contracts.CustomizeCheckout;
using CompanyManagment.App.Contracts.YearlySalary;
using CompanyManagment.Application;
using CompanyManagment.App.Contracts.Employer;
using CompanyManagment.App.Contracts.Workshop;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using ServiceHost.Areas.Client.Pages.Company.CustomizeCheckout;
using System.Globalization;
namespace ServiceHost.Areas.AdminNew.Pages.Company.MonthlyOverview
{
public class IndexModel : PageModel
{
private readonly IAdminMonthlyOverviewApplication _adminMonthlyOverviewApplication;
private readonly IAuthHelper _authHelper;
private readonly IYearlySalaryApplication _yearlySalaryApplication;
public List<string> YearlyList;
public AdminMonthlyOverviewSearchModel SearchModel;
private readonly IWorkshopApplication _workshopApplication;
private readonly IEmployerApplication _employerApplication;
private readonly IAccountApplication _accountApplication;
public IndexModel(IAdminMonthlyOverviewApplication adminMonthlyOverviewApplication, IAuthHelper authHelper,
IWorkshopApplication workshopApplication, IEmployerApplication employerApplication,
IAccountApplication accountApplication, IYearlySalaryApplication yearlySalaryApplication)
{
_adminMonthlyOverviewApplication = adminMonthlyOverviewApplication;
_yearlySalaryApplication = yearlySalaryApplication;
_authHelper = authHelper;
_workshopApplication = workshopApplication;
_employerApplication = employerApplication;
_accountApplication = accountApplication;
}
public IActionResult OnGet()
{
var accountId = _authHelper.CurrentAccountId();
YearlyList = _yearlySalaryApplication.GetYears();
PersianCalendar pc = new PersianCalendar();
DateTime now = DateTime.Now;
int year = pc.GetYear(now);
int month = pc.GetMonth(now);
SearchModel = new AdminMonthlyOverviewSearchModel()
{
Year = year,
Month = month,
AdminAccountId = accountId
};
return Page();
}
public async Task<IActionResult> OnGetWorkshops(AdminMonthlyOverviewSearchModel searchModel)
{
var workshopListByStatus = await _adminMonthlyOverviewApplication.GetWorkshopListByStatus(searchModel);
return new JsonResult(new
{
data = workshopListByStatus
});
}
public async Task<IActionResult> OnPostNext(long id)
{
var result = await _adminMonthlyOverviewApplication.Next(id);
return new JsonResult(result);
}
public async Task<IActionResult> OnPostBack(long id)
{
var result = await _adminMonthlyOverviewApplication.Back(id);
return new JsonResult(result);
}
public async Task<IActionResult> OnGetCounter(int year , int month , long accountId)
{
var counter = await _adminMonthlyOverviewApplication.GetCounter(year, month, accountId);
return new JsonResult(counter);
}
public async Task<IActionResult> OnGetEmployerSelectList(string search, long id)
{
var res = await _employerApplication.GetSelectList(search, id);
return new JsonResult(new
{
data = res
});
}
public async Task<IActionResult> OnGetWorkshopSelectList(string search, long id)
{
var res = await _workshopApplication.GetSelectList(search, id);
return new JsonResult(new
{
data = res
});
}
public async Task<IActionResult> OnGetAccountSelectList()
{
var res = await _accountApplication.GetAdminSelectList();
//res = res.Where(x => x.RoleId == 5).ToList();
return new JsonResult(new
{
data = res
});
}
}
}

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>