Compare commits

...

15 Commits

Author SHA1 Message Date
0303f04ae3 delete employee picture in select 2025-03-30 19:22:01 +03:30
3e56d31ff2 fix missed Items 2025-03-30 19:19:55 +03:30
d5d0634807 revert back 2025-03-30 19:19:34 +03:30
SamSys
e2d06d8f7e add injection 2025-03-30 18:44:09 +03:30
SamSys
44a0a2df86 merge from master 2025-03-30 18:40:03 +03:30
SamSys
ee5e608581 add somthing again 2025-03-30 18:36:08 +03:30
SamSys
6583706db6 Print & delet Permission Customizechekout ajax ug fixed 2025-03-30 18:33:51 +03:30
bf5f416470 Merge branch 'Feature/Customize-Checkout-Header' of https://github.com/syntax24/OriginalGozareshgir into Feature/Customize-Checkout-Header 2025-03-30 13:18:40 +03:30
6526aefbbf fix not found bug in customize checkout 2025-03-30 13:18:33 +03:30
SamSys
1fec40982c Revert "changes"
This reverts commit 677adbeddb.
2025-03-30 04:14:37 +03:30
SamSys
868abae2e8 merge from Customize-Chekout-Headr To Master 2025-03-30 03:45:37 +03:30
SamSys
c627ba6d3d merg from master 2025-03-30 03:41:03 +03:30
SamSys
dadf541dd1 Permission for CustomizeCheckoutTemp Bug Fixed 2025-03-30 03:37:55 +03:30
4b0c700b3e add daily wage for non calculation for kabab mahdi 2025-03-30 00:48:17 +03:30
677adbeddb changes 2025-03-30 00:44:01 +03:30
29 changed files with 10039 additions and 528 deletions

View File

@@ -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;
@@ -30,7 +31,8 @@ public class CustomizeCheckout : EntityBase
double totalPayment, string contractNo, ICollection<CustomizeCheckoutFine> checkoutFines,
ICollection<CustomizeCheckoutLoanInstallments> customizeCheckoutLoanInstallments,
ICollection<CustomizeCheckoutSalaryAid> customizeCheckoutSalaryAids,
ICollection<CustomizeCheckoutReward> customizeCheckoutRewards, TimeSpan lateToWorkValue)
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

View File

@@ -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,6 +265,18 @@ public class CustomizeCheckoutTemp : 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

View File

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

View File

@@ -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,6 +97,13 @@ namespace CompanyManagment.App.Contracts.CustomizeCheckout
public string LateToWorkValue { 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; }

View File

@@ -110,7 +110,7 @@ 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);
@@ -162,7 +162,7 @@ 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.RemoveEmployeeCustomizeCheckoutInDates(command.WorkshopId, employeeId, command.ContractStart, command.ContractEnd);

View File

@@ -91,7 +91,7 @@ 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);
@@ -144,7 +144,7 @@ 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);
_customizeCheckoutTempRepository.Create(entity);
_customizeCheckoutTempRepository.RemoveEmployeeTemporaryCheckoutInDates(command.WorkshopId, employeeId, command.ContractStart, command.ContractEnd);
}

View File

@@ -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

View File

@@ -97,6 +97,9 @@ public class CustomizeCheckoutMapping : IEntityTypeConfiguration<CustomizeChecko
rewards.Property(x=>x.Description).HasColumnType("ntext");
});
builder.Property(x => x.ShiftStatus).HasConversion<string>().HasMaxLength(10);
#region Relastions
builder.HasOne(x => x.Workshop)

View File

@@ -97,6 +97,9 @@ public class CustomizeCheckoutTempMapping : IEntityTypeConfiguration<CustomizeCh
rewards.Property(x => x.Description).HasColumnType("ntext");
});
builder.Property(x => x.ShiftStatus).HasConversion<string>().HasMaxLength(10);
#region Relastions
//builder.HasOne(x => x.Workshop)

View File

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

View File

@@ -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)");

View File

