Compare commits
15 Commits
Fix/Custom
...
Feature/Cu
| Author | SHA1 | Date | |
|---|---|---|---|
| 0303f04ae3 | |||
| 3e56d31ff2 | |||
| d5d0634807 | |||
|
|
e2d06d8f7e | ||
|
|
44a0a2df86 | ||
|
|
ee5e608581 | ||
|
|
6583706db6 | ||
| bf5f416470 | |||
| 6526aefbbf | |||
|
|
1fec40982c | ||
|
|
868abae2e8 | ||
|
|
c627ba6d3d | ||
|
|
dadf541dd1 | ||
| 4b0c700b3e | |||
| 677adbeddb |
@@ -5,6 +5,7 @@ using Company.Domain.EmployeeAgg;
|
||||
using Company.Domain.WorkshopAgg;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
|
||||
|
||||
@@ -18,19 +19,20 @@ public class CustomizeCheckout : EntityBase
|
||||
{
|
||||
}
|
||||
public CustomizeCheckout(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,
|
||||
double nightWorkPay,
|
||||
double marriedAllowance, double shiftPay, double familyAllowance, double leavePay, double insuranceDeduction,
|
||||
double fineAbsenceDeduction,
|
||||
double lateToWorkDeduction, double earlyExitDeduction, double rewardPay, double salaryAidDeduction,
|
||||
double installmentDeduction,
|
||||
double fineDeduction, double taxDeduction, string sumOfWorkingDays, string totalClaims, string totalDeductions,
|
||||
double totalPayment, string contractNo, ICollection<CustomizeCheckoutFine> checkoutFines,
|
||||
ICollection<CustomizeCheckoutLoanInstallments> customizeCheckoutLoanInstallments,
|
||||
ICollection<CustomizeCheckoutSalaryAid> customizeCheckoutSalaryAids,
|
||||
ICollection<CustomizeCheckoutReward> customizeCheckoutRewards, TimeSpan lateToWorkValue)
|
||||
string employeeLName, DateTime employeeDateOfBirth,
|
||||
string employeeNationalCode, string workshopFullName, long workshopId, long? contractId,
|
||||
double monthlySalary, double fridayPay, double overTimePay, double baseYearsPay, double bonusesPay,
|
||||
double nightWorkPay,
|
||||
double marriedAllowance, double shiftPay, double familyAllowance, double leavePay, double insuranceDeduction,
|
||||
double fineAbsenceDeduction,
|
||||
double lateToWorkDeduction, double earlyExitDeduction, double rewardPay, double salaryAidDeduction,
|
||||
double installmentDeduction,
|
||||
double fineDeduction, double taxDeduction, string sumOfWorkingDays, string totalClaims, string totalDeductions,
|
||||
double totalPayment, string contractNo, ICollection<CustomizeCheckoutFine> checkoutFines,
|
||||
ICollection<CustomizeCheckoutLoanInstallments> customizeCheckoutLoanInstallments,
|
||||
ICollection<CustomizeCheckoutSalaryAid> customizeCheckoutSalaryAids,
|
||||
ICollection<CustomizeCheckoutReward> customizeCheckoutRewards, TimeSpan lateToWorkValue, double settingSalary,
|
||||
double dailyWage, WorkshopShiftStatus shiftStatus)
|
||||
{
|
||||
YearInt = Convert.ToInt32(contractStart.ToFarsi().Substring(0, 4));
|
||||
MonthInt = Convert.ToInt32(contractStart.ToFarsi().Substring(5, 2));
|
||||
@@ -74,6 +76,9 @@ public class CustomizeCheckout : EntityBase
|
||||
WorkshopFullName = workshopFullName;
|
||||
|
||||
LateToWorkValue = lateToWorkValue;
|
||||
SettingSalary = settingSalary;
|
||||
DailyWage = dailyWage;
|
||||
ShiftStatus = shiftStatus;
|
||||
}
|
||||
|
||||
|
||||
@@ -249,6 +254,18 @@ public class CustomizeCheckout : EntityBase
|
||||
/// </summary>
|
||||
public double TotalPayment { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// مزد روزانه
|
||||
/// </summary>
|
||||
public double DailyWage { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// حقوق تعیین شده
|
||||
/// </summary>
|
||||
public double SettingSalary { get; private set; }
|
||||
|
||||
public WorkshopShiftStatus ShiftStatus { get; set; }
|
||||
|
||||
|
||||
#region Values
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using Company.Domain.WorkshopAgg;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Company.Domain.CustomizeCheckoutTempAgg.ValueObjects;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||
|
||||
|
||||
namespace Company.Domain.CustomizeCheckoutTempAgg;
|
||||
@@ -18,15 +19,22 @@ public class CustomizeCheckoutTemp : EntityBase
|
||||
{
|
||||
LateToWorkValue = lateToWorkValue;
|
||||
}
|
||||
public CustomizeCheckoutTemp(DateTime contractStart, DateTime contractEnd, long employeeId, string employeeFName, string employeeLName, DateTime employeeDateOfBirth,
|
||||
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, double nightWorkPay,
|
||||
double marriedAllowance, double shiftPay, double familyAllowance, double leavePay, double insuranceDeduction, double fineAbsenceDeduction,
|
||||
double lateToWorkDeduction, double earlyExitDeduction, double rewardPay, double salaryAidDeduction, double installmentDeduction,
|
||||
double fineDeduction, double taxDeduction, string sumOfWorkingDays, string totalClaims, string totalDeductions, double totalPayment, string contractNo,
|
||||
ICollection<CustomizeCheckoutTempFine> checkoutFines, ICollection<CustomizeCheckoutTempLoanInstallments> customizeCheckoutLoanInstallments,
|
||||
ICollection<CustomizeCheckoutTempSalaryAid> customizeCheckoutSalaryAids, ICollection<CustomizeCheckoutTempReward> customizeCheckoutRewards,
|
||||
TimeSpan lateToWorkValue)
|
||||
double monthlySalary, double fridayPay, double overTimePay, double baseYearsPay, double bonusesPay,
|
||||
double nightWorkPay,
|
||||
double marriedAllowance, double shiftPay, double familyAllowance, double leavePay, double insuranceDeduction,
|
||||
double fineAbsenceDeduction,
|
||||
double lateToWorkDeduction, double earlyExitDeduction, double rewardPay, double salaryAidDeduction,
|
||||
double installmentDeduction,
|
||||
double fineDeduction, double taxDeduction, string sumOfWorkingDays, string totalClaims, string totalDeductions,
|
||||
double totalPayment, string contractNo,
|
||||
ICollection<CustomizeCheckoutTempFine> checkoutFines,
|
||||
ICollection<CustomizeCheckoutTempLoanInstallments> customizeCheckoutLoanInstallments,
|
||||
ICollection<CustomizeCheckoutTempSalaryAid> customizeCheckoutSalaryAids,
|
||||
ICollection<CustomizeCheckoutTempReward> customizeCheckoutRewards,
|
||||
TimeSpan lateToWorkValue, double settingSalary, double dailyWage, WorkshopShiftStatus shiftStatus)
|
||||
{
|
||||
YearInt = Convert.ToInt32(contractStart.ToFarsi().Substring(0, 4));
|
||||
MonthInt = Convert.ToInt32(contractStart.ToFarsi().Substring(5, 2));
|
||||
@@ -70,6 +78,9 @@ public class CustomizeCheckoutTemp : EntityBase
|
||||
WorkshopFullName = workshopFullName;
|
||||
|
||||
LateToWorkValue = lateToWorkValue;
|
||||
SettingSalary = settingSalary;
|
||||
DailyWage = dailyWage;
|
||||
ShiftStatus = shiftStatus;
|
||||
}
|
||||
|
||||
#region Getters
|
||||
@@ -254,10 +265,22 @@ public class CustomizeCheckoutTemp : EntityBase
|
||||
/// </summary>
|
||||
public double TotalPayment { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// مزد روزانه
|
||||
/// </summary>
|
||||
public double DailyWage { get; private set; }
|
||||
|
||||
#region Values
|
||||
/// <summary>
|
||||
/// حقوق تعیین شده
|
||||
/// </summary>
|
||||
public double SettingSalary { get; private set; }
|
||||
public WorkshopShiftStatus ShiftStatus { get; set; }
|
||||
|
||||
public TimeSpan LateToWorkValue { get; private set; }
|
||||
|
||||
|
||||
#region Values
|
||||
|
||||
public TimeSpan LateToWorkValue { get; private set; }
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||
using CompanyManagment.App.Contracts.File1;
|
||||
using CompanyManagment.App.Contracts.Fine;
|
||||
using CompanyManagment.App.Contracts.Loan;
|
||||
@@ -187,5 +188,11 @@ public class CustomizeCheckoutMandatoryViewModel
|
||||
public List<RewardViewModel> RewardViewModels { get; set; } = [];
|
||||
public List<LoanInstallmentViewModel> InstallmentViewModels { get; set; } = [];
|
||||
public List<SalaryAidViewModel> SalaryAidViewModels { get; set; } = [];
|
||||
|
||||
|
||||
public double SettingSalary { get; set; }
|
||||
public double DailyWage { get; set; }
|
||||
|
||||
public WorkshopShiftStatus ShiftStatus { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using CompanyManagment.App.Contracts.RollCall;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||
using CompanyManagment.App.Contracts.Fine;
|
||||
using CompanyManagment.App.Contracts.Loan;
|
||||
using CompanyManagment.App.Contracts.Reward;
|
||||
@@ -96,14 +97,21 @@ namespace CompanyManagment.App.Contracts.CustomizeCheckout
|
||||
|
||||
public string LateToWorkValue { 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; }
|
||||
|
||||
}
|
||||
public string SettingSalary { get; set; }
|
||||
public string DailyWage { get; set; }
|
||||
public WorkshopShiftStatus ShiftStatus { get; set; }
|
||||
|
||||
public string EmployeePicture { 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; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,10 +110,10 @@ namespace CompanyManagment.Application
|
||||
result.FamilyAllowance, result.LeavePay, result.InsuranceDeduction, result.FineAbsenceDeduction,
|
||||
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);
|
||||
fines,loanInstallments,salaryAids,rewards, result.LateToWorkValue, result.SettingSalary, result.DailyWage, result.ShiftStatus);
|
||||
|
||||
|
||||
_customizeCheckoutRepository.Create(entity);
|
||||
_customizeCheckoutRepository.Create(entity);
|
||||
_customizeCheckoutRepository.RemoveEmployeeCustomizeCheckoutInDates(command.WorkshopId, employee.id, command.ContractStart, command.ContractEnd);
|
||||
_customizeCheckoutRepository.SaveChanges();
|
||||
return op.Succcedded();
|
||||
@@ -162,9 +162,9 @@ namespace CompanyManagment.Application
|
||||
computations.FamilyAllowance, computations.LeavePay, computations.InsuranceDeduction, computations.FineAbsenceDeduction,
|
||||
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);
|
||||
fines,loanInstallments,salaryAids,rewards, computations.LateToWorkValue, computations.SettingSalary, computations.DailyWage, computations.ShiftStatus);
|
||||
|
||||
_customizeCheckoutRepository.Create(entity);
|
||||
_customizeCheckoutRepository.Create(entity);
|
||||
_customizeCheckoutRepository.RemoveEmployeeCustomizeCheckoutInDates(command.WorkshopId, employeeId, command.ContractStart, command.ContractEnd);
|
||||
}
|
||||
_customizeCheckoutRepository.SaveChanges();
|
||||
|
||||
@@ -91,10 +91,10 @@ namespace CompanyManagment.Application
|
||||
result.FamilyAllowance, result.LeavePay, result.InsuranceDeduction, result.FineAbsenceDeduction,
|
||||
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);
|
||||
fines, loanInstallments, salaryAids, rewards,result.LateToWorkValue, result.SettingSalary, result.DailyWage, result.ShiftStatus);
|
||||
|
||||
|
||||
_customizeCheckoutTempRepository.Create(entity);
|
||||
_customizeCheckoutTempRepository.Create(entity);
|
||||
_customizeCheckoutTempRepository.RemoveEmployeeTemporaryCheckoutInDates(command.WorkshopId, employee.id, command.ContractStart, command.ContractEnd);
|
||||
_customizeCheckoutTempRepository.SaveChanges();
|
||||
return op.Succcedded();
|
||||
@@ -144,8 +144,8 @@ namespace CompanyManagment.Application
|
||||
computations.FamilyAllowance, computations.LeavePay, computations.InsuranceDeduction, computations.FineAbsenceDeduction,
|
||||
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);
|
||||
_customizeCheckoutTempRepository.Create(entity);
|
||||
fines, loanInstallments, salaryAids, rewards,computations.LateToWorkValue, computations.SettingSalary, computations.DailyWage, computations.ShiftStatus);
|
||||
_customizeCheckoutTempRepository.Create(entity);
|
||||
_customizeCheckoutTempRepository.RemoveEmployeeTemporaryCheckoutInDates(command.WorkshopId, employeeId, command.ContractStart, command.ContractEnd);
|
||||
}
|
||||
|
||||
|
||||
@@ -91,13 +91,13 @@ namespace CompanyManagment.Application
|
||||
public bool HasRollCallRecord(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd)
|
||||
{
|
||||
//موقت
|
||||
// دادمهرگستر 11
|
||||
//585 کاشی گالری سرامیس (بابک ابراهیمی )
|
||||
//آموزشگاه ملل 604
|
||||
//کاریابی ملل 605
|
||||
// دادمهرگستر 11 *
|
||||
//585 کاشی گالری سرامیس (بابک ابراهیمی ) *
|
||||
//آموزشگاه ملل 604 *
|
||||
//کاریابی ملل 605 *
|
||||
//368 پیتزا امیر آماده سازی
|
||||
//367 پیتزا امیر رستوران
|
||||
//286 مرکز توان بخشی رسالت
|
||||
//286 مرکز توان بخشی رسالت *
|
||||
bool skipRollCallByWorkshopId = workshopId is 11 or 585 or 604 or 605 or 368 or 367 or 286;
|
||||
|
||||
//#if DEBUG
|
||||
|
||||
@@ -97,9 +97,12 @@ public class CustomizeCheckoutMapping : IEntityTypeConfiguration<CustomizeChecko
|
||||
rewards.Property(x=>x.Description).HasColumnType("ntext");
|
||||
});
|
||||
|
||||
#region Relastions
|
||||
builder.Property(x => x.ShiftStatus).HasConversion<string>().HasMaxLength(10);
|
||||
|
||||
builder.HasOne(x => x.Workshop)
|
||||
|
||||
#region Relastions
|
||||
|
||||
builder.HasOne(x => x.Workshop)
|
||||
.WithMany(x => x.CustomizeCheckouts)
|
||||
.HasForeignKey(x => x.WorkshopId);
|
||||
|
||||
|
||||
@@ -97,16 +97,19 @@ public class CustomizeCheckoutTempMapping : IEntityTypeConfiguration<CustomizeCh
|
||||
rewards.Property(x => x.Description).HasColumnType("ntext");
|
||||
});
|
||||
|
||||
#region Relastions
|
||||
builder.Property(x => x.ShiftStatus).HasConversion<string>().HasMaxLength(10);
|
||||
|
||||
//builder.HasOne(x => x.Workshop)
|
||||
// .WithMany(x => x.CustomizeCheckouts)
|
||||
// .HasForeignKey(x => x.WorkshopId);
|
||||
|
||||
//builder.HasOne(x => x.Employee)
|
||||
// .WithMany(x => x.CustomizeCheckouts)
|
||||
// .HasForeignKey(x => x.EmployeeId);
|
||||
#region Relastions
|
||||
|
||||
#endregion
|
||||
}
|
||||
//builder.HasOne(x => x.Workshop)
|
||||
// .WithMany(x => x.CustomizeCheckouts)
|
||||
// .HasForeignKey(x => x.WorkshopId);
|
||||
|
||||
//builder.HasOne(x => x.Employee)
|
||||
// .WithMany(x => x.CustomizeCheckouts)
|
||||
// .HasForeignKey(x => x.EmployeeId);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
9001
CompanyManagment.EFCore/Migrations/20250329210702_add customize checkout header parameters.Designer.cs
generated
Normal file
9001
CompanyManagment.EFCore/Migrations/20250329210702_add customize checkout header parameters.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,86 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class addcustomizecheckoutheaderparameters : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "DailyWage",
|
||||
table: "CustomizeCheckoutTemps",
|
||||
type: "float",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "SettingSalary",
|
||||
table: "CustomizeCheckoutTemps",
|
||||
type: "float",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ShiftStatus",
|
||||
table: "CustomizeCheckoutTemps",
|
||||
type: "nvarchar(10)",
|
||||
maxLength: 10,
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "DailyWage",
|
||||
table: "CustomizeCheckouts",
|
||||
type: "float",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "SettingSalary",
|
||||
table: "CustomizeCheckouts",
|
||||
type: "float",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ShiftStatus",
|
||||
table: "CustomizeCheckouts",
|
||||
type: "nvarchar(10)",
|
||||
maxLength: 10,
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DailyWage",
|
||||
table: "CustomizeCheckoutTemps");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SettingSalary",
|
||||
table: "CustomizeCheckoutTemps");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ShiftStatus",
|
||||
table: "CustomizeCheckoutTemps");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DailyWage",
|
||||
table: "CustomizeCheckouts");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SettingSalary",
|
||||
table: "CustomizeCheckouts");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ShiftStatus",
|
||||
table: "CustomizeCheckouts");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -915,6 +915,9 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("DailyWage")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<DateTime>("DateOfBirth")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
@@ -986,9 +989,17 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Property<double>("SalaryAidDeduction")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<double>("SettingSalary")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<double>("ShiftPay")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<string>("ShiftStatus")
|
||||
.IsRequired()
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<string>("SumOfWorkingDays")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
@@ -1053,6 +1064,9 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("DailyWage")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<DateTime>("DateOfBirth")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
@@ -1124,9 +1138,17 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Property<double>("SalaryAidDeduction")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<double>("SettingSalary")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<double>("ShiftPay")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<string>("ShiftStatus")
|
||||
.IsRequired()
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<string>("SumOfWorkingDays")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
|
||||
@@ -15,12 +15,19 @@ using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using AccountMangement.Infrastructure.EFCore;
|
||||
using Company.Domain.CustomizeCheckoutAgg.ValueObjects;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
using CompanyManagment.App.Contracts.Fine;
|
||||
using CompanyManagment.App.Contracts.Loan;
|
||||
using CompanyManagment.App.Contracts.Reward;
|
||||
using CompanyManagment.App.Contracts.SalaryAid;
|
||||
using AccountMangement.Infrastructure.EFCore;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using System.IO;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository
|
||||
{
|
||||
@@ -28,10 +35,14 @@ namespace CompanyManagment.EFCore.Repository
|
||||
{
|
||||
private readonly CompanyContext _companyContext;
|
||||
private readonly IRollCallRepository _rollCallRepository;
|
||||
public CustomizeCheckoutRepository(CompanyContext context, IRollCallRepository rollCallRepository) : base(context)
|
||||
private readonly AccountContext _accountContext;
|
||||
private readonly IWebHostEnvironment _webHostEnvironment;
|
||||
public CustomizeCheckoutRepository(CompanyContext context, IRollCallRepository rollCallRepository, AccountContext accountContext, IWebHostEnvironment webHostEnvironment) : base(context)
|
||||
{
|
||||
_companyContext = context;
|
||||
_rollCallRepository = rollCallRepository;
|
||||
_accountContext = accountContext;
|
||||
_webHostEnvironment = webHostEnvironment;
|
||||
}
|
||||
#region Pooya
|
||||
public List<CustomizeCheckoutViewModel> GetByWorkshopIdInDates(long workshopId, DateTime startOfMonth, DateTime endOfMonth)
|
||||
@@ -66,184 +77,235 @@ namespace CompanyManagment.EFCore.Repository
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
public List<CustomizeCheckoutViewModel> PrintAll(long workshopId, IEnumerable<long> customizeCheckoutIds)
|
||||
{
|
||||
public List<CustomizeCheckoutViewModel> PrintAll(long workshopId, IEnumerable<long> customizeCheckoutIds)
|
||||
{
|
||||
|
||||
//var pc = new PersianCalendar();
|
||||
//var year = pc.GetYear(monthStart);
|
||||
//var month = pc.GetMonth(monthStart);
|
||||
//var pc = new PersianCalendar();
|
||||
//var year = pc.GetYear(monthStart);
|
||||
//var month = pc.GetMonth(monthStart);
|
||||
|
||||
IQueryable<CustomizeCheckout> customizeCheckoutsQuery = _companyContext.CustomizeCheckouts
|
||||
.Where(x => customizeCheckoutIds.Contains(x.id)).Include(x=>x.CheckoutFines);
|
||||
IQueryable<CustomizeCheckout> customizeCheckoutsQuery = _companyContext.CustomizeCheckouts
|
||||
.Where(x => customizeCheckoutIds.Contains(x.id)).Include(x => x.CheckoutFines);
|
||||
|
||||
IQueryable<Workshop> workshopsQuery = _companyContext.Workshops.Where(x => customizeCheckoutsQuery.Any(y => y.WorkshopId == x.id));
|
||||
IQueryable<Workshop> workshopsQuery = _companyContext.Workshops.Where(x => customizeCheckoutsQuery.Any(y => y.WorkshopId == x.id));
|
||||
|
||||
IQueryable<long> workshopEmployersIdsQuery = _companyContext.WorkshopEmployers.Where(x => x.WorkshopId == workshopId).Select(x => x.EmployerId);
|
||||
IQueryable<Employer> employersQuery = _companyContext.Employers.Where(x => workshopEmployersIdsQuery.Contains(x.id));
|
||||
IQueryable<long> workshopEmployersIdsQuery = _companyContext.WorkshopEmployers.Where(x => x.WorkshopId == workshopId).Select(x => x.EmployerId);
|
||||
IQueryable<Employer> employersQuery = _companyContext.Employers.Where(x => workshopEmployersIdsQuery.Contains(x.id));
|
||||
|
||||
IQueryable<PersonnelCodeDomain> personnelCodesQuery = _companyContext.PersonnelCodeSet
|
||||
.Where(x => customizeCheckoutsQuery.Any(y => y.WorkshopId == x.WorkshopId && y.EmployeeId == x.EmployeeId));
|
||||
IQueryable<PersonnelCodeDomain> personnelCodesQuery = _companyContext.PersonnelCodeSet
|
||||
.Where(x => customizeCheckoutsQuery.Any(y => y.WorkshopId == x.WorkshopId && y.EmployeeId == x.EmployeeId));
|
||||
|
||||
//IQueryable<LeftWork> leftWorksQuery = _companyContext.LeftWorkList
|
||||
// .Where(x => customizeCheckoutsQuery.Any(y => y.WorkshopId == x.WorkshopId && y.EmployeeId == x.EmployeeId) &&
|
||||
// x.LeftWorkDate.AddDays(-1) >= monthStart && x.StartWorkDate <= monthEnd);
|
||||
//IQueryable<LeftWork> leftWorksQuery = _companyContext.LeftWorkList
|
||||
// .Where(x => customizeCheckoutsQuery.Any(y => y.WorkshopId == x.WorkshopId && y.EmployeeId == x.EmployeeId) &&
|
||||
// x.LeftWorkDate.AddDays(-1) >= monthStart && x.StartWorkDate <= monthEnd);
|
||||
|
||||
//IQueryable<Employee> employeesQuery = _companyContext.Employees.Where(x => customizeCheckoutsQuery.Any(y => y.EmployeeId == x.id));
|
||||
//IQueryable<Employee> employeesQuery = _companyContext.Employees.Where(x => customizeCheckoutsQuery.Any(y => y.EmployeeId == x.id));
|
||||
|
||||
var loans = _companyContext.Loans.AsSplitQuery().Where(x => x.WorkshopId == workshopId).ToList();
|
||||
var loans = _companyContext.Loans.AsSplitQuery().Where(x => x.WorkshopId == workshopId).ToList();
|
||||
|
||||
List<CustomizeCheckoutViewModel> customizeCheckoutsList = customizeCheckoutsQuery.Select(x => new CustomizeCheckoutViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
WorkshopId = x.WorkshopId,
|
||||
ContractId = x.ContractId == null ? 0 : x.ContractId.Value,
|
||||
EmployeeId = x.EmployeeId,
|
||||
Month = x.Month,
|
||||
Year = x.Year,
|
||||
ContractNo = x.ContractNo,
|
||||
MonthlySalary = x.MonthlySalary.ToMoney(),
|
||||
BaseYearsPay = x.BaseYearsPay.ToMoney(),
|
||||
OvertimePay = x.OverTimePay.ToMoney(),
|
||||
NightworkPay = x.NightWorkPay.ToMoney(),
|
||||
FridayPay = x.FridayPay.ToMoney(),
|
||||
ShiftPay = x.ShiftPay.ToMoney(),
|
||||
FamilyAllowance = x.FamilyAllowance.ToMoney(),
|
||||
BonusesPay = x.BonusesPay.ToMoney(),
|
||||
LeavePay = x.LeavePay.ToMoney(),
|
||||
InsuranceDeduction = x.InsuranceDeduction.ToMoney(),
|
||||
TaxDeducation = x.TaxDeduction.ToMoney(),
|
||||
InstallmentDeduction = x.InstallmentDeduction.ToMoney(),
|
||||
SalaryAidDeduction = x.SalaryAidDeduction.ToMoney(),
|
||||
AbsenceDeduction = x.FineAbsenceDeduction.ToMoney(),
|
||||
TotalClaims = x.TotalClaims,
|
||||
TotalDeductions = x.TotalDeductions,
|
||||
TotalPayment = x.TotalPayment.ToMoney(),
|
||||
RewardPay = x.RewardPay.ToMoney(),
|
||||
ContractStartGr = x.ContractStart,
|
||||
ContractEndGr = x.ContractEnd,
|
||||
MarriedAllowance = x.MarriedAllowance.ToMoney(),
|
||||
ContractEndFa = x.ContractEnd.ToFarsi(),
|
||||
ContractStartFa = x.ContractStart.ToFarsi(),
|
||||
CreationDate = x.CreationDate,
|
||||
SumOfWorkingDays = x.SumOfWorkingDays,
|
||||
WorkshopName = x.WorkshopFullName,
|
||||
DateOfBirth = x.DateOfBirth.ToFarsi(),
|
||||
NationalCode = x.NationalCode,
|
||||
EmployeeFName = x.EmployeeFName,
|
||||
EmployeeLName = x.EmployeeLName,
|
||||
EarlyExitDeduction = x.EarlyExitDeduction.ToMoney(),
|
||||
LateToWorkDeduction = x.LateToWorkDeduction.ToMoney(),
|
||||
FineDeduction = x.FineDeduction.ToMoney(),
|
||||
FineViewModelList = x.CheckoutFines.Select(y=> new FineViewModel()
|
||||
{
|
||||
Amount = y.Amount,
|
||||
FineDate = y.FineDateFa,
|
||||
Title = y.Title
|
||||
}).ToList(),
|
||||
InstallmentViewModels = x.CustomizeCheckoutLoanInstallments.Select(i=>new LoanInstallmentViewModel()
|
||||
{
|
||||
Amount = i.AmountForMonth,
|
||||
AmountDouble = i.AmountForMonth.MoneyToDouble(),
|
||||
Year = i.Year,
|
||||
Month = i.Month,
|
||||
IsActive = i.IsActive,
|
||||
RemainingAmount = i.LoanRemaining,
|
||||
LoanAmount = i.LoanAmount
|
||||
}).ToList(),
|
||||
RewardViewModels = x.CustomizeCheckoutRewards.Select(r=>new RewardViewModel()
|
||||
{
|
||||
IsActive = r.IsActive,
|
||||
Title = r.Title,
|
||||
Amount = r.Amount,
|
||||
AmountDouble =r.Amount.MoneyToDouble(),
|
||||
Description = r.Description,
|
||||
GrantDateFa = r.GrantDateFa,
|
||||
GrantDateGr = r.GrantDate
|
||||
}).ToList(),
|
||||
SalaryAidViewModels = x.CustomizeCheckoutSalaryAids.Select(s=> new SalaryAidViewModel()
|
||||
{
|
||||
Amount = s.Amount,
|
||||
AmountDouble = s.Amount.MoneyToDouble(),
|
||||
SalaryAidDateTimeFa = s.SalaryAidDateTimeFa,
|
||||
SalaryAidDateTimeGe = s.SalaryAidDateTime
|
||||
}).ToList(),
|
||||
List<(string Picture, long Id)> employeePictures;
|
||||
|
||||
LateToWorkValue = x.LateToWorkValue == TimeSpan.Zero ? "-" : $"{(int)x.LateToWorkValue.TotalHours}:{Convert.ToInt32(x.LateToWorkValue.TotalMinutes % 60):00}"
|
||||
|
||||
var employeePicMediaIdInEmployeeDoc = _companyContext.EmployeeDocumentItems.Where(x => customizeCheckoutsQuery
|
||||
.Any(y => y.WorkshopId == x.WorkshopId && y.EmployeeId == x.EmployeeId) &&
|
||||
x.DocumentLabel == DocumentItemLabel.EmployeePicture &&
|
||||
x.DocumentStatus == DocumentStatus.Confirmed)
|
||||
?.Select(x => new { x.EmployeeId, x.MediaId }).ToList();
|
||||
|
||||
var mediasInEmployeeDoc = _accountContext.Medias.Where(x => employeePicMediaIdInEmployeeDoc.Select(y => y.MediaId).Contains(x.id)).ToList();
|
||||
employeePictures = employeePicMediaIdInEmployeeDoc.Select(x =>
|
||||
{
|
||||
var media = mediasInEmployeeDoc.First(m => m.id == x.MediaId);
|
||||
var filePath = media.Path;
|
||||
if (!System.IO.File.Exists(filePath))
|
||||
throw new FileNotFoundException("فایل مورد نظر یافت نشد.", filePath);
|
||||
|
||||
byte[] fileBytes = System.IO.File.ReadAllBytes(filePath);
|
||||
var base64 = Convert.ToBase64String(fileBytes);
|
||||
|
||||
return (base64, x.EmployeeId);
|
||||
}).ToList();
|
||||
|
||||
|
||||
|
||||
var employeeIds = customizeCheckoutsQuery.Select(x => x.EmployeeId).ToList()
|
||||
.Where(x => !employeePictures.Select(e => e.Id).Contains(x)).ToList();
|
||||
|
||||
|
||||
foreach (var employeeId in employeeIds)
|
||||
{
|
||||
var directoryPath = $"{_webHostEnvironment.ContentRootPath}\\Faces\\{workshopId}\\{employeeId}\\1.jpg";
|
||||
|
||||
if (!System.IO.File.Exists(directoryPath))
|
||||
continue;
|
||||
|
||||
byte[] fileBytes = System.IO.File.ReadAllBytes(directoryPath);
|
||||
var base64 = Convert.ToBase64String(fileBytes);
|
||||
|
||||
employeePictures.Add((base64, employeeId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
List<CustomizeCheckoutViewModel> customizeCheckoutsList = customizeCheckoutsQuery.Select(x => new CustomizeCheckoutViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
WorkshopId = x.WorkshopId,
|
||||
ContractId = x.ContractId == null ? 0 : x.ContractId.Value,
|
||||
EmployeeId = x.EmployeeId,
|
||||
Month = x.Month,
|
||||
Year = x.Year,
|
||||
ContractNo = x.ContractNo,
|
||||
MonthlySalary = x.MonthlySalary.ToMoney(),
|
||||
BaseYearsPay = x.BaseYearsPay.ToMoney(),
|
||||
OvertimePay = x.OverTimePay.ToMoney(),
|
||||
NightworkPay = x.NightWorkPay.ToMoney(),
|
||||
FridayPay = x.FridayPay.ToMoney(),
|
||||
ShiftPay = x.ShiftPay.ToMoney(),
|
||||
FamilyAllowance = x.FamilyAllowance.ToMoney(),
|
||||
BonusesPay = x.BonusesPay.ToMoney(),
|
||||
LeavePay = x.LeavePay.ToMoney(),
|
||||
InsuranceDeduction = x.InsuranceDeduction.ToMoney(),
|
||||
TaxDeducation = x.TaxDeduction.ToMoney(),
|
||||
InstallmentDeduction = x.InstallmentDeduction.ToMoney(),
|
||||
SalaryAidDeduction = x.SalaryAidDeduction.ToMoney(),
|
||||
AbsenceDeduction = x.FineAbsenceDeduction.ToMoney(),
|
||||
TotalClaims = x.TotalClaims,
|
||||
TotalDeductions = x.TotalDeductions,
|
||||
TotalPayment = x.TotalPayment.ToMoney(),
|
||||
RewardPay = x.RewardPay.ToMoney(),
|
||||
ContractStartGr = x.ContractStart,
|
||||
ContractEndGr = x.ContractEnd,
|
||||
MarriedAllowance = x.MarriedAllowance.ToMoney(),
|
||||
ContractEndFa = x.ContractEnd.ToFarsi(),
|
||||
ContractStartFa = x.ContractStart.ToFarsi(),
|
||||
CreationDate = x.CreationDate,
|
||||
SumOfWorkingDays = x.SumOfWorkingDays,
|
||||
WorkshopName = x.WorkshopFullName,
|
||||
DateOfBirth = x.DateOfBirth.ToFarsi(),
|
||||
NationalCode = x.NationalCode,
|
||||
EmployeeFName = x.EmployeeFName,
|
||||
EmployeeLName = x.EmployeeLName,
|
||||
EarlyExitDeduction = x.EarlyExitDeduction.ToMoney(),
|
||||
LateToWorkDeduction = x.LateToWorkDeduction.ToMoney(),
|
||||
FineDeduction = x.FineDeduction.ToMoney(),
|
||||
FineViewModelList = x.CheckoutFines.Select(y => new FineViewModel()
|
||||
{
|
||||
Amount = y.Amount,
|
||||
FineDate = y.FineDateFa,
|
||||
Title = y.Title
|
||||
}).ToList(),
|
||||
InstallmentViewModels = x.CustomizeCheckoutLoanInstallments.Select(i => new LoanInstallmentViewModel()
|
||||
{
|
||||
Amount = i.AmountForMonth,
|
||||
AmountDouble = i.AmountForMonth.MoneyToDouble(),
|
||||
Year = i.Year,
|
||||
Month = i.Month,
|
||||
IsActive = i.IsActive,
|
||||
RemainingAmount = i.LoanRemaining,
|
||||
LoanAmount = i.LoanAmount
|
||||
}).ToList(),
|
||||
RewardViewModels = x.CustomizeCheckoutRewards.Select(r => new RewardViewModel()
|
||||
{
|
||||
IsActive = r.IsActive,
|
||||
Title = r.Title,
|
||||
Amount = r.Amount,
|
||||
AmountDouble = r.Amount.MoneyToDouble(),
|
||||
Description = r.Description,
|
||||
GrantDateFa = r.GrantDateFa,
|
||||
GrantDateGr = r.GrantDate
|
||||
}).ToList(),
|
||||
SalaryAidViewModels = x.CustomizeCheckoutSalaryAids.Select(s => new SalaryAidViewModel()
|
||||
{
|
||||
Amount = s.Amount,
|
||||
AmountDouble = s.Amount.MoneyToDouble(),
|
||||
SalaryAidDateTimeFa = s.SalaryAidDateTimeFa,
|
||||
SalaryAidDateTimeGe = s.SalaryAidDateTime
|
||||
}).ToList(),
|
||||
|
||||
LateToWorkValue = x.LateToWorkValue == TimeSpan.Zero ? "-" : $"{(int)x.LateToWorkValue.TotalHours}:{Convert.ToInt32(x.LateToWorkValue.TotalMinutes % 60):00}",
|
||||
SettingSalary = x.SettingSalary.ToMoney(),
|
||||
DailyWage = x.DailyWage.ToMoney(),
|
||||
ShiftStatus = x.ShiftStatus,
|
||||
|
||||
}).ToList();
|
||||
List<WorkshopViewModel> workshopsList = workshopsQuery.Select(x => new WorkshopViewModel
|
||||
{
|
||||
WorkshopFullName = x.WorkshopFullName,
|
||||
Id = x.id
|
||||
}).ToList();
|
||||
List<EmployerViewModel> workshopEmployersList = employersQuery.Select(x => new EmployerViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
FullName = x.FullName
|
||||
}).ToList();
|
||||
//List<LeftWorkViewModel> leftWorksList = leftWorksQuery.Select(x => new LeftWorkViewModel
|
||||
//{
|
||||
// EmployeeId = x.EmployeeId,
|
||||
// WorkshopId = x.WorkshopId,
|
||||
// Id = x.id,
|
||||
// StartWorkDateGr = x.StartWorkDate,
|
||||
// LeftWorkDateGr = x.LeftWorkDate
|
||||
//}).ToList();
|
||||
//List<EmployeeViewModel> employees = employeesQuery.Select(x => new EmployeeViewModel()
|
||||
//{
|
||||
// Id = x.id,
|
||||
// FName = x.FName,
|
||||
// LName = x.LName,
|
||||
// FatherName = x.FatherName,
|
||||
// NationalCode = x.NationalCode,
|
||||
// DateOfBirth = x.DateOfBirth.ToFarsi()
|
||||
//}).ToList();
|
||||
List<PersonnelCodeViewModel> personnelCodeList = personnelCodesQuery.Select(x => new PersonnelCodeViewModel
|
||||
{
|
||||
EmployeeId = x.EmployeeId,
|
||||
WorkshopId = x.WorkshopId,
|
||||
PersonnelCode = Convert.ToInt64(x.PersonnelCode)
|
||||
}).ToList();
|
||||
List<WorkshopViewModel> workshopsList = workshopsQuery.Select(x => new WorkshopViewModel
|
||||
{
|
||||
WorkshopFullName = x.WorkshopFullName,
|
||||
Id = x.id
|
||||
}).ToList();
|
||||
List<EmployerViewModel> workshopEmployersList = employersQuery.Select(x => new EmployerViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
FullName = x.FullName
|
||||
}).ToList();
|
||||
//List<LeftWorkViewModel> leftWorksList = leftWorksQuery.Select(x => new LeftWorkViewModel
|
||||
//{
|
||||
// EmployeeId = x.EmployeeId,
|
||||
// WorkshopId = x.WorkshopId,
|
||||
// Id = x.id,
|
||||
// StartWorkDateGr = x.StartWorkDate,
|
||||
// LeftWorkDateGr = x.LeftWorkDate
|
||||
//}).ToList();
|
||||
//List<EmployeeViewModel> employees = employeesQuery.Select(x => new EmployeeViewModel()
|
||||
//{
|
||||
// Id = x.id,
|
||||
// FName = x.FName,
|
||||
// LName = x.LName,
|
||||
// FatherName = x.FatherName,
|
||||
// NationalCode = x.NationalCode,
|
||||
// DateOfBirth = x.DateOfBirth.ToFarsi()
|
||||
//}).ToList();
|
||||
List<PersonnelCodeViewModel> personnelCodeList = personnelCodesQuery.Select(x => new PersonnelCodeViewModel
|
||||
{
|
||||
EmployeeId = x.EmployeeId,
|
||||
WorkshopId = x.WorkshopId,
|
||||
PersonnelCode = Convert.ToInt64(x.PersonnelCode)
|
||||
}).ToList();
|
||||
|
||||
var date = customizeCheckoutsList.FirstOrDefault();
|
||||
var date = customizeCheckoutsList.FirstOrDefault();
|
||||
|
||||
if (date == null)
|
||||
return new();
|
||||
if (date == null)
|
||||
return new();
|
||||
|
||||
var startDate = date.ContractStartGr.AddMonthsFa(0, out _).ToGeorgianDateTime().Date;
|
||||
var endDate = startDate.AddMonthsFa(1, out _).ToGeorgianDateTime().Date.AddTicks(-1);
|
||||
var startDate = date.ContractStartGr.AddMonthsFa(0, out _).ToGeorgianDateTime().Date;
|
||||
var endDate = startDate.AddMonthsFa(1, out _).ToGeorgianDateTime().Date.AddTicks(-1);
|
||||
|
||||
|
||||
List<PersonnelCheckoutDailyRollCallViewModel> personnelRollCalls = _rollCallRepository
|
||||
.GetEmployeeRollCallsForMonth(customizeCheckoutsList.Select(x => x.EmployeeId), workshopId, startDate, endDate);
|
||||
List<PersonnelCheckoutDailyRollCallViewModel> personnelRollCalls = _rollCallRepository
|
||||
.GetEmployeeRollCallsForMonth(customizeCheckoutsList.Select(x => x.EmployeeId), workshopId, startDate, endDate);
|
||||
|
||||
int counter = 1;
|
||||
int counter = 1;
|
||||
|
||||
foreach (var checkout in customizeCheckoutsList)
|
||||
{
|
||||
checkout.PrintCounter = counter++;
|
||||
foreach (var checkout in customizeCheckoutsList)
|
||||
{
|
||||
checkout.EmployeePicture =
|
||||
employeePictures.FirstOrDefault(p => p.Id == checkout.EmployeeId).Picture ?? "";
|
||||
|
||||
//var leftwork = leftWorksList.FirstOrDefault(x => checkout.WorkshopId == x.WorkshopId && x.EmployeeId == checkout.EmployeeId);
|
||||
//checkout.LeftWorkDateGr = leftwork.LeftWorkDateGr;
|
||||
checkout.PrintCounter = counter++;
|
||||
|
||||
//var employee = employees.FirstOrDefault(x => x.Id == checkout.EmployeeId);
|
||||
//var leftwork = leftWorksList.FirstOrDefault(x => checkout.WorkshopId == x.WorkshopId && x.EmployeeId == checkout.EmployeeId);
|
||||
//checkout.LeftWorkDateGr = leftwork.LeftWorkDateGr;
|
||||
|
||||
checkout.EmployerList = workshopEmployersList;
|
||||
checkout.EmployerName = workshopEmployersList.FirstOrDefault()?.FullName ?? "-";
|
||||
//var employee = employees.FirstOrDefault(x => x.Id == checkout.EmployeeId);
|
||||
|
||||
checkout.EmployerList = workshopEmployersList;
|
||||
checkout.EmployerName = workshopEmployersList.FirstOrDefault()?.FullName ?? "-";
|
||||
|
||||
|
||||
checkout.MonthlyRollCall = personnelRollCalls.FirstOrDefault(x => x.EmployeeId == checkout.EmployeeId);
|
||||
checkout.PersonnelCode = personnelCodeList.FirstOrDefault(x => x.EmployeeId == checkout.EmployeeId)?.PersonnelCode ?? 0;
|
||||
checkout.MonthlyRollCall = personnelRollCalls.FirstOrDefault(x => x.EmployeeId == checkout.EmployeeId);
|
||||
checkout.PersonnelCode = personnelCodeList.FirstOrDefault(x => x.EmployeeId == checkout.EmployeeId)?.PersonnelCode ?? 0;
|
||||
|
||||
}
|
||||
return customizeCheckoutsList.OrderBy(x => x.EmployeeFullName).ToList();
|
||||
}
|
||||
return customizeCheckoutsList.OrderBy(x => x.EmployeeFullName).ToList();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void RemoveEmployeeCustomizeCheckoutInDates(long workshopId, long employeeId, DateTime startOfMonth, DateTime endOfMonth)
|
||||
|
||||
|
||||
public void RemoveEmployeeCustomizeCheckoutInDates(long workshopId, long employeeId, DateTime startOfMonth, DateTime endOfMonth)
|
||||
{
|
||||
var checkout = _companyContext.CustomizeCheckouts.FirstOrDefault(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId &&
|
||||
x.ContractStart.Date <= endOfMonth.Date && x.ContractEnd.Date >= startOfMonth.Date);
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using AccountMangement.Infrastructure.EFCore;
|
||||
using Company.Domain.CustomizeCheckoutTempAgg;
|
||||
using Company.Domain.empolyerAgg;
|
||||
using Company.Domain.PersonnelCodeAgg;
|
||||
using Company.Domain.RollCallAgg;
|
||||
using Company.Domain.WorkshopAgg;
|
||||
using CompanyManagment.App.Contracts.CustomizeCheckout;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
using CompanyManagment.App.Contracts.Employer;
|
||||
using CompanyManagment.App.Contracts.Fine;
|
||||
using CompanyManagment.App.Contracts.Loan;
|
||||
@@ -15,10 +17,12 @@ using CompanyManagment.App.Contracts.Reward;
|
||||
using CompanyManagment.App.Contracts.RollCall;
|
||||
using CompanyManagment.App.Contracts.SalaryAid;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository
|
||||
@@ -27,10 +31,15 @@ namespace CompanyManagment.EFCore.Repository
|
||||
{
|
||||
private readonly IRollCallRepository _rollCallRepository;
|
||||
private readonly CompanyContext _companyContext;
|
||||
public CustomizeCheckoutTempRepository(CompanyContext context, IRollCallRepository rollCallRepository) : base(context)
|
||||
private readonly AccountContext _accountContext;
|
||||
private readonly IWebHostEnvironment _webHostEnvironment;
|
||||
|
||||
public CustomizeCheckoutTempRepository(CompanyContext context, IRollCallRepository rollCallRepository, IWebHostEnvironment webHostEnvironment, AccountContext accountContext) : base(context)
|
||||
{
|
||||
_companyContext = context;
|
||||
_rollCallRepository = rollCallRepository;
|
||||
_webHostEnvironment = webHostEnvironment;
|
||||
_accountContext = accountContext;
|
||||
}
|
||||
#region Pooya
|
||||
public List<CustomizeCheckoutViewModel> GetByWorkshopIdInDates(long workshopId, DateTime startOfMonth, DateTime endOfMonth)
|
||||
@@ -210,203 +219,250 @@ namespace CompanyManagment.EFCore.Repository
|
||||
|
||||
}
|
||||
public List<CustomizeCheckoutViewModel> PrintAll(long workshopId, IEnumerable<long> customizeCheckoutIds)
|
||||
{
|
||||
{
|
||||
|
||||
//var pc = new PersianCalendar();
|
||||
//var year = pc.GetYear(monthStart);
|
||||
//var month = pc.GetMonth(monthStart);
|
||||
//var pc = new PersianCalendar();
|
||||
//var year = pc.GetYear(monthStart);
|
||||
//var month = pc.GetMonth(monthStart);
|
||||
|
||||
IQueryable<CustomizeCheckoutTemp> customizeCheckoutsQuery = _companyContext.CustomizeCheckoutTemps.Where(x => customizeCheckoutIds.Contains(x.id));
|
||||
IQueryable<CustomizeCheckoutTemp> customizeCheckoutsQuery = _companyContext.CustomizeCheckoutTemps.Where(x => customizeCheckoutIds.Contains(x.id));
|
||||
|
||||
IQueryable<Workshop> workshopsQuery = _companyContext.Workshops.Where(x => customizeCheckoutsQuery.Any(y => y.WorkshopId == x.id));
|
||||
IQueryable<Workshop> workshopsQuery = _companyContext.Workshops.Where(x => customizeCheckoutsQuery.Any(y => y.WorkshopId == x.id));
|
||||
|
||||
IQueryable<long> workshopEmployersIdsQuery = _companyContext.WorkshopEmployers.Where(x => x.WorkshopId == workshopId).Select(x => x.EmployerId);
|
||||
IQueryable<Employer> employersQuery = _companyContext.Employers.Where(x => workshopEmployersIdsQuery.Contains(x.id));
|
||||
IQueryable<long> workshopEmployersIdsQuery = _companyContext.WorkshopEmployers.Where(x => x.WorkshopId == workshopId).Select(x => x.EmployerId);
|
||||
IQueryable<Employer> employersQuery = _companyContext.Employers.Where(x => workshopEmployersIdsQuery.Contains(x.id));
|
||||
|
||||
IQueryable<PersonnelCodeDomain> personnelCodesQuery = _companyContext.PersonnelCodeSet
|
||||
.Where(x => customizeCheckoutsQuery.Any(y => y.WorkshopId == x.WorkshopId && y.EmployeeId == x.EmployeeId));
|
||||
IQueryable<PersonnelCodeDomain> personnelCodesQuery = _companyContext.PersonnelCodeSet
|
||||
.Where(x => customizeCheckoutsQuery.Any(y => y.WorkshopId == x.WorkshopId && y.EmployeeId == x.EmployeeId));
|
||||
|
||||
//IQueryable<LeftWork> leftWorksQuery = _companyContext.LeftWorkList
|
||||
// .Where(x => customizeCheckoutsQuery.Any(y => y.WorkshopId == x.WorkshopId && y.EmployeeId == x.EmployeeId) &&
|
||||
// x.LeftWorkDate.AddDays(-1) >= monthStart && x.StartWorkDate <= monthEnd);
|
||||
//IQueryable<LeftWork> leftWorksQuery = _companyContext.LeftWorkList
|
||||
// .Where(x => customizeCheckoutsQuery.Any(y => y.WorkshopId == x.WorkshopId && y.EmployeeId == x.EmployeeId) &&
|
||||
// x.LeftWorkDate.AddDays(-1) >= monthStart && x.StartWorkDate <= monthEnd);
|
||||
|
||||
//IQueryable<Employee> employeesQuery = _companyContext.Employees.Where(x => customizeCheckoutsQuery.Any(y => y.EmployeeId == x.id));
|
||||
//IQueryable<Employee> employeesQuery = _companyContext.Employees.Where(x => customizeCheckoutsQuery.Any(y => y.EmployeeId == x.id));
|
||||
|
||||
|
||||
List<(string Picture, long Id)> employeePictures;
|
||||
|
||||
|
||||
var employeePicMediaIdInEmployeeDoc = _companyContext.EmployeeDocumentItems.Where(x => customizeCheckoutsQuery
|
||||
.Any(y => y.WorkshopId == x.WorkshopId && y.EmployeeId == x.EmployeeId) &&
|
||||
x.DocumentLabel == DocumentItemLabel.EmployeePicture &&
|
||||
x.DocumentStatus == DocumentStatus.Confirmed)
|
||||
?.Select(x => new { x.EmployeeId, x.MediaId }).ToList();
|
||||
|
||||
var mediasInEmployeeDoc = _accountContext.Medias.Where(x => employeePicMediaIdInEmployeeDoc.Select(y => y.MediaId).Contains(x.id)).ToList();
|
||||
employeePictures = employeePicMediaIdInEmployeeDoc.Select(x =>
|
||||
{
|
||||
var media = mediasInEmployeeDoc.First(m => m.id == x.MediaId);
|
||||
var filePath = media.Path;
|
||||
if (!System.IO.File.Exists(filePath))
|
||||
throw new FileNotFoundException("فایل مورد نظر یافت نشد.", filePath);
|
||||
|
||||
byte[] fileBytes = System.IO.File.ReadAllBytes(filePath);
|
||||
var base64 = Convert.ToBase64String(fileBytes);
|
||||
|
||||
return (base64, x.EmployeeId);
|
||||
}).ToList();
|
||||
|
||||
|
||||
|
||||
List<CustomizeCheckoutViewModel> customizeCheckoutsList = customizeCheckoutsQuery.Select(x => new CustomizeCheckoutViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
WorkshopId = x.WorkshopId,
|
||||
ContractId = x.ContractId == null ? 0 : x.ContractId.Value,
|
||||
EmployeeId = x.EmployeeId,
|
||||
Month = x.Month,
|
||||
Year = x.Year,
|
||||
ContractNo = x.ContractNo,
|
||||
MonthlySalary = x.MonthlySalary.ToMoney(),
|
||||
BaseYearsPay = x.BaseYearsPay.ToMoney(),
|
||||
OvertimePay = x.OverTimePay.ToMoney(),
|
||||
NightworkPay = x.NightWorkPay.ToMoney(),
|
||||
FridayPay = x.FridayPay.ToMoney(),
|
||||
ShiftPay = x.ShiftPay.ToMoney(),
|
||||
FamilyAllowance = x.FamilyAllowance.ToMoney(),
|
||||
BonusesPay = x.BonusesPay.ToMoney(),
|
||||
LeavePay = x.LeavePay.ToMoney(),
|
||||
InsuranceDeduction = x.InsuranceDeduction.ToMoney(),
|
||||
TaxDeducation = x.TaxDeduction.ToMoney(),
|
||||
InstallmentDeduction = x.InstallmentDeduction.ToMoney(),
|
||||
SalaryAidDeduction = x.SalaryAidDeduction.ToMoney(),
|
||||
AbsenceDeduction = x.FineAbsenceDeduction.ToMoney(),
|
||||
TotalClaims = x.TotalClaims,
|
||||
TotalDeductions = x.TotalDeductions,
|
||||
TotalPayment = x.TotalPayment.ToMoney(),
|
||||
RewardPay = x.RewardPay.ToMoney(),
|
||||
ContractStartGr = x.ContractStart,
|
||||
ContractEndGr = x.ContractEnd,
|
||||
MarriedAllowance = x.MarriedAllowance.ToMoney(),
|
||||
ContractEndFa = x.ContractEnd.ToFarsi(),
|
||||
ContractStartFa = x.ContractStart.ToFarsi(),
|
||||
CreationDate = x.CreationDate,
|
||||
SumOfWorkingDays = x.SumOfWorkingDays,
|
||||
WorkshopName = x.WorkshopFullName,
|
||||
DateOfBirth = x.DateOfBirth.ToFarsi(),
|
||||
NationalCode = x.NationalCode,
|
||||
EmployeeFName = x.EmployeeFName,
|
||||
EmployeeLName = x.EmployeeLName,
|
||||
EarlyExitDeduction = x.EarlyExitDeduction.ToMoney(),
|
||||
LateToWorkDeduction = x.LateToWorkDeduction.ToMoney(),
|
||||
FineDeduction = x.FineDeduction.ToMoney(),
|
||||
FineViewModelList = x.CheckoutFines.Select(y => new FineViewModel()
|
||||
{
|
||||
Amount = y.Amount,
|
||||
FineDate = y.FineDateFa,
|
||||
Title = y.Title
|
||||
}).ToList(),
|
||||
InstallmentViewModels = x.CustomizeCheckoutLoanInstallments.Select(i => new LoanInstallmentViewModel()
|
||||
{
|
||||
Amount = i.AmountForMonth,
|
||||
AmountDouble = i.AmountForMonth.MoneyToDouble(),
|
||||
Year = i.Year,
|
||||
Month = i.Month,
|
||||
IsActive = i.IsActive,
|
||||
RemainingAmount = i.LoanRemaining,
|
||||
LoanAmount = i.LoanAmount
|
||||
}).ToList(),
|
||||
RewardViewModels = x.CustomizeCheckoutRewards.Select(r => new RewardViewModel()
|
||||
{
|
||||
IsActive = r.IsActive,
|
||||
Title = r.Title,
|
||||
Amount = r.Amount,
|
||||
AmountDouble = r.Amount.MoneyToDouble(),
|
||||
Description = r.Description,
|
||||
GrantDateFa = r.GrantDateFa,
|
||||
GrantDateGr = r.GrantDate
|
||||
}).ToList(),
|
||||
SalaryAidViewModels = x.CustomizeCheckoutSalaryAids.Select(s => new SalaryAidViewModel()
|
||||
{
|
||||
Amount = s.Amount,
|
||||
AmountDouble = s.Amount.MoneyToDouble(),
|
||||
SalaryAidDateTimeFa = s.SalaryAidDateTimeFa,
|
||||
SalaryAidDateTimeGe = s.SalaryAidDateTime
|
||||
}).ToList(),
|
||||
var employeeIds = customizeCheckoutsQuery.Select(x => x.EmployeeId).ToList()
|
||||
.Where(x => !employeePictures.Select(e => e.Id).Contains(x)).ToList();
|
||||
|
||||
//LateToWorkValue = x.LateToWorkValue == TimeSpan.Zero ? "-" : $"{(int)x.LateToWorkValue.TotalHours}:{x.LateToWorkValue.Minutes:D2}"
|
||||
LateToWorkValue = x.LateToWorkValue == TimeSpan.Zero ? "-" : $"{(int)x.LateToWorkValue.TotalHours}:{Convert.ToInt32(x.LateToWorkValue.TotalMinutes % 60):00}"
|
||||
foreach (var employeeId in employeeIds)
|
||||
{
|
||||
var directoryPath = $"{_webHostEnvironment.ContentRootPath}\\Faces\\{workshopId}\\{employeeId}\\1.jpg";
|
||||
|
||||
}).ToList();
|
||||
List<WorkshopViewModel> workshopsList = workshopsQuery.Select(x => new WorkshopViewModel
|
||||
{
|
||||
WorkshopFullName = x.WorkshopFullName,
|
||||
Id = x.id
|
||||
}).ToList();
|
||||
List<EmployerViewModel> workshopEmployersList = employersQuery.Select(x => new EmployerViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
FullName = x.FullName
|
||||
}).ToList();
|
||||
//List<LeftWorkViewModel> leftWorksList = leftWorksQuery.Select(x => new LeftWorkViewModel
|
||||
//{
|
||||
// EmployeeId = x.EmployeeId,
|
||||
// WorkshopId = x.WorkshopId,
|
||||
// Id = x.id,
|
||||
// StartWorkDateGr = x.StartWorkDate,
|
||||
// LeftWorkDateGr = x.LeftWorkDate
|
||||
//}).ToList();
|
||||
//List<EmployeeViewModel> employees = employeesQuery.Select(x => new EmployeeViewModel()
|
||||
//{
|
||||
// Id = x.id,
|
||||
// FName = x.FName,
|
||||
// LName = x.LName,
|
||||
// FatherName = x.FatherName,
|
||||
// NationalCode = x.NationalCode,
|
||||
// DateOfBirth = x.DateOfBirth.ToFarsi()
|
||||
//}).ToList();
|
||||
List<PersonnelCodeViewModel> personnelCodeList = personnelCodesQuery.Select(x => new PersonnelCodeViewModel
|
||||
{
|
||||
EmployeeId = x.EmployeeId,
|
||||
WorkshopId = x.WorkshopId,
|
||||
PersonnelCode = Convert.ToInt64(x.PersonnelCode)
|
||||
}).ToList();
|
||||
if (!System.IO.File.Exists(directoryPath))
|
||||
continue;
|
||||
|
||||
var date = customizeCheckoutsList.FirstOrDefault();
|
||||
byte[] fileBytes = System.IO.File.ReadAllBytes(directoryPath);
|
||||
var base64 = Convert.ToBase64String(fileBytes);
|
||||
|
||||
if (date == null)
|
||||
return new();
|
||||
|
||||
var startDate = date.ContractStartGr.Date;
|
||||
var endDate = date.ContractEndGr.AddDays(1).Date.AddTicks(-1);
|
||||
employeePictures.Add((base64, employeeId));
|
||||
}
|
||||
|
||||
|
||||
List<PersonnelCheckoutDailyRollCallViewModel> personnelRollCalls = _rollCallRepository
|
||||
.GetEmployeeRollCallsForCustomizeCheckoutTemp(customizeCheckoutsList.Select(x => x.Id).ToList(), workshopId);
|
||||
List<CustomizeCheckoutViewModel> customizeCheckoutsList = customizeCheckoutsQuery.Select(x => new CustomizeCheckoutViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
WorkshopId = x.WorkshopId,
|
||||
ContractId = x.ContractId == null ? 0 : x.ContractId.Value,
|
||||
EmployeeId = x.EmployeeId,
|
||||
Month = x.Month,
|
||||
Year = x.Year,
|
||||
ContractNo = x.ContractNo,
|
||||
MonthlySalary = x.MonthlySalary.ToMoney(),
|
||||
BaseYearsPay = x.BaseYearsPay.ToMoney(),
|
||||
OvertimePay = x.OverTimePay.ToMoney(),
|
||||
NightworkPay = x.NightWorkPay.ToMoney(),
|
||||
FridayPay = x.FridayPay.ToMoney(),
|
||||
ShiftPay = x.ShiftPay.ToMoney(),
|
||||
FamilyAllowance = x.FamilyAllowance.ToMoney(),
|
||||
BonusesPay = x.BonusesPay.ToMoney(),
|
||||
LeavePay = x.LeavePay.ToMoney(),
|
||||
InsuranceDeduction = x.InsuranceDeduction.ToMoney(),
|
||||
TaxDeducation = x.TaxDeduction.ToMoney(),
|
||||
InstallmentDeduction = x.InstallmentDeduction.ToMoney(),
|
||||
SalaryAidDeduction = x.SalaryAidDeduction.ToMoney(),
|
||||
AbsenceDeduction = x.FineAbsenceDeduction.ToMoney(),
|
||||
TotalClaims = x.TotalClaims,
|
||||
TotalDeductions = x.TotalDeductions,
|
||||
TotalPayment = x.TotalPayment.ToMoney(),
|
||||
RewardPay = x.RewardPay.ToMoney(),
|
||||
ContractStartGr = x.ContractStart,
|
||||
ContractEndGr = x.ContractEnd,
|
||||
MarriedAllowance = x.MarriedAllowance.ToMoney(),
|
||||
ContractEndFa = x.ContractEnd.ToFarsi(),
|
||||
ContractStartFa = x.ContractStart.ToFarsi(),
|
||||
CreationDate = x.CreationDate,
|
||||
SumOfWorkingDays = x.SumOfWorkingDays,
|
||||
WorkshopName = x.WorkshopFullName,
|
||||
DateOfBirth = x.DateOfBirth.ToFarsi(),
|
||||
NationalCode = x.NationalCode,
|
||||
EmployeeFName = x.EmployeeFName,
|
||||
EmployeeLName = x.EmployeeLName,
|
||||
EarlyExitDeduction = x.EarlyExitDeduction.ToMoney(),
|
||||
LateToWorkDeduction = x.LateToWorkDeduction.ToMoney(),
|
||||
FineDeduction = x.FineDeduction.ToMoney(),
|
||||
FineViewModelList = x.CheckoutFines.Select(y => new FineViewModel()
|
||||
{
|
||||
Amount = y.Amount,
|
||||
FineDate = y.FineDateFa,
|
||||
Title = y.Title
|
||||
}).ToList(),
|
||||
InstallmentViewModels = x.CustomizeCheckoutLoanInstallments.Select(i => new LoanInstallmentViewModel()
|
||||
{
|
||||
Amount = i.AmountForMonth,
|
||||
AmountDouble = i.AmountForMonth.MoneyToDouble(),
|
||||
Year = i.Year,
|
||||
Month = i.Month,
|
||||
IsActive = i.IsActive,
|
||||
RemainingAmount = i.LoanRemaining,
|
||||
LoanAmount = i.LoanAmount
|
||||
}).ToList(),
|
||||
RewardViewModels = x.CustomizeCheckoutRewards.Select(r => new RewardViewModel()
|
||||
{
|
||||
IsActive = r.IsActive,
|
||||
Title = r.Title,
|
||||
Amount = r.Amount,
|
||||
AmountDouble = r.Amount.MoneyToDouble(),
|
||||
Description = r.Description,
|
||||
GrantDateFa = r.GrantDateFa,
|
||||
GrantDateGr = r.GrantDate
|
||||
}).ToList(),
|
||||
SalaryAidViewModels = x.CustomizeCheckoutSalaryAids.Select(s => new SalaryAidViewModel()
|
||||
{
|
||||
Amount = s.Amount,
|
||||
AmountDouble = s.Amount.MoneyToDouble(),
|
||||
SalaryAidDateTimeFa = s.SalaryAidDateTimeFa,
|
||||
SalaryAidDateTimeGe = s.SalaryAidDateTime
|
||||
}).ToList(),
|
||||
|
||||
int counter = 1;
|
||||
foreach (var checkout in customizeCheckoutsList)
|
||||
{
|
||||
checkout.PrintCounter = counter++;
|
||||
//var leftwork = leftWorksList.FirstOrDefault(x => checkout.WorkshopId == x.WorkshopId && x.EmployeeId == checkout.EmployeeId);
|
||||
//checkout.LeftWorkDateGr = leftwork.LeftWorkDateGr;
|
||||
LateToWorkValue = x.LateToWorkValue == TimeSpan.Zero ? "-" : $"{(int)x.LateToWorkValue.TotalHours}:{Convert.ToInt32(x.LateToWorkValue.TotalMinutes % 60):00}",
|
||||
SettingSalary = x.SettingSalary.ToMoney(),
|
||||
DailyWage = x.DailyWage.ToMoney(),
|
||||
ShiftStatus = x.ShiftStatus,
|
||||
|
||||
//var employee = employees.FirstOrDefault(x => x.Id == checkout.EmployeeId);
|
||||
var rollCalls = personnelRollCalls.FirstOrDefault(x => x.EmployeeId == checkout.EmployeeId);
|
||||
|
||||
checkout.EmployerList = workshopEmployersList;
|
||||
checkout.EmployerName = workshopEmployersList.FirstOrDefault()?.FullName ?? "-";
|
||||
|
||||
checkout.MonthlyRollCall = rollCalls;
|
||||
checkout.MonthlyRollCall.DailyRollCalls = rollCalls.DailyRollCalls.Select(x =>
|
||||
{
|
||||
var isInRange = x.DateTimeGr >= checkout.ContractStartGr && x.DateTimeGr <= checkout.ContractEndGr;
|
||||
return new CheckoutDailyRollCallViewModel()
|
||||
{
|
||||
StartDate1 = isInRange ? x.StartDate1 : "",
|
||||
EndDate1 = isInRange ? x.EndDate1 : "",
|
||||
EndDate2 = isInRange ? x.EndDate2 : "",
|
||||
StartDate2 = isInRange ? x.StartDate2 : "",
|
||||
TotalWorkingHours = isInRange ? x.TotalWorkingHours : "",
|
||||
DayOfWeek = x.DayOfWeek,
|
||||
RollCallDateFa = x.RollCallDateFa,
|
||||
DateTimeGr = x.DateTimeGr,
|
||||
IsSliced = isInRange && x.IsSliced,
|
||||
LeaveType = x.LeaveType,
|
||||
IsBirthDay = x.IsBirthDay,
|
||||
IsAbsent = x.IsAbsent,
|
||||
IsFriday = x.IsFriday,
|
||||
EnterDifferencesMinutes1 = isInRange ? x.EnterDifferencesMinutes1 : "",
|
||||
EnterDifferencesMinutes2 = isInRange ? x.EnterDifferencesMinutes2 : "",
|
||||
ExitDifferencesMinutes1 = isInRange ? x.ExitDifferencesMinutes1 : "",
|
||||
ExitDifferencesMinutes2 = isInRange ? x.ExitDifferencesMinutes2 : ""
|
||||
}).ToList();
|
||||
List<WorkshopViewModel> workshopsList = workshopsQuery.Select(x => new WorkshopViewModel
|
||||
{
|
||||
WorkshopFullName = x.WorkshopFullName,
|
||||
Id = x.id
|
||||
}).ToList();
|
||||
List<EmployerViewModel> workshopEmployersList = employersQuery.Select(x => new EmployerViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
FullName = x.FullName
|
||||
}).ToList();
|
||||
//List<LeftWorkViewModel> leftWorksList = leftWorksQuery.Select(x => new LeftWorkViewModel
|
||||
//{
|
||||
// EmployeeId = x.EmployeeId,
|
||||
// WorkshopId = x.WorkshopId,
|
||||
// Id = x.id,
|
||||
// StartWorkDateGr = x.StartWorkDate,
|
||||
// LeftWorkDateGr = x.LeftWorkDate
|
||||
//}).ToList();
|
||||
//List<EmployeeViewModel> employees = employeesQuery.Select(x => new EmployeeViewModel()
|
||||
//{
|
||||
// Id = x.id,
|
||||
// FName = x.FName,
|
||||
// LName = x.LName,
|
||||
// FatherName = x.FatherName,
|
||||
// NationalCode = x.NationalCode,
|
||||
// DateOfBirth = x.DateOfBirth.ToFarsi()
|
||||
//}).ToList();
|
||||
List<PersonnelCodeViewModel> personnelCodeList = personnelCodesQuery.Select(x => new PersonnelCodeViewModel
|
||||
{
|
||||
EmployeeId = x.EmployeeId,
|
||||
WorkshopId = x.WorkshopId,
|
||||
PersonnelCode = Convert.ToInt64(x.PersonnelCode)
|
||||
}).ToList();
|
||||
|
||||
};
|
||||
}).ToList();
|
||||
checkout.PersonnelCode = personnelCodeList.FirstOrDefault(x => x.EmployeeId == checkout.EmployeeId)?.PersonnelCode ?? 0;
|
||||
var date = customizeCheckoutsList.FirstOrDefault();
|
||||
|
||||
}
|
||||
return customizeCheckoutsList.OrderBy(x => x.EmployeeFullName).ToList();
|
||||
if (date == null)
|
||||
return new();
|
||||
|
||||
}
|
||||
var startDate = date.ContractStartGr.Date;
|
||||
var endDate = date.ContractEndGr.AddDays(1).Date.AddTicks(-1);
|
||||
|
||||
public void RemoveEmployeeTemporaryCheckoutInDates(long workshopId, long employeeId, DateTime startOfMonth, DateTime endOfMonth)
|
||||
|
||||
List<PersonnelCheckoutDailyRollCallViewModel> personnelRollCalls = _rollCallRepository
|
||||
.GetEmployeeRollCallsForCustomizeCheckoutTemp(customizeCheckoutsList.Select(x => x.Id).ToList(), workshopId);
|
||||
|
||||
int counter = 1;
|
||||
foreach (var checkout in customizeCheckoutsList)
|
||||
{
|
||||
checkout.EmployeePicture =
|
||||
employeePictures.FirstOrDefault(p => p.Id == checkout.EmployeeId).Picture ?? "";
|
||||
checkout.PrintCounter = counter++;
|
||||
//var leftwork = leftWorksList.FirstOrDefault(x => checkout.WorkshopId == x.WorkshopId && x.EmployeeId == checkout.EmployeeId);
|
||||
//checkout.LeftWorkDateGr = leftwork.LeftWorkDateGr;
|
||||
|
||||
//var employee = employees.FirstOrDefault(x => x.Id == checkout.EmployeeId);
|
||||
var rollCalls = personnelRollCalls.FirstOrDefault(x => x.EmployeeId == checkout.EmployeeId);
|
||||
|
||||
checkout.EmployerList = workshopEmployersList;
|
||||
checkout.EmployerName = workshopEmployersList.FirstOrDefault()?.FullName ?? "-";
|
||||
|
||||
checkout.MonthlyRollCall = rollCalls;
|
||||
checkout.MonthlyRollCall.DailyRollCalls = rollCalls.DailyRollCalls.Select(x =>
|
||||
{
|
||||
var isInRange = x.DateTimeGr >= checkout.ContractStartGr && x.DateTimeGr <= checkout.ContractEndGr;
|
||||
return new CheckoutDailyRollCallViewModel()
|
||||
{
|
||||
StartDate1 = isInRange ? x.StartDate1 : "",
|
||||
EndDate1 = isInRange ? x.EndDate1 : "",
|
||||
EndDate2 = isInRange ? x.EndDate2 : "",
|
||||
StartDate2 = isInRange ? x.StartDate2 : "",
|
||||
TotalWorkingHours = isInRange ? x.TotalWorkingHours : "",
|
||||
DayOfWeek = x.DayOfWeek,
|
||||
RollCallDateFa = x.RollCallDateFa,
|
||||
DateTimeGr = x.DateTimeGr,
|
||||
IsSliced = isInRange && x.IsSliced,
|
||||
LeaveType = x.LeaveType,
|
||||
IsBirthDay = x.IsBirthDay,
|
||||
IsAbsent = x.IsAbsent,
|
||||
IsFriday = x.IsFriday,
|
||||
EnterDifferencesMinutes1 = isInRange ? x.EnterDifferencesMinutes1 : "",
|
||||
EnterDifferencesMinutes2 = isInRange ? x.EnterDifferencesMinutes2 : "",
|
||||
ExitDifferencesMinutes1 = isInRange ? x.ExitDifferencesMinutes1 : "",
|
||||
ExitDifferencesMinutes2 = isInRange ? x.ExitDifferencesMinutes2 : ""
|
||||
|
||||
};
|
||||
}).ToList();
|
||||
checkout.PersonnelCode = personnelCodeList.FirstOrDefault(x => x.EmployeeId == checkout.EmployeeId)?.PersonnelCode ?? 0;
|
||||
|
||||
}
|
||||
return customizeCheckoutsList.OrderBy(x => x.EmployeeFullName).ToList();
|
||||
|
||||
}
|
||||
|
||||
public void RemoveEmployeeTemporaryCheckoutInDates(long workshopId, long employeeId, DateTime startOfMonth, DateTime endOfMonth)
|
||||
{
|
||||
var checkout = _companyContext.CustomizeCheckoutTemps.FirstOrDefault(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId &&
|
||||
x.ContractStart.Date <= endOfMonth.Date && x.ContractEnd.Date >= startOfMonth.Date);
|
||||
|
||||
@@ -2389,9 +2389,12 @@ CreateWorkingHoursTemp command, bool holidayWorking)
|
||||
InstallmentViewModels = loanInstallments,
|
||||
SalaryAidViewModels = salaryAidViewModel,
|
||||
RewardViewModels = rewardViewModels,
|
||||
LateToWorkValue = totalLateToWorkSpan
|
||||
LateToWorkValue = totalLateToWorkSpan,
|
||||
SettingSalary = customizeWorkshopEmployeeSettings.Salary,
|
||||
DailyWage = dailyWage,
|
||||
ShiftStatus = customizeWorkshopEmployeeSettings.WorkshopShiftStatus
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
private CustomizeCheckoutMandatoryViewModel CheckoutWithoutCalculationForKebabMahdi(long workshopId, long employeeId, DateTime contractStart, DateTime contractEnd)
|
||||
@@ -2417,7 +2420,10 @@ CreateWorkingHoursTemp command, bool holidayWorking)
|
||||
return new CustomizeCheckoutMandatoryViewModel()
|
||||
{
|
||||
MonthlySalary = dailyWage * mandatoryDays,
|
||||
};
|
||||
ShiftStatus = customizeWorkshopEmployeeSettings.WorkshopShiftStatus,
|
||||
SettingSalary = customizeWorkshopEmployeeSettings.Salary,
|
||||
DailyWage = dailyWage
|
||||
};
|
||||
}
|
||||
|
||||
private void CreateRewardForBirthDay(long employeeId, long workshopId, double amount, int month, int year,
|
||||
|
||||
@@ -444,7 +444,7 @@
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-flex d-none width10">
|
||||
<div class="Rtable-cell--content align-items-center d-flex d-md-block text-end">
|
||||
<button class="btn-print moreThan992" type="button" onclick="printOne(@item.Id, '@item.Year', '@item.Month')" Permission="@SubAccountPermissionHelper.CreateCustomizeCheckoutTempPermissionCode">
|
||||
<button class="btn-print moreThan992" type="button" onclick="printOne(@item.Id, '@item.Year', '@item.Month')" Permission="@SubAccountPermissionHelper.PrintCustomizeCheckoutTempPermissionCode">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
|
||||
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008"/>
|
||||
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z"/>
|
||||
@@ -453,7 +453,7 @@
|
||||
<path d="M14.5834 5.41732V5.41732C14.5834 3.97799 14.5834 3.25833 14.1954 2.76756C14.1087 2.65791 14.0095 2.55874 13.8998 2.47204C13.4091 2.08398 12.6894 2.08398 11.2501 2.08398H8.75008C7.31076 2.08398 6.5911 2.08398 6.10032 2.47204C5.99068 2.55874 5.8915 2.65791 5.8048 2.76756C5.41675 3.25833 5.41675 3.97799 5.41675 5.41732V5.41732"/>
|
||||
</svg>
|
||||
</button>
|
||||
<button class="btn-print lessThan992" type="button" onclick="printOne(@item.Id, '@item.Year', '@item.Month')" Permission="@SubAccountPermissionHelper.CreateCustomizeCheckoutTempPermissionCode">
|
||||
<button class="btn-print lessThan992" type="button" onclick="printOne(@item.Id, '@item.Year', '@item.Month')" Permission="@SubAccountPermissionHelper.PrintCustomizeCheckoutTempPermissionCode">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
|
||||
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008"/>
|
||||
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z"/>
|
||||
@@ -506,7 +506,7 @@
|
||||
@item.ContractEndFa
|
||||
</div>
|
||||
<div class="Rtable-cell--heading d-flex text-center">
|
||||
<button class="btn-print" type="button" onclick="printOne(@item.Id, '@item.Year', '@item.Month')" Permission="@SubAccountPermissionHelper.CreateCustomizeCheckoutTempPermissionCode">
|
||||
<button class="btn-print" type="button" onclick="printOne(@item.Id, '@item.Year', '@item.Month')" Permission="@SubAccountPermissionHelper.PrintCustomizeCheckoutTempPermissionCode">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 20 20" fill="none" stroke="currentColor">
|
||||
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008"/>
|
||||
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z"/>
|
||||
|
||||
@@ -10,6 +10,7 @@ using System.Security.Claims;
|
||||
using System.Text.RegularExpressions;
|
||||
using _0_Framework.Infrastructure;
|
||||
using CompanyManagment.App.Contracts.Bank;
|
||||
using Microsoft.Extensions.Configuration.UserSecrets;
|
||||
|
||||
namespace ServiceHost.Areas.Client.Pages.Company.CustomizeCheckout
|
||||
{
|
||||
@@ -23,6 +24,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.CustomizeCheckout
|
||||
private readonly IBankApplication _bankApplication;
|
||||
private readonly IPasswordHasher _passwordHasher;
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
|
||||
private readonly long _workshopId;
|
||||
public string WorkshopFullName;
|
||||
@@ -31,7 +33,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.CustomizeCheckout
|
||||
public List<string> YearlyList;
|
||||
|
||||
|
||||
public CheckoutTemporaryModel(IWorkshopApplication workshopApplication, IHttpContextAccessor httpContextAccessor, IYearlySalaryApplication yearlySalaryApplication, IPasswordHasher passwordHasher, ICustomizeCheckoutTempApplication customizeCheckoutTempApplication, IEmployeeApplication employeeApplication, IBankApplication bankApplication)
|
||||
public CheckoutTemporaryModel(IWorkshopApplication workshopApplication, IHttpContextAccessor httpContextAccessor, IYearlySalaryApplication yearlySalaryApplication, IPasswordHasher passwordHasher, ICustomizeCheckoutTempApplication customizeCheckoutTempApplication, IEmployeeApplication employeeApplication, IBankApplication bankApplication, IAuthHelper authHelper)
|
||||
{
|
||||
_workshopApplication = workshopApplication;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
@@ -40,6 +42,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.CustomizeCheckout
|
||||
_customizeCheckoutTempApplication = customizeCheckoutTempApplication;
|
||||
_employeeApplication = employeeApplication;
|
||||
_bankApplication = bankApplication;
|
||||
_authHelper = authHelper;
|
||||
|
||||
var workshopHash = _httpContextAccessor.HttpContext?.User.FindFirstValue("WorkshopSlug");
|
||||
_workshopId = _passwordHasher.SlugDecrypt(workshopHash);
|
||||
@@ -82,6 +85,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.CustomizeCheckout
|
||||
|
||||
public IActionResult OnGetCheckoutList(SearchCustomizeCheckout searchModel)
|
||||
{
|
||||
var permission = _authHelper.GetPermissions();
|
||||
string printPermission = permission.Any(x => x == SubAccountPermissionHelper.PrintCustomizeCheckoutTempPermissionCode) ? "true" : "false";
|
||||
string deletePermission = permission.Any(x => x == SubAccountPermissionHelper.DeleteCustomizeCheckoutTempPermissionCode) ? "true" : "false";
|
||||
searchModel.WorkshopId = _workshopId;
|
||||
var resultData = _customizeCheckoutTempApplication.Search(searchModel).ToList();
|
||||
|
||||
@@ -89,7 +95,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.CustomizeCheckout
|
||||
{
|
||||
success = true,
|
||||
data = resultData,
|
||||
pageIndex = resultData.Count()
|
||||
pageIndex = resultData.Count(),
|
||||
printPermission = printPermission,
|
||||
deletePermission = deletePermission,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -515,7 +515,7 @@
|
||||
<path d="M14.5834 5.41732V5.41732C14.5834 3.97799 14.5834 3.25833 14.1954 2.76756C14.1087 2.65791 14.0095 2.55874 13.8998 2.47204C13.4091 2.08398 12.6894 2.08398 11.2501 2.08398H8.75008C7.31076 2.08398 6.5911 2.08398 6.10032 2.47204C5.99068 2.55874 5.8915 2.65791 5.8048 2.76756C5.41675 3.25833 5.41675 3.97799 5.41675 5.41732V5.41732"/>
|
||||
</svg>
|
||||
</button>
|
||||
<button type="button" class="btn-delete RemoveBtn" data-delete-id="@(item.Id)" Permission="@SubAccountPermissionHelper.DeleteCustomizeCheckoutPermissionCode">
|
||||
<button type="button" class="btn-delete RemoveBtn" data-delete-id="@(item.Id)" Permission="@SubAccountPermissionHelper.DeleteCustomizeCheckoutPermissionCode">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 22 22" fill="none" stroke="currentColor">
|
||||
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-linecap="round" />
|
||||
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-linecap="round" />
|
||||
|
||||
@@ -12,6 +12,7 @@ using System.Security.Cryptography;
|
||||
using System.Text.RegularExpressions;
|
||||
using _0_Framework.Infrastructure;
|
||||
using CompanyManagment.App.Contracts.Bank;
|
||||
using System.Linq;
|
||||
|
||||
namespace ServiceHost.Areas.Client.Pages.Company.CustomizeCheckout;
|
||||
|
||||
@@ -296,6 +297,10 @@ public class CheckoutUnofficialModel : PageModel
|
||||
//}
|
||||
public IActionResult OnGetCustomizeCheckoutsList(SearchCustomizeCheckout searchModel)
|
||||
{
|
||||
var permission = _authHelper.GetPermissions();
|
||||
string printPermission = permission.Any(x=> x == SubAccountPermissionHelper.PrintCustomizeCheckoutPermissionCode) ? "true" : "false";
|
||||
string deletePermission = permission.Any(x => x == SubAccountPermissionHelper.DeleteCustomizeCheckoutPermissionCode) ? "true" : "false";
|
||||
|
||||
var search = new SearchCustomizeCheckout()
|
||||
{
|
||||
WorkshopId = _workshopId,
|
||||
@@ -314,7 +319,9 @@ public class CheckoutUnofficialModel : PageModel
|
||||
{
|
||||
success = true,
|
||||
data = resultData,
|
||||
pageIndex = resultData.Count()
|
||||
pageIndex = resultData.Count(),
|
||||
printPermission = printPermission,
|
||||
deletePermission = deletePermission,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@using _0_Framework.Application
|
||||
@using _0_Framework.Domain.CustomizeCheckoutShared.Enums
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@model CompanyManagment.App.Contracts.CustomizeCheckout.CustomizeCheckoutViewModel
|
||||
|
||||
@@ -14,7 +15,7 @@
|
||||
.trTable:nth-child(even) {
|
||||
background-color: #f1f1f1 !important;
|
||||
}
|
||||
|
||||
|
||||
.table-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
@@ -57,10 +58,21 @@
|
||||
<div class="row" dir="rtl">
|
||||
<div class="col-3 d-inline-block"><fieldset style="border: 1px solid black; border-radius: 15px; padding: 1px 15px 1px 15px; margin-top: 5px; width: 60%; font-size: 12px; text-align: center;"> @Model.ContractNo</fieldset></div>
|
||||
<div class="col-6 d-inline-block text-center">
|
||||
<p style="margin-top: 10px !important; font-size: 18px; font-family: 'IranNastaliq' !important;">بسمه تعالی</p>
|
||||
<p style="font-size: 15px; font-weight: bold">فیش حقوقی غیر رسمی موقت</p>
|
||||
<p style="margin-top: 5px !important;font-size: 18px;font-family: 'IranNastaliq' !important;margin-bottom: 5px;">بسمه تعالی</p>
|
||||
<p style="font-size: 15px; font-weight: bold;margin: 12px 0 -12px 0;">فیش حقوقی غیر رسمی موقت</p>
|
||||
</div>
|
||||
<div class="col-3 d-inline-block">
|
||||
<div style="width: 55px; height: 62px; margin: 3px auto -5px 0; border: 1px solid #999; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center;">
|
||||
@if (string.IsNullOrWhiteSpace(Model.EmployeePicture))
|
||||
{
|
||||
<span>عکس</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<img style="width: 100%;" src="data:image/jpeg;base64,@Model.EmployeePicture" alt="عکس" />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 d-inline-block"></div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top: 10px; padding: 0 12px;">
|
||||
@@ -68,21 +80,50 @@
|
||||
<div class="col-12" style="border: 1px solid #000; border-radius: 10px; padding: 7px;">
|
||||
<table class="w-100">
|
||||
<tr>
|
||||
<td style="width: 40%;font-size: 12px">نام مجموعه: @Model.WorkshopName</td>
|
||||
<td style="width: 40%;font-size: 12px">نام کارفرما: @Model.EmployerName</td>
|
||||
<td rowspan="3" style="width: 20%; text-align: left; font-size: 12px">
|
||||
<div style="width: 55px; height: 60px; margin: 0 auto 0 0; border: 1px solid #999; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center;">
|
||||
عکس
|
||||
</div>
|
||||
<td style="width: 30%;font-size: 10px;font-weight: bold;">نام مجموعه: @Model.WorkshopName</td>
|
||||
<td style="width: 30%;font-size: 10px;font-weight: bold;">نام کارفرما: @Model.EmployerName</td>
|
||||
<td style="width: 30%; font-size: 10px;font-weight: bold;">
|
||||
حقوق ماهانه: @Model.SettingSalary ریال (روزانه: @Model.DailyWage ریال)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 12px">نام پرسنل: @(Model.EmployeeFName + ' ' + Model.EmployeeLName)</td>
|
||||
<td style="font-size: 12px">کد ملی پرسنل: @Model.NationalCode</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">نام پرسنل: @(Model.EmployeeFName + ' ' + Model.EmployeeLName)</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">کد ملی پرسنل: @Model.NationalCode</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">نوع شیفت:
|
||||
@if (Model.ShiftStatus == WorkshopShiftStatus.Regular)
|
||||
{
|
||||
<span>منظم</span>
|
||||
}
|
||||
else if (Model.ShiftStatus == WorkshopShiftStatus.Irregular)
|
||||
{
|
||||
<span>مختلط</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>چرخشی</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 12px">فیش حقوقی: سال @Model.Year</td>
|
||||
<td style="font-size: 12px">ماه @Model.Month</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">فیش حقوقی: سال @Model.Year</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">ماه @Model.Month</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">
|
||||
@* @if (Model.ShiftStatus == WorkshopShiftStatus.Irregular)
|
||||
{
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 66.666667%;">12 ساعت کار 24 ساعت استراحت</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 33.333333%;">17:00 الی 00:30</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">09:00 الی 17:00</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">17:00 الی 00:30</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div>
|
||||
</div>
|
||||
} *@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@using _0_Framework.Application
|
||||
@using _0_Framework.Domain.CustomizeCheckoutShared.Enums
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@model CompanyManagment.App.Contracts.CustomizeCheckout.CustomizeCheckoutViewModel
|
||||
|
||||
@@ -55,39 +56,80 @@
|
||||
<div class="row">
|
||||
<div class="col-12 mt-30">
|
||||
<fieldset id="printSize" style="border: 1px solid black;padding: revert;border-radius: 10px; height: 28cm; margin: 3mm 5mm 0 5mm; ">
|
||||
<div class="row" dir="rtl">
|
||||
<div class="col-3 d-inline-block"><fieldset style="border: 1px solid black; border-radius: 15px; padding: 1px 15px 1px 15px; margin-top: 5px; width: 60%; font-size: 12px; text-align: center;"> @Model.ContractNo</fieldset></div>
|
||||
<div class="col-6 d-inline-block text-center">
|
||||
<p style="margin-top: 10px !important; font-size: 18px; font-family: 'IranNastaliq' !important;">بسمه تعالی</p>
|
||||
<p style="font-size: 15px; font-weight: bold">فیش حقوقی غیر رسمی نهائی</p>
|
||||
</div>
|
||||
<div class="col-3 d-inline-block"></div>
|
||||
</div>
|
||||
<div class="row" dir="rtl">
|
||||
<div class="col-3 d-inline-block"><fieldset style="border: 1px solid black; border-radius: 15px; padding: 1px 15px 1px 15px; margin-top: 5px; width: 60%; font-size: 12px; text-align: center;"> @Model.ContractNo</fieldset></div>
|
||||
<div class="col-6 d-inline-block text-center">
|
||||
<p style="margin-top: 5px !important;font-size: 18px;font-family: 'IranNastaliq' !important;margin-bottom: 5px;">بسمه تعالی</p>
|
||||
<p style="font-size: 15px; font-weight: bold;margin: 12px 0 -12px 0;">فیش حقوقی غیر رسمی نهایی</p>
|
||||
</div>
|
||||
<div class="col-3 d-inline-block">
|
||||
<div style="width: 55px; height: 62px; margin: 3px auto -5px 0; border: 1px solid #999; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center;">
|
||||
@if (string.IsNullOrWhiteSpace(Model.EmployeePicture))
|
||||
{
|
||||
<span>عکس</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<img style="width: 100%;" src="data:image/jpeg;base64,@Model.EmployeePicture" alt="عکس" />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top: 10px; padding: 0 12px;">
|
||||
<span style="font-size: 14px; margin: -24px 0 0 0;">شماره پرسنلی: @Model.PersonnelCode</span>
|
||||
<div class="col-12" style="border: 1px solid #000; border-radius: 10px; padding: 7px;">
|
||||
<table class="w-100">
|
||||
<tr>
|
||||
<td style="width: 40%;font-size: 12px">نام مجموعه: @Model.WorkshopName</td>
|
||||
<td style="width: 40%;font-size: 12px">نام کارفرما: @Model.EmployerName</td>
|
||||
<td rowspan="3" style="width: 20%; text-align: left; font-size: 12px">
|
||||
<div style="width: 55px; height: 60px; margin: 0 auto 0 0; border: 1px solid #999; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center;">
|
||||
عکس
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 12px">نام پرسنل: @(Model.EmployeeFName + ' ' + Model.EmployeeLName)</td>
|
||||
<td style="font-size: 12px">کد ملی پرسنل: @Model.NationalCode</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 12px">فیش حقوقی: سال @Model.Year</td>
|
||||
<td style="font-size: 12px">ماه @Model.Month</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<span style="font-size: 14px; margin: -24px 0 0 0;">شماره پرسنلی: @Model.PersonnelCode</span>
|
||||
<div class="col-12" style="border: 1px solid #000; border-radius: 10px; padding: 7px;">
|
||||
<table class="w-100">
|
||||
<tr>
|
||||
<td style="width: 30%;font-size: 10px;font-weight: bold;">نام مجموعه: @Model.WorkshopName</td>
|
||||
<td style="width: 30%;font-size: 10px;font-weight: bold;">نام کارفرما: @Model.EmployerName</td>
|
||||
<td style="width: 30%; font-size: 10px;font-weight: bold;">
|
||||
حقوق ماهانه: @Model.SettingSalary ریال (روزانه: @Model.DailyWage ریال)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 10px;font-weight: bold;">نام پرسنل: @(Model.EmployeeFName + ' ' + Model.EmployeeLName)</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">کد ملی پرسنل: @Model.NationalCode</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">
|
||||
نوع شیفت:
|
||||
@if (Model.ShiftStatus == WorkshopShiftStatus.Regular)
|
||||
{
|
||||
<span>منظم</span>
|
||||
}
|
||||
else if (Model.ShiftStatus == WorkshopShiftStatus.Irregular)
|
||||
{
|
||||
<span>مختلط</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>چرخشی</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 10px;font-weight: bold;">فیش حقوقی: سال @Model.Year</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">ماه @Model.Month</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">
|
||||
@* @if (Model.ShiftStatus == WorkshopShiftStatus.Irregular)
|
||||
{
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 66.666667%;">12 ساعت کار 24 ساعت استراحت</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 33.333333%;">17:00 الی 00:30</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">09:00 الی 17:00</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">17:00 الی 00:30</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div>
|
||||
</div>
|
||||
} *@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" style="margin-top: 10px;padding: 0 12px;">
|
||||
@@ -447,7 +489,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.EnterDifferencesMinutes2</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 !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>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
@using _0_Framework.Application
|
||||
@using _0_Framework.Domain.CustomizeCheckoutShared.Enums
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@model CompanyManagment.App.Contracts.CustomizeCheckout.CustomizeCheckoutViewModel
|
||||
|
||||
@{
|
||||
@@ -32,10 +34,21 @@
|
||||
<div class="row" dir="rtl">
|
||||
<div class="col-3 d-inline-block"><fieldset style="border: 1px solid black; border-radius: 15px; padding: 1px 15px 1px 15px; margin-top: 5px; width: 60%; font-size: 12px; text-align: center;"> @Model.ContractNo</fieldset></div>
|
||||
<div class="col-6 d-inline-block text-center">
|
||||
<p style="margin-top: 10px !important; font-size: 18px; font-family: 'IranNastaliq' !important;">بسمه تعالی</p>
|
||||
<p style="font-size: 15px; font-weight: bold">فیش حقوقی غیر رسمی موقت</p>
|
||||
<p style="margin-top: 5px !important;font-size: 18px;font-family: 'IranNastaliq' !important;margin-bottom: 5px;">بسمه تعالی</p>
|
||||
<p style="font-size: 15px; font-weight: bold;margin: 12px 0 -12px 0;">فیش حقوقی غیر رسمی موقت</p>
|
||||
</div>
|
||||
<div class="col-3 d-inline-block">
|
||||
<div style="width: 55px; height: 62px; margin: 3px auto -5px 0; border: 1px solid #999; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center;">
|
||||
@if (string.IsNullOrWhiteSpace(Model.EmployeePicture))
|
||||
{
|
||||
<span>عکس</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<img style="width: 100%;" src="data:image/jpeg;base64,@Model.EmployeePicture" alt="عکس" />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 d-inline-block"></div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top: 10px; padding: 0 12px;">
|
||||
@@ -43,21 +56,51 @@
|
||||
<div class="col-12" style="border: 1px solid #000; border-radius: 10px; padding: 7px;">
|
||||
<table class="w-100">
|
||||
<tr>
|
||||
<td style="width: 40%;font-size: 12px">نام مجموعه: @Model.WorkshopName</td>
|
||||
<td style="width: 40%;font-size: 12px">نام کارفرما: @Model.EmployerName</td>
|
||||
<td rowspan="3" style="width: 20%; text-align: left; font-size: 12px">
|
||||
<div style="width: 55px; height: 60px; margin: 0 auto 0 0; border: 1px solid #999; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center;">
|
||||
عکس
|
||||
</div>
|
||||
<td style="width: 30%;font-size: 10px;font-weight: bold;">نام مجموعه: @Model.WorkshopName</td>
|
||||
<td style="width: 30%;font-size: 10px;font-weight: bold;">نام کارفرما: @Model.EmployerName</td>
|
||||
<td style="width: 30%; font-size: 10px;font-weight: bold;">
|
||||
حقوق ماهانه: @Model.SettingSalary ریال (روزانه: @Model.DailyWage ریال)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 12px">نام پرسنل: @(Model.EmployeeFName + ' ' + Model.EmployeeLName)</td>
|
||||
<td style="font-size: 12px">کد ملی پرسنل: @Model.NationalCode</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">نام پرسنل: @(Model.EmployeeFName + ' ' + Model.EmployeeLName)</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">کد ملی پرسنل: @Model.NationalCode</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">
|
||||
نوع شیفت:
|
||||
@if (Model.ShiftStatus == WorkshopShiftStatus.Regular)
|
||||
{
|
||||
<span>منظم</span>
|
||||
}
|
||||
else if (Model.ShiftStatus == WorkshopShiftStatus.Irregular)
|
||||
{
|
||||
<span>مختلط</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>چرخشی</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 12px">فیش حقوقی: سال @Model.Year</td>
|
||||
<td style="font-size: 12px">ماه @Model.Month</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">فیش حقوقی: سال @Model.Year</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">ماه @Model.Month</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">
|
||||
@* @if (Model.ShiftStatus == WorkshopShiftStatus.Irregular)
|
||||
{
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 66.666667%;">12 ساعت کار 24 ساعت استراحت</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 33.333333%;">17:00 الی 00:30</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">09:00 الی 17:00</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">17:00 الی 00:30</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div>
|
||||
</div>
|
||||
} *@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
@using _0_Framework.Application
|
||||
@using _0_Framework.Domain.CustomizeCheckoutShared.Enums
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@model CompanyManagment.App.Contracts.CustomizeCheckout.CustomizeCheckoutViewModel
|
||||
@{
|
||||
<style>
|
||||
@@ -31,10 +33,21 @@
|
||||
<div class="row" dir="rtl">
|
||||
<div class="col-3 d-inline-block"><fieldset style="border: 1px solid black; border-radius: 15px; padding: 1px 15px 1px 15px; margin-top: 5px; width: 60%; font-size: 12px; text-align: center;"> @Model.ContractNo</fieldset></div>
|
||||
<div class="col-6 d-inline-block text-center">
|
||||
<p style="margin-top: 10px !important; font-size: 18px; font-family: 'IranNastaliq' !important;">بسمه تعالی</p>
|
||||
<p style="font-size: 15px; font-weight: bold">فیش حقوقی غیر رسمی نهایی</p>
|
||||
<p style="margin-top: 5px !important;font-size: 18px;font-family: 'IranNastaliq' !important;margin-bottom: 5px;">بسمه تعالی</p>
|
||||
<p style="font-size: 15px; font-weight: bold;margin: 12px 0 -12px 0;">فیش حقوقی غیر رسمی نهایی</p>
|
||||
</div>
|
||||
<div class="col-3 d-inline-block">
|
||||
<div style="width: 55px; height: 62px; margin: 3px auto -5px 0; border: 1px solid #999; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center;">
|
||||
@if (string.IsNullOrWhiteSpace(Model.EmployeePicture))
|
||||
{
|
||||
<span>عکس</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<img style="width: 100%;" src="data:image/jpeg;base64,@Model.EmployeePicture" alt="عکس" />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 d-inline-block"></div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top: 10px; padding: 0 12px;">
|
||||
@@ -42,21 +55,51 @@
|
||||
<div class="col-12" style="border: 1px solid #000; border-radius: 10px; padding: 7px;">
|
||||
<table class="w-100">
|
||||
<tr>
|
||||
<td style="width: 40%;font-size: 12px">نام مجموعه: @Model.WorkshopName</td>
|
||||
<td style="width: 40%;font-size: 12px">نام کارفرما: @Model.EmployerName</td>
|
||||
<td rowspan="3" style="width: 20%; text-align: left; font-size: 12px">
|
||||
<div style="width: 55px; height: 60px; margin: 0 auto 0 0; border: 1px solid #999; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center;">
|
||||
عکس
|
||||
</div>
|
||||
<td style="width: 30%;font-size: 10px;font-weight: bold;">نام مجموعه: @Model.WorkshopName</td>
|
||||
<td style="width: 30%;font-size: 10px;font-weight: bold;">نام کارفرما: @Model.EmployerName</td>
|
||||
<td style="width: 30%; font-size: 10px;font-weight: bold;">
|
||||
حقوق ماهانه: @Model.SettingSalary ریال (روزانه: @Model.DailyWage ریال)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 12px">نام پرسنل: @(Model.EmployeeFName + ' ' + Model.EmployeeLName)</td>
|
||||
<td style="font-size: 12px">کد ملی پرسنل: @Model.NationalCode</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">نام پرسنل: @(Model.EmployeeFName + ' ' + Model.EmployeeLName)</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">کد ملی پرسنل: @Model.NationalCode</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">
|
||||
نوع شیفت:
|
||||
@if (Model.ShiftStatus == WorkshopShiftStatus.Regular)
|
||||
{
|
||||
<span>منظم</span>
|
||||
}
|
||||
else if (Model.ShiftStatus == WorkshopShiftStatus.Irregular)
|
||||
{
|
||||
<span>مختلط</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>چرخشی</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 12px">فیش حقوقی: سال @Model.Year</td>
|
||||
<td style="font-size: 12px">ماه @Model.Month</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">فیش حقوقی: سال @Model.Year</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">ماه @Model.Month</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">
|
||||
@* @if (Model.ShiftStatus == WorkshopShiftStatus.Irregular)
|
||||
{
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 66.666667%;">12 ساعت کار 24 ساعت استراحت</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 33.333333%;">17:00 الی 00:30</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">09:00 الی 17:00</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">17:00 الی 00:30</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div>
|
||||
</div>
|
||||
} *@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -419,7 +462,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.EnterDifferencesMinutes2</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 !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>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 196 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 195 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.6 KiB |
@@ -15,10 +15,10 @@
|
||||
//"MesbahDb": "Data Source=171.22.24.15;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]is[3019]#@ATt;TrustServerCertificate=true;"
|
||||
|
||||
//local
|
||||
"MesbahDb": "Data Source=.;Initial Catalog=mesbah_db;Integrated Security=True;TrustServerCertificate=true;"
|
||||
//"MesbahDb": "Data Source=.;Initial Catalog=mesbah_db;Integrated Security=True;TrustServerCertificate=true;"
|
||||
|
||||
//mahan Docker
|
||||
//"MesbahDb": "Data Source=localhost,5069;Initial Catalog=mesbah_db;User ID=sa;Password=YourPassword123;TrustServerCertificate=True;"
|
||||
"MesbahDb": "Data Source=localhost,5069;Initial Catalog=mesbah_db;User ID=sa;Password=YourPassword123;TrustServerCertificate=True;"
|
||||
},
|
||||
"GoogleRecaptchaV3": {
|
||||
"SiteKey": "6Lfhp_AnAAAAAB79WkrMoHd1k8ir4m8VvfjE7FTH",
|
||||
|
||||
@@ -1486,41 +1486,45 @@ function loadMore() {
|
||||
${item.contractEndFa}
|
||||
</div>
|
||||
<div class="Rtable-cell--heading d-flex text-center">
|
||||
<button class="btn-print" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 20 20" fill="none" stroke="currentColor">
|
||||
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008" />
|
||||
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z" />
|
||||
<path d="M7.91675 11.25L11.2501 11.25" stroke-linecap="round" />
|
||||
<path d="M7.91675 13.75L12.0834 13.75" stroke-linecap="round" />
|
||||
<path d="M14.5834 5.41732V5.41732C14.5834 3.97799 14.5834 3.25833 14.1954 2.76756C14.1087 2.65791 14.0095 2.55874 13.8998 2.47204C13.4091 2.08398 12.6894 2.08398 11.2501 2.08398H8.75008C7.31076 2.08398 6.5911 2.08398 6.10032 2.47204C5.99068 2.55874 5.8915 2.65791 5.8048 2.76756C5.41675 3.25833 5.41675 3.97799 5.41675 5.41732V5.41732" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<button type="button" class="btn-delete RemoveBtn" data-delete-id="${item.id}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 22 22" fill="none" stroke="currentColor">
|
||||
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-linecap="round" />
|
||||
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-linecap="round" />
|
||||
<path d="M2.75 5.9585H19.25V5.9585C18.122 5.9585 17.558 5.9585 17.1279 6.17946C16.7561 6.3704 16.4536 6.67297 16.2626 7.04469C16.0417 7.47488 16.0417 8.03886 16.0417 9.16683V13.8752C16.0417 15.7608 16.0417 16.7036 15.4559 17.2894C14.8701 17.8752 13.9273 17.8752 12.0417 17.8752H9.95833C8.07271 17.8752 7.12991 17.8752 6.54412 17.2894C5.95833 16.7036 5.95833 15.7608 5.95833 13.8752V9.16683C5.95833 8.03886 5.95833 7.47488 5.73737 7.04469C5.54643 6.67297 5.24386 6.3704 4.87214 6.17946C4.44195 5.9585 3.87797 5.9585 2.75 5.9585V5.9585Z" stroke-linecap="round" />
|
||||
<path d="M8.70841 3.20839C8.70841 3.20839 9.16675 2.2915 11.0001 2.2915C12.8334 2.2915 13.2917 3.20817 13.2917 3.20817" stroke-linecap="round" />
|
||||
</svg>
|
||||
<span class="mx-1">حذف</span>
|
||||
</button>
|
||||
${response.printPermission === "true" ? `
|
||||
|
||||
<button class="btn-print" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 20 20" fill="none" stroke="currentColor">
|
||||
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008" />
|
||||
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z" />
|
||||
<path d="M7.91675 11.25L11.2501 11.25" stroke-linecap="round" />
|
||||
<path d="M7.91675 13.75L12.0834 13.75" stroke-linecap="round" />
|
||||
<path d="M14.5834 5.41732V5.41732C14.5834 3.97799 14.5834 3.25833 14.1954 2.76756C14.1087 2.65791 14.0095 2.55874 13.8998 2.47204C13.4091 2.08398 12.6894 2.08398 11.2501 2.08398H8.75008C7.31076 2.08398 6.5911 2.08398 6.10032 2.47204C5.99068 2.55874 5.8915 2.65791 5.8048 2.76756C5.41675 3.25833 5.41675 3.97799 5.41675 5.41732V5.41732" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
|
||||
` : ``}
|
||||
|
||||
${response.deletePermission === "true" ? `
|
||||
|
||||
<button type="button" class="btn-delete RemoveBtn" data-delete-id="${item.id}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 22 22" fill="none" stroke="currentColor">
|
||||
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-linecap="round" />
|
||||
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-linecap="round" />
|
||||
<path d="M2.75 5.9585H19.25V5.9585C18.122 5.9585 17.558 5.9585 17.1279 6.17946C16.7561 6.3704 16.4536 6.67297 16.2626 7.04469C16.0417 7.47488 16.0417 8.03886 16.0417 9.16683V13.8752C16.0417 15.7608 16.0417 16.7036 15.4559 17.2894C14.8701 17.8752 13.9273 17.8752 12.0417 17.8752H9.95833C8.07271 17.8752 7.12991 17.8752 6.54412 17.2894C5.95833 16.7036 5.95833 15.7608 5.95833 13.8752V9.16683C5.95833 8.03886 5.95833 7.47488 5.73737 7.04469C5.54643 6.67297 5.24386 6.3704 4.87214 6.17946C4.44195 5.9585 3.87797 5.9585 2.75 5.9585V5.9585Z" stroke-linecap="round" />
|
||||
<path d="M8.70841 3.20839C8.70841 3.20839 9.16675 2.2915 11.0001 2.2915C12.8334 2.2915 13.2917 3.20817 13.2917 3.20817" stroke-linecap="round" />
|
||||
</svg>
|
||||
<span class="mx-1">حذف</span>
|
||||
</button>
|
||||
|
||||
` : ``}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell d-md-flex d-none width10">
|
||||
<div class="Rtable-cell--content align-items-center d-flex d-md-block text-end">
|
||||
<button class="btn-print moreThan992" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
|
||||
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008" />
|
||||
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z" />
|
||||
<path d="M7.91675 11.25L11.2501 11.25" stroke-linecap="round" />
|
||||
<path d="M7.91675 13.75L12.0834 13.75" stroke-linecap="round" />
|
||||
<path d="M14.5834 5.41732V5.41732C14.5834 3.97799 14.5834 3.25833 14.1954 2.76756C14.1087 2.65791 14.0095 2.55874 13.8998 2.47204C13.4091 2.08398 12.6894 2.08398 11.2501 2.08398H8.75008C7.31076 2.08398 6.5911 2.08398 6.10032 2.47204C5.99068 2.55874 5.8915 2.65791 5.8048 2.76756C5.41675 3.25833 5.41675 3.97799 5.41675 5.41732V5.41732" />
|
||||
</svg>
|
||||
</button>
|
||||
<button class="btn-print lessThan992" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
|
||||
${response.printPermission === "true" ? `
|
||||
|
||||
<button class="btn-print moreThan992" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
|
||||
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008" />
|
||||
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z" />
|
||||
@@ -1530,7 +1534,20 @@ function loadMore() {
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<button type="button" class="btn-delete RemoveBtn" data-delete-id="${item.id}">
|
||||
<button class="btn-print lessThan992" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
|
||||
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008" />
|
||||
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z" />
|
||||
<path d="M7.91675 11.25L11.2501 11.25" stroke-linecap="round" />
|
||||
<path d="M7.91675 13.75L12.0834 13.75" stroke-linecap="round" />
|
||||
<path d="M14.5834 5.41732V5.41732C14.5834 3.97799 14.5834 3.25833 14.1954 2.76756C14.1087 2.65791 14.0095 2.55874 13.8998 2.47204C13.4091 2.08398 12.6894 2.08398 11.2501 2.08398H8.75008C7.31076 2.08398 6.5911 2.08398 6.10032 2.47204C5.99068 2.55874 5.8915 2.65791 5.8048 2.76756C5.41675 3.25833 5.41675 3.97799 5.41675 5.41732V5.41732" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
` : ``}
|
||||
${response.deletePermission === "true" ? `
|
||||
|
||||
<button type="button" class="btn-delete RemoveBtn" data-delete-id="${item.id}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
|
||||
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-linecap="round" />
|
||||
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-linecap="round" />
|
||||
@@ -1539,6 +1556,11 @@ function loadMore() {
|
||||
</svg>
|
||||
<span class="mx-1">حذف</span>
|
||||
</button>
|
||||
|
||||
` : ``}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
let $checkAll = $("#checkAll2");
|
||||
let $checkboxes = $(".foo");
|
||||
|
||||
|
||||
|
||||
|
||||
$checkAll.on("change", function () {
|
||||
$checkboxes.prop("checked", this.checked);
|
||||
@@ -150,7 +150,7 @@ $(document).on('click', '.btn-search-click', function (event) {
|
||||
const selectedMonth = $('#sendDropdownMonth').val();
|
||||
const isYearMonthSelected = selectedYear === "0" && selectedMonth === "0";
|
||||
|
||||
if (!isYearMonthSelected && (selectedYear === "0" || selectedMonth === "0") ) {
|
||||
if (!isYearMonthSelected && (selectedYear === "0" || selectedMonth === "0")) {
|
||||
$('#dropdown-year').addClass("errored");
|
||||
$('#dropdown-month').addClass("errored");
|
||||
|
||||
@@ -175,7 +175,7 @@ $(document).on('click', '.btn-search-click', function (event) {
|
||||
const endDate = $('.end-date').val();
|
||||
const isStartEndDateSelected = startDate.trim() === "" && endDate.trim() === "";
|
||||
|
||||
if (!isStartEndDateSelected && (startDate.trim() === "" || endDate.trim() === "") ) {
|
||||
if (!isStartEndDateSelected && (startDate.trim() === "" || endDate.trim() === "")) {
|
||||
$('.start-date').addClass("errored");
|
||||
$('.end-date').addClass("errored");
|
||||
|
||||
@@ -223,7 +223,7 @@ $(document).ready(function () {
|
||||
} else {
|
||||
$('.btn-clear-filter').addClass('disable');
|
||||
}
|
||||
if(filterStart !== '') {
|
||||
if (filterStart !== '') {
|
||||
$('#start-date').text(filterStart);
|
||||
}
|
||||
if (filterEnd !== '') {
|
||||
@@ -1447,7 +1447,7 @@ function loadMore() {
|
||||
<div class="Rtable-cell--content ${item.salaryAidDeduction === "0" ? "" : "textRed"}">${item.salaryAidDeduction}</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-flex d-none width9">
|
||||
<div class="${item.totalPaymentD < 0 ? "bgColorMonthlySalaryMinus" : "bgColorMonthlySalaryPlus" }">
|
||||
<div class="${item.totalPaymentD < 0 ? "bgColorMonthlySalaryMinus" : "bgColorMonthlySalaryPlus"}">
|
||||
<div class="Rtable-cell--heading">مبلغ قابل پرداخت</div>
|
||||
<div class="Rtable-cell--content ">${item.totalPayment} ریال</div>
|
||||
</div>
|
||||
@@ -1481,41 +1481,43 @@ function loadMore() {
|
||||
${item.contractEndFa}
|
||||
</div>
|
||||
<div class="Rtable-cell--heading d-flex text-center">
|
||||
<button class="btn-print" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 20 20" fill="none" stroke="currentColor">
|
||||
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008" />
|
||||
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z" />
|
||||
<path d="M7.91675 11.25L11.2501 11.25" stroke-linecap="round" />
|
||||
<path d="M7.91675 13.75L12.0834 13.75" stroke-linecap="round" />
|
||||
<path d="M14.5834 5.41732V5.41732C14.5834 3.97799 14.5834 3.25833 14.1954 2.76756C14.1087 2.65791 14.0095 2.55874 13.8998 2.47204C13.4091 2.08398 12.6894 2.08398 11.2501 2.08398H8.75008C7.31076 2.08398 6.5911 2.08398 6.10032 2.47204C5.99068 2.55874 5.8915 2.65791 5.8048 2.76756C5.41675 3.25833 5.41675 3.97799 5.41675 5.41732V5.41732" />
|
||||
</svg>
|
||||
</button>
|
||||
${response.printPermission === "true" ? `
|
||||
|
||||
<button type="button" class="btn-delete RemoveBtn" data-delete-id="${item.id}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 22 22" fill="none" stroke="currentColor">
|
||||
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-linecap="round" />
|
||||
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-linecap="round" />
|
||||
<path d="M2.75 5.9585H19.25V5.9585C18.122 5.9585 17.558 5.9585 17.1279 6.17946C16.7561 6.3704 16.4536 6.67297 16.2626 7.04469C16.0417 7.47488 16.0417 8.03886 16.0417 9.16683V13.8752C16.0417 15.7608 16.0417 16.7036 15.4559 17.2894C14.8701 17.8752 13.9273 17.8752 12.0417 17.8752H9.95833C8.07271 17.8752 7.12991 17.8752 6.54412 17.2894C5.95833 16.7036 5.95833 15.7608 5.95833 13.8752V9.16683C5.95833 8.03886 5.95833 7.47488 5.73737 7.04469C5.54643 6.67297 5.24386 6.3704 4.87214 6.17946C4.44195 5.9585 3.87797 5.9585 2.75 5.9585V5.9585Z" stroke-linecap="round" />
|
||||
<path d="M8.70841 3.20839C8.70841 3.20839 9.16675 2.2915 11.0001 2.2915C12.8334 2.2915 13.2917 3.20817 13.2917 3.20817" stroke-linecap="round" />
|
||||
</svg>
|
||||
<span class="mx-1">حذف</span>
|
||||
</button>
|
||||
<button class="btn-print" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 20 20" fill="none" stroke="currentColor">
|
||||
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008" />
|
||||
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z" />
|
||||
<path d="M7.91675 11.25L11.2501 11.25" stroke-linecap="round" />
|
||||
<path d="M7.91675 13.75L12.0834 13.75" stroke-linecap="round" />
|
||||
<path d="M14.5834 5.41732V5.41732C14.5834 3.97799 14.5834 3.25833 14.1954 2.76756C14.1087 2.65791 14.0095 2.55874 13.8998 2.47204C13.4091 2.08398 12.6894 2.08398 11.2501 2.08398H8.75008C7.31076 2.08398 6.5911 2.08398 6.10032 2.47204C5.99068 2.55874 5.8915 2.65791 5.8048 2.76756C5.41675 3.25833 5.41675 3.97799 5.41675 5.41732V5.41732" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
|
||||
` : ``}
|
||||
${response.deletePermission === "true" ? `
|
||||
<button type="button" class="btn-delete RemoveBtn" data-delete-id="${item.id}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 22 22" fill="none" stroke="currentColor">
|
||||
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-linecap="round" />
|
||||
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-linecap="round" />
|
||||
<path d="M2.75 5.9585H19.25V5.9585C18.122 5.9585 17.558 5.9585 17.1279 6.17946C16.7561 6.3704 16.4536 6.67297 16.2626 7.04469C16.0417 7.47488 16.0417 8.03886 16.0417 9.16683V13.8752C16.0417 15.7608 16.0417 16.7036 15.4559 17.2894C14.8701 17.8752 13.9273 17.8752 12.0417 17.8752H9.95833C8.07271 17.8752 7.12991 17.8752 6.54412 17.2894C5.95833 16.7036 5.95833 15.7608 5.95833 13.8752V9.16683C5.95833 8.03886 5.95833 7.47488 5.73737 7.04469C5.54643 6.67297 5.24386 6.3704 4.87214 6.17946C4.44195 5.9585 3.87797 5.9585 2.75 5.9585V5.9585Z" stroke-linecap="round" />
|
||||
<path d="M8.70841 3.20839C8.70841 3.20839 9.16675 2.2915 11.0001 2.2915C12.8334 2.2915 13.2917 3.20817 13.2917 3.20817" stroke-linecap="round" />
|
||||
</svg>
|
||||
<span class="mx-1">حذف</span>
|
||||
</button>
|
||||
|
||||
` : ``}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell d-md-flex d-none width10">
|
||||
<div class="Rtable-cell--content align-items-center d-flex d-md-block text-end">
|
||||
<button class="btn-print moreThan992" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
|
||||
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008" />
|
||||
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z" />
|
||||
<path d="M7.91675 11.25L11.2501 11.25" stroke-linecap="round" />
|
||||
<path d="M7.91675 13.75L12.0834 13.75" stroke-linecap="round" />
|
||||
<path d="M14.5834 5.41732V5.41732C14.5834 3.97799 14.5834 3.25833 14.1954 2.76756C14.1087 2.65791 14.0095 2.55874 13.8998 2.47204C13.4091 2.08398 12.6894 2.08398 11.2501 2.08398H8.75008C7.31076 2.08398 6.5911 2.08398 6.10032 2.47204C5.99068 2.55874 5.8915 2.65791 5.8048 2.76756C5.41675 3.25833 5.41675 3.97799 5.41675 5.41732V5.41732" />
|
||||
</svg>
|
||||
</button>
|
||||
<button class="btn-print lessThan992" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
|
||||
${response.printPermission === "true" ? `
|
||||
|
||||
<button class="btn-print moreThan992" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
|
||||
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008" />
|
||||
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z" />
|
||||
@@ -1525,6 +1527,10 @@ function loadMore() {
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
|
||||
` : ``}
|
||||
${response.deletePermission === "true" ? `
|
||||
|
||||
<button type="button" class="btn-delete RemoveBtn" data-delete-id="${item.id}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
|
||||
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-linecap="round" />
|
||||
@@ -1534,6 +1540,11 @@ function loadMore() {
|
||||
</svg>
|
||||
<span class="mx-1">حذف</span>
|
||||
</button>
|
||||
|
||||
|
||||
` : ``}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user