@@ -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)
@@ -74,7 +85,7 @@ namespace CompanyManagment.EFCore.Repository
//var month = pc.GetMonth(monthStart);
IQueryable<CustomizeCheckout> customizeCheckoutsQuery = _companyContext.CustomizeCheckouts
.Where(x => customizeCheckoutIds.Contains(x.id)).Include(x=>x.CheckoutFines);
.Where(x => customizeCheckoutIds.Contains(x.id)).Include(x => x.CheckoutFines);
IQueryable<Workshop> workshopsQuery = _companyContext.Workshops.Where(x => customizeCheckoutsQuery.Any(y => y.WorkshopId == x.id));
@@ -92,6 +103,51 @@ namespace CompanyManagment.EFCore.Repository
var loans = _companyContext.Loans.AsSplitQuery().Where(x => x.WorkshopId == workshopId).ToList();
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();
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,
@@ -134,13 +190,13 @@ namespace CompanyManagment.EFCore.Repository
EarlyExitDeduction = x.EarlyExitDeduction.ToMoney(),
LateToWorkDeduction = x.LateToWorkDeduction.ToMoney(),
FineDeduction = x.FineDeduction.ToMoney(),
FineViewModelList = x.CheckoutFines.Select(y=> new FineViewModel()
FineViewModelList = x.CheckoutFines.Select(y => new FineViewModel()
{
Amount = y.Amount,
FineDate = y.FineDateFa,
Title = y.Title
}).ToList(),
InstallmentViewModels = x.CustomizeCheckoutLoanInstallments.Select(i=>new LoanInstallmentViewModel()
InstallmentViewModels = x.CustomizeCheckoutLoanInstallments.Select(i => new LoanInstallmentViewModel()
{
Amount = i.AmountForMonth,
AmountDouble = i.AmountForMonth.MoneyToDouble(),
@@ -150,17 +206,17 @@ namespace CompanyManagment.EFCore.Repository
RemainingAmount = i.LoanRemaining,
LoanAmount = i.LoanAmount
}).ToList(),
RewardViewModels = x.CustomizeCheckoutRewards.Select(r=>new RewardViewModel()
RewardViewModels = x.CustomizeCheckoutRewards.Select(r => new RewardViewModel()
{
IsActive = r.IsActive,
Title = r.Title,
Amount = r.Amount,
AmountDouble =r.Amount.MoneyToDouble(),
AmountDouble = r.Amount.MoneyToDouble(),
Description = r.Description,
GrantDateFa = r.GrantDateFa,
GrantDateGr = r.GrantDate
}).ToList(),
SalaryAidViewModels = x.CustomizeCheckoutSalaryAids.Select(s=> new SalaryAidViewModel()
SalaryAidViewModels = x.CustomizeCheckoutSalaryAids.Select(s => new SalaryAidViewModel()
{
Amount = s.Amount,
AmountDouble = s.Amount.MoneyToDouble(),
@@ -168,7 +224,10 @@ namespace CompanyManagment.EFCore.Repository
SalaryAidDateTimeGe = s.SalaryAidDateTime
}).ToList(),
LateToWorkValue = x.LateToWorkValue == TimeSpan.Zero ? "-" : $"{(int)x.LateToWorkValue.TotalHours}:{Convert.ToInt32(x.LateToWorkValue.TotalMinutes % 60):00}"
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
@@ -221,6 +280,9 @@ namespace CompanyManagment.EFCore.Repository
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);

View File

@@ -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)
@@ -233,6 +242,47 @@ namespace CompanyManagment.EFCore.Repository
//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();
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
{
@@ -310,8 +360,12 @@ namespace CompanyManagment.EFCore.Repository
SalaryAidDateTimeGe = s.SalaryAidDateTime
}).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}"
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
@@ -363,6 +417,8 @@ namespace CompanyManagment.EFCore.Repository
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;

View File

@@ -2389,7 +2389,10 @@ CreateWorkingHoursTemp command, bool holidayWorking)
InstallmentViewModels = loanInstallments,
SalaryAidViewModels = salaryAidViewModel,
RewardViewModels = rewardViewModels,
LateToWorkValue = totalLateToWorkSpan
LateToWorkValue = totalLateToWorkSpan,
SettingSalary = customizeWorkshopEmployeeSettings.Salary,
DailyWage = dailyWage,
ShiftStatus = customizeWorkshopEmployeeSettings.WorkshopShiftStatus
};
}
@@ -2417,6 +2420,9 @@ CreateWorkingHoursTemp command, bool holidayWorking)
return new CustomizeCheckoutMandatoryViewModel()
{
MonthlySalary = dailyWage * mandatoryDays,
ShiftStatus = customizeWorkshopEmployeeSettings.WorkshopShiftStatus,
SettingSalary = customizeWorkshopEmployeeSettings.Salary,
DailyWage = dailyWage
};
}

View File

@@ -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"/>

View File

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

View File

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

View File

@@ -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
@@ -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>

View File

@@ -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
@@ -58,10 +59,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;">
@@ -69,21 +81,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>
@@ -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>

View File

@@ -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>

View File

@@ -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

View File

@@ -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",

View File

@@ -1486,6 +1486,9 @@ function loadMore() {
${item.contractEndFa}
</div>
<div class="Rtable-cell--heading d-flex text-center">
${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" />
@@ -1496,6 +1499,11 @@ 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="25" height="25" viewBox="0 0 22 22" fill="none" stroke="currentColor">
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-linecap="round" />
@@ -1505,12 +1513,17 @@ function loadMore() {
</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">
${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" />
@@ -1520,6 +1533,7 @@ function loadMore() {
<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}')">
<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" />
@@ -1530,6 +1544,9 @@ 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" />
@@ -1539,6 +1556,11 @@ function loadMore() {
</svg>
<span class="mx-1">حذف</span>
</button>
` : ``}
</div>
</div>
</div>

View File

@@ -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,6 +1481,8 @@ function loadMore() {
${item.contractEndFa}
</div>
<div class="Rtable-cell--heading d-flex text-center">
${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" />
@@ -1491,6 +1493,9 @@ 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="25" height="25" viewBox="0 0 22 22" fill="none" stroke="currentColor">
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-linecap="round" />
@@ -1500,12 +1505,18 @@ function loadMore() {
</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">
${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" />
@@ -1515,15 +1526,10 @@ function loadMore() {
<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}')">
<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">
@@ -1534,6 +1540,11 @@ function loadMore() {
</svg>
<span class="mx-1">حذف</span>
</button>
` : ``}
</div>
</div>
</div>