Compare commits

...

23 Commits

Author SHA1 Message Date
b29b1335d3 finish saving rollcall to original 2025-06-11 19:00:17 +03:30
24d41ffc68 add rollcall to checkout 2025-06-10 19:10:33 +03:30
SamSys
c6d4d7d473 add checkoutSaveData in MandatoryCompute 2025-06-09 18:46:46 +03:30
c594cbf523 change checkout application 2025-06-09 17:47:23 +03:30
52976d8965 add calculation for create checkout 2025-06-09 16:07:22 +03:30
ec97274d5e add checkout rollcall domain to Checkout 2025-06-09 15:07:06 +03:30
SamSys
c4d21be4aa new inurancelist bug fixed - FiexedSalary changes added 2025-06-08 16:20:30 +03:30
SamSys
e9386708dc Merge branch 'master' of https://github.com/syntax24/OriginalGozareshgir 2025-06-08 16:17:16 +03:30
SamSys
d70abb60d7 guid for application download link 2025-06-08 16:17:08 +03:30
36cdde7e6a change insurance govermentlist 2025-06-08 14:32:43 +03:30
SamSys
34358a36c9 change upload apk 2025-06-07 19:21:34 +03:30
SamSys
babecda188 add new permission to InsuranceList 2025-06-07 16:09:50 +03:30
SamSys
98c3e7c821 New-Insurance-Opration Merged 2025-06-05 02:05:24 +03:30
SamSys
5d91b29f2b Create File Bug Fixed 2025-06-03 21:45:20 +03:30
87b0d248a3 Convert checkoutPrintOne to CheckoutPrintAll for best performance 2025-06-03 19:38:18 +03:30
a410d0c216 Merge branch 'master' of https://github.com/syntax24/OriginalGozareshgir 2025-06-03 19:11:52 +03:30
a640f91703 fix leave hours bugs 2025-06-03 19:11:44 +03:30
SamSys
99c8dcb764 add comment to InsuranceList metod 2025-06-03 16:32:12 +03:30
SamSys
d44935329f checkoutBug Fixed 2025-06-02 22:06:41 +03:30
SamSys
3a7fc7087b changesAuthHelper 2025-06-02 22:05:21 +03:30
925f43214c fix checkout bug 2025-06-02 22:02:33 +03:30
SamSys
c2fc7dabc1 print bug fixed 2025-06-02 21:38:56 +03:30
SamSys
dec5666eb7 changes 2025-06-02 21:37:27 +03:30
28 changed files with 18490 additions and 7728 deletions

View File

@@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using _0_Framework.Application;
using _0_Framework.Domain;
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
using Company.Domain.CheckoutAgg.ValueObjects;
using Company.Domain.CustomizeCheckoutAgg.ValueObjects;
using Company.Domain.WorkshopAgg;
@@ -29,7 +30,7 @@ public class Checkout : EntityBase
string overNightWorkValue, string fridayWorkValue, string rotatingShifValue, string absenceValue,
string totalDayOfLeaveCompute, string totalDayOfYearsCompute, string totalDayOfBunosesCompute,
ICollection<CheckoutLoanInstallment> loanInstallments,
ICollection<CheckoutSalaryAid> salaryAids)
ICollection<CheckoutSalaryAid> salaryAids,CheckoutRollCall checkoutRollCall)
{
EmployeeFullName = employeeFullName;
FathersName = fathersName;
@@ -88,6 +89,7 @@ public class Checkout : EntityBase
TotalDayOfBunosesCompute = totalDayOfBunosesCompute;
LoanInstallments = loanInstallments;
SalaryAids = salaryAids;
CheckoutRollCall = checkoutRollCall;
}
public string EmployeeFullName { get; private set; }
@@ -196,7 +198,8 @@ public class Checkout : EntityBase
public ICollection<CheckoutLoanInstallment> LoanInstallments { get; set; } = [];
public ICollection<CheckoutSalaryAid> SalaryAids { get; set; } = [];
#endregion
public CheckoutRollCall CheckoutRollCall { get; private set; }
#endregion
public Workshop Workshop { get; set; }
@@ -308,4 +311,149 @@ public class Checkout : EntityBase
LoanInstallments = lonaInstallments;
InstallmentDeduction = installmentsAmount;
}
public void SetCheckoutRollCall(CheckoutRollCall checkoutRollCall)
{
CheckoutRollCall = checkoutRollCall;
}
}
public class CheckoutRollCall
{
private CheckoutRollCall(){}
public CheckoutRollCall(TimeSpan totalMandatoryTimeSpan, TimeSpan totalPresentTimeSpan, TimeSpan totalBreakTimeSpan,
TimeSpan totalWorkingTimeSpan, TimeSpan totalPaidLeaveTmeSpan, TimeSpan totalSickLeaveTimeSpan,
ICollection<CheckoutRollCallDay> rollCallDaysCollection)
{
TotalMandatoryTimeSpan = totalMandatoryTimeSpan;
TotalPresentTimeSpan = totalPresentTimeSpan;
TotalBreakTimeSpan = totalBreakTimeSpan;
TotalWorkingTimeSpan = totalWorkingTimeSpan;
TotalPaidLeaveTmeSpan = totalPaidLeaveTmeSpan;
TotalSickLeaveTimeSpan = totalSickLeaveTimeSpan;
RollCallDaysCollection = rollCallDaysCollection;
}
/// <summary>
/// مجموع ساعت موظفی
/// </summary>
public TimeSpan TotalMandatoryTimeSpan { get; private set; }
/// <summary>
/// مجموع ساعت حضور
/// </summary>
public TimeSpan TotalPresentTimeSpan { get; private set; }
/// <summary>
/// مجموع ساعت استراحت
/// </summary>
public TimeSpan TotalBreakTimeSpan { get; private set; }
/// <summary>
/// مجموع ساعت کارکرد
/// </summary>
public TimeSpan TotalWorkingTimeSpan { get; private set; }
/// <summary>
/// مجموع ساعت مرخصی استحقاقی
/// </summary>
public TimeSpan TotalPaidLeaveTmeSpan { get; private set; }
/// <summary>
/// مجموع ساعت مرخصی استعلاجی
/// </summary>
public TimeSpan TotalSickLeaveTimeSpan { get; private set; }
/// <summary>
/// روز های حضور غیاب
/// </summary>
public ICollection<CheckoutRollCallDay> RollCallDaysCollection { get; private set; }
}
public class CheckoutRollCallDay
{
private CheckoutRollCallDay(){}
public CheckoutRollCallDay(DateTime date, string firstStartDate, string firstEndDate,
string secondStartDate, string secondEndDate, TimeSpan breakTimeSpan,
bool isSliced, TimeSpan workingTimeSpan, bool isAbsent, bool isFriday,
bool isHoliday, string leaveType)
{
Date = date;
FirstStartDate = firstStartDate;
FirstEndDate = firstEndDate;
SecondStartDate = secondStartDate;
SecondEndDate = secondEndDate;
BreakTimeSpan = breakTimeSpan;
IsSliced = isSliced;
WorkingTimeSpan = workingTimeSpan;
IsAbsent = isAbsent;
IsFriday = isFriday;
IsHoliday = isHoliday;
LeaveType = leaveType;
}
public long Id { get; set; }
/// <summary>
/// تاریخ
/// </summary>
public DateTime Date { get; private set; }
/// <summary>
/// ورود اول
/// </summary>
public string FirstStartDate { get; private set; }
/// <summary>
/// خروج اول
/// </summary>
public string FirstEndDate { get; private set; }
/// <summary>
/// ورود دوم
/// </summary>
public string SecondStartDate { get; private set; }
/// <summary>
/// خروج دوم
/// </summary>
public string SecondEndDate { get; private set; }
/// <summary>
/// ساعت استراحت
/// </summary>
public TimeSpan BreakTimeSpan { get; private set; }
/// <summary>
/// مقدار زمان کارکرد
/// </summary>
public TimeSpan WorkingTimeSpan { get; private set; }
/// <summary>
/// آیا منقطع است؟
/// </summary>
public bool IsSliced { get; private set; }
/// <summary>
/// آیا غیبت است
/// </summary>
public bool IsAbsent { get; private set; }
/// <summary>
/// آیا جمعه است
/// </summary>
public bool IsFriday { get; private set; }
/// <summary>
/// آیا تعطیل رسمی است
/// </summary>
public bool IsHoliday { get; private set; }
/// <summary>
/// نوع مرخصی - درصورت نداشتن مرخصی مقدارش null میباشد
/// </summary>
public string LeaveType { get; private set; }
public long CheckoutId { get; set; }
}

View File

@@ -132,7 +132,115 @@ public class CheckoutViewModel
/// مدت مرخصی استحقاقی
/// </summary>
public string TotalPaidLeave { get; set; }
public TimeSpan TotalHourlyLeave { get; set; }
public List<CheckoutDailyRollCallViewModel> MonthlyRollCall { get; set; }
public List<LoanInstallmentViewModel> InstallmentViewModels { get; set; }
public List<SalaryAidViewModel> SalaryAidViewModels { get; set; }
public CheckoutRollCallViewModel CheckoutRollCall { get; set; }
}
public class CheckoutRollCallViewModel
{
/// <summary>
/// مجموع ساعت موظفی
/// </summary>
public TimeSpan TotalMandatoryTimeSpan { get; set; }
/// <summary>
/// مجموع ساعت حضور
/// </summary>
public TimeSpan TotalPresentTimeSpan { get; set; }
/// <summary>
/// مجموع ساعت استراحت
/// </summary>
public TimeSpan TotalBreakTimeSpan { get; set; }
/// <summary>
/// مجموع ساعت کارکرد
/// </summary>
public TimeSpan TotalWorkingTimeSpan { get; set; }
/// <summary>
/// مجموع ساعت مرخصی استحقاقی
/// </summary>
public TimeSpan TotalPaidLeaveTmeSpan { get; set; }
/// <summary>
/// مجموع ساعت مرخصی استعلاجی
/// </summary>
public TimeSpan TotalSickLeaveTimeSpan { get; set; }
/// <summary>
/// روز های حضور غیاب
/// </summary>
public ICollection<CheckoutRollCallDayViewModel> RollCallDaysCollection { get; set; }
}
public class CheckoutRollCallDayViewModel
{
public long Id { get; set; }
/// <summary>
/// تاریخ
/// </summary>
public DateTime Date { get; set; }
/// <summary>
/// ورود اول
/// </summary>
public string FirstStartDate { get; set; }
/// <summary>
/// خروج اول
/// </summary>
public string FirstEndDate { get; set; }
/// <summary>
/// ورود دوم
/// </summary>
public string SecondStartDate { get; set; }
/// <summary>
/// خروج دوم
/// </summary>
public string SecondEndDate { get; set; }
/// <summary>
/// ساعت استراحت
/// </summary>
public TimeSpan BreakTimeSpan { get; set; }
/// <summary>
/// مقدار زمان کارکرد
/// </summary>
public TimeSpan WorkingTimeSpan { get; set; }
/// <summary>
/// آیا منقطع است؟
/// </summary>
public bool IsSliced { get; set; }
/// <summary>
/// آیا غیبت است
/// </summary>
public bool IsAbsent { get; set; }
/// <summary>
/// آیا جمعه است
/// </summary>
public bool IsFriday { get; set; }
/// <summary>
/// آیا تعطیل رسمی است
/// </summary>
public bool IsHoliday { get; set; }
/// <summary>
/// نوع مرخصی - درصورت نداشتن مرخصی مقدارش null میباشد
/// </summary>
public string LeaveType { get; set; }
public long CheckoutId { get; set; }
}

View File

@@ -5,6 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using CompanyManagment.App.Contracts.Contract;
using CompanyManagment.App.Contracts.Employee;
using CompanyManagment.App.Contracts.RollCall;
using CompanyManagment.App.Contracts.YearlySalary;
using Microsoft.AspNetCore.Mvc.Rendering;
@@ -138,4 +139,15 @@ public class CreateCheckout
public string ShiftWork { get; set; }
public List<GroupedRollCalls> GroupedRollCalls { get; set; }
public TimeSpan TotalWorkingTimeSpan { get; set; }
public TimeSpan TotalBreakTimeSpan { get; set; }
public TimeSpan TotalPresentTimeSpan { get; set; }
public TimeSpan TotalPaidLeave { get; set; }
public TimeSpan TotalSickLeave { get; set; }
}

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using CompanyManagment.App.Contracts.Loan;
using CompanyManagment.App.Contracts.RollCall;
using CompanyManagment.App.Contracts.SalaryAid;
using CompanyManagment.App.Contracts.WorkingHoursTemp;
@@ -45,6 +46,15 @@ public class ComputingViewModel
public bool HasRotatingShift { get; set; }
public List<GroupedRollCalls> GroupedRollCalls { get; set; }
public TimeSpan TotalWorkingTimeSpan { get; set; }
public TimeSpan TotalBreakTimeSpan { get; set; }
public TimeSpan TotalPresentTimeSpan { get; set; }
public TimeSpan TotalPaidLeave { get; set; }
public TimeSpan TotalSickLeave { get; set; }
//public List<string> holidays;
}

View File

@@ -6,10 +6,12 @@ public class ShiftList
{
public DateTime Start { get; set; }
public DateTime End { get; set; }
/// <summary>
/// تاخیر در ورود (مدت زمانی که کارمند با تأخیر وارد شده است)
/// </summary>
public TimeSpan LateEntryDuration { get; set; }
public DateTime EndWithOutResTime { get; set; }
/// <summary>
/// تاخیر در ورود (مدت زمانی که کارمند با تأخیر وارد شده است)
/// </summary>
public TimeSpan LateEntryDuration { get; set; }
/// <summary>
/// تعجیل در ورود (مدت زمانی که کارمند زودتر از زمان مشخص وارد شده است)

View File

@@ -48,9 +48,9 @@ public class AndroidApkVersionApplication : IAndroidApkVersionApplication
Directory.CreateDirectory(path);
var apk = new ApkReader.ApkReader().Read(file.OpenReadStream());
//var apk = new ApkReader.ApkReader().Read(file.OpenReadStream());
string uniqueFileName = $"{Path.GetFileNameWithoutExtension(file.FileName)}.v{apk.VersionName}{Path.GetExtension(file.FileName)}";
string uniqueFileName = $"{Path.GetFileNameWithoutExtension(file.FileName)}{Path.GetExtension(file.FileName)}";
string filepath = Path.Combine(path, uniqueFileName);
@@ -60,7 +60,7 @@ public class AndroidApkVersionApplication : IAndroidApkVersionApplication
await file.CopyToAsync(stream);
}
var entity = new AndroidApkVersion(apk.VersionName, apk.VersionCode, IsActive.True, filepath);
var entity = new AndroidApkVersion("0", "0", IsActive.True, filepath);
_androidApkVersionRepository.Create(entity);
_androidApkVersionRepository.SaveChanges();
return op.Succcedded();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,6 @@
using System;
using _0_Framework.Application;
using _0_Framework.InfraStructure;
using Company.Domain.CheckoutAgg;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
@@ -73,5 +74,28 @@ class CheckoutMapping : IEntityTypeConfiguration<Checkout>
salaryAid.Property(x => x.Amount).HasMaxLength(25);
salaryAid.Property(x => x.CalculationDateTimeFa).HasMaxLength(15);
});
builder.OwnsOne(x => x.CheckoutRollCall, rollCall =>
{
rollCall.Property(x => x.TotalPresentTimeSpan).HasTimeSpanConversion();
rollCall.Property(x => x.TotalBreakTimeSpan).HasTimeSpanConversion();
rollCall.Property(x => x.TotalWorkingTimeSpan).HasTimeSpanConversion();
rollCall.Property(x => x.TotalPaidLeaveTmeSpan).HasTimeSpanConversion();
rollCall.Property(x => x.TotalSickLeaveTimeSpan).HasTimeSpanConversion();
rollCall.Property(x => x.TotalMandatoryTimeSpan).HasTimeSpanConversion();
rollCall.OwnsMany(x => x.RollCallDaysCollection, rollCallDay =>
{
rollCallDay.HasKey(x => x.Id);
rollCallDay.WithOwner().HasForeignKey(x => x.CheckoutId);
rollCallDay.Property(x => x.WorkingTimeSpan).HasTimeSpanConversion();
rollCallDay.Property(x => x.BreakTimeSpan).HasTimeSpanConversion();
rollCallDay.Property(x => x.FirstStartDate).HasMaxLength(18);
rollCallDay.Property(x => x.FirstEndDate).HasMaxLength(18);
rollCallDay.Property(x => x.SecondStartDate).HasMaxLength(18);
rollCallDay.Property(x => x.SecondEndDate).HasMaxLength(18);
rollCallDay.Property(x => x.LeaveType).HasMaxLength(18);
});
});
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,124 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CompanyManagment.EFCore.Migrations
{
/// <inheritdoc />
public partial class addrollcallincheckout : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "CheckoutRollCall_TotalBreakTimeSpan",
table: "Checkouts",
type: "nvarchar(30)",
maxLength: 30,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "CheckoutRollCall_TotalMandatoryTimeSpan",
table: "Checkouts",
type: "nvarchar(30)",
maxLength: 30,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "CheckoutRollCall_TotalPaidLeaveTmeSpan",
table: "Checkouts",
type: "nvarchar(30)",
maxLength: 30,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "CheckoutRollCall_TotalPresentTimeSpan",
table: "Checkouts",
type: "nvarchar(30)",
maxLength: 30,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "CheckoutRollCall_TotalSickLeaveTimeSpan",
table: "Checkouts",
type: "nvarchar(30)",
maxLength: 30,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "CheckoutRollCall_TotalWorkingTimeSpan",
table: "Checkouts",
type: "nvarchar(30)",
maxLength: 30,
nullable: true);
migrationBuilder.CreateTable(
name: "CheckoutRollCallDay",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Date = table.Column<DateTime>(type: "datetime2", nullable: false),
FirstStartDate = table.Column<string>(type: "nvarchar(18)", maxLength: 18, nullable: true),
FirstEndDate = table.Column<string>(type: "nvarchar(18)", maxLength: 18, nullable: true),
SecondStartDate = table.Column<string>(type: "nvarchar(18)", maxLength: 18, nullable: true),
SecondEndDate = table.Column<string>(type: "nvarchar(18)", maxLength: 18, nullable: true),
BreakTimeSpan = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false),
WorkingTimeSpan = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false),
IsSliced = table.Column<bool>(type: "bit", nullable: false),
IsAbsent = table.Column<bool>(type: "bit", nullable: false),
IsFriday = table.Column<bool>(type: "bit", nullable: false),
IsHoliday = table.Column<bool>(type: "bit", nullable: false),
LeaveType = table.Column<string>(type: "nvarchar(18)", maxLength: 18, nullable: true),
CheckoutId = table.Column<long>(type: "bigint", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CheckoutRollCallDay", x => x.Id);
table.ForeignKey(
name: "FK_CheckoutRollCallDay_Checkouts_CheckoutId",
column: x => x.CheckoutId,
principalTable: "Checkouts",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_CheckoutRollCallDay_CheckoutId",
table: "CheckoutRollCallDay",
column: "CheckoutId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CheckoutRollCallDay");
migrationBuilder.DropColumn(
name: "CheckoutRollCall_TotalBreakTimeSpan",
table: "Checkouts");
migrationBuilder.DropColumn(
name: "CheckoutRollCall_TotalMandatoryTimeSpan",
table: "Checkouts");
migrationBuilder.DropColumn(
name: "CheckoutRollCall_TotalPaidLeaveTmeSpan",
table: "Checkouts");
migrationBuilder.DropColumn(
name: "CheckoutRollCall_TotalPresentTimeSpan",
table: "Checkouts");
migrationBuilder.DropColumn(
name: "CheckoutRollCall_TotalSickLeaveTimeSpan",
table: "Checkouts");
migrationBuilder.DropColumn(
name: "CheckoutRollCall_TotalWorkingTimeSpan",
table: "Checkouts");
}
}
}

View File

@@ -6168,6 +6168,117 @@ namespace CompanyManagment.EFCore.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.OwnsOne("Company.Domain.CheckoutAgg.CheckoutRollCall", "CheckoutRollCall", b1 =>
{
b1.Property<long>("Checkoutid")
.HasColumnType("bigint");
b1.Property<string>("TotalBreakTimeSpan")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b1.Property<string>("TotalMandatoryTimeSpan")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b1.Property<string>("TotalPaidLeaveTmeSpan")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b1.Property<string>("TotalPresentTimeSpan")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b1.Property<string>("TotalSickLeaveTimeSpan")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b1.Property<string>("TotalWorkingTimeSpan")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b1.HasKey("Checkoutid");
b1.ToTable("Checkouts");
b1.WithOwner()
.HasForeignKey("Checkoutid");
b1.OwnsMany("Company.Domain.CheckoutAgg.CheckoutRollCallDay", "RollCallDaysCollection", b2 =>
{
b2.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b2.Property<long>("Id"));
b2.Property<string>("BreakTimeSpan")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b2.Property<long>("CheckoutId")
.HasColumnType("bigint");
b2.Property<DateTime>("Date")
.HasColumnType("datetime2");
b2.Property<string>("FirstEndDate")
.HasMaxLength(18)
.HasColumnType("nvarchar(18)");
b2.Property<string>("FirstStartDate")
.HasMaxLength(18)
.HasColumnType("nvarchar(18)");
b2.Property<bool>("IsAbsent")
.HasColumnType("bit");
b2.Property<bool>("IsFriday")
.HasColumnType("bit");
b2.Property<bool>("IsHoliday")
.HasColumnType("bit");
b2.Property<bool>("IsSliced")
.HasColumnType("bit");
b2.Property<string>("LeaveType")
.HasMaxLength(18)
.HasColumnType("nvarchar(18)");
b2.Property<string>("SecondEndDate")
.HasMaxLength(18)
.HasColumnType("nvarchar(18)");
b2.Property<string>("SecondStartDate")
.HasMaxLength(18)
.HasColumnType("nvarchar(18)");
b2.Property<string>("WorkingTimeSpan")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b2.HasKey("Id");
b2.HasIndex("CheckoutId");
b2.ToTable("CheckoutRollCallDay");
b2.WithOwner()
.HasForeignKey("CheckoutId");
});
b1.Navigation("RollCallDaysCollection");
});
b.OwnsMany("Company.Domain.CheckoutAgg.ValueObjects.CheckoutLoanInstallment", "LoanInstallments", b1 =>
{
b1.Property<long>("Checkoutid")
@@ -6255,6 +6366,8 @@ namespace CompanyManagment.EFCore.Migrations
.HasForeignKey("Checkoutid");
});
b.Navigation("CheckoutRollCall");
b.Navigation("LoanInstallments");
b.Navigation("SalaryAids");

File diff suppressed because it is too large Load Diff

View File

@@ -60,8 +60,8 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
_leaveRepository = leaveRepository;
_holidayItemRepository = holidayItemRepository;
_testDbContext = testDbContext;
}
}
#region OfficialChckout
public ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart,
@@ -108,8 +108,8 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
.Include(x => x.CustomizeWorkshopGroupSettings).FirstOrDefault(x =>
x.WorkshopId == workshopId && x.EmployeeId == employeeId);
//اگر ساعت استراحت پرسنل وجود نداشت صفر است
var breakTime = settings == null ? new BreakTime(false, new TimeOnly()) : settings.BreakTime;
var breakTimeEntity = settings == null ? new BreakTime(false, new TimeOnly()) : settings.BreakTime;
var endOfFarvardin = "1404/01/31".ToGeorgianDateTime();
#endregion
@@ -125,10 +125,11 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
groupedRollCall = rollCallResult.GroupBy(x => x.ShiftDate.Date).Select(x => new GroupedRollCalls()
{
CreationDate = x.Key,
ShiftList = x.Select(s => new ShiftList() { Start = s.StartDate!.Value, End = s.EndDate!.Value }).ToList(),
ShiftList = x.Select(s => new ShiftList() { Start = s.StartDate!.Value, End = s.EndDate!.Value,EndWithOutResTime = s.ShiftEndWithoutRest.Value}).ToList(),
HasFriday = x.Any(s => s.StartDate != null && s.EndDate != null && (s.StartDate.Value.DayOfWeek == DayOfWeek.Friday || s.EndDate.Value!.DayOfWeek == DayOfWeek.Friday)),
SumOneDaySpan = new TimeSpan(x.Sum(shift => shift.ShiftSpan.Ticks))
SumOneDaySpan = new TimeSpan(x.Sum(shift => shift.ShiftSpan.Ticks)),
BreakTime = x.First().BreakTimeSpan
}).OrderBy(x => x.CreationDate).ToList();
}
@@ -145,16 +146,31 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
BreakTimeSpan = x.BreakTimeSpan
}).ToList();
groupedRollCall = rollCallResult.GroupBy(x => x.CreationDate.Date).Select(x => new GroupedRollCalls()
groupedRollCall = rollCallResult.GroupBy(x => x.CreationDate.Date).Select(x =>
{
CreationDate = x.Key,
ShiftList = x.Select(s => new ShiftList() { Start = s.StartDate!.Value, End = s.EndDate!.Value }).ToList(),
HasFriday = x.Any(s => s.StartDate != null && s.EndDate != null && (s.StartDate.Value.DayOfWeek == DayOfWeek.Friday || s.EndDate.Value!.DayOfWeek == DayOfWeek.Friday)),
SumOneDaySpan = new TimeSpan(x.Sum(shift => shift.ShiftSpan.Ticks)) - CalculateBreakTime(x.First().BreakTimeSpan,
new TimeSpan(x.Sum(shift => shift.ShiftSpan.Ticks))),
BreakTime = CalculateBreakTime(x.First().BreakTimeSpan, new TimeSpan(x.Sum(shift => shift.ShiftSpan.Ticks))),
TimeSpan breakTime;
if (contractStart > endOfFarvardin)
{
breakTime = CalculateBreakTime(
x.First().BreakTimeSpan,
new TimeSpan(x.Sum(shift => shift.ShiftSpan.Ticks)));
}
else
{
breakTime = CalculateBreakTime(breakTimeEntity, new TimeSpan(x.Sum(shift => shift.ShiftSpan.Ticks)));
}
return new GroupedRollCalls()
{
CreationDate = x.Key,
ShiftList = x.Select(s => new ShiftList() { Start = s.StartDate!.Value, End = s.EndDate!.Value, EndWithOutResTime = s.EndDate.Value })
.ToList(),
HasFriday = x.Any(s =>
s.StartDate != null && s.EndDate != null && (s.StartDate.Value.DayOfWeek == DayOfWeek.Friday ||
s.EndDate.Value!.DayOfWeek == DayOfWeek.Friday)),
SumOneDaySpan = new TimeSpan(x.Sum(shift => shift.ShiftSpan.Ticks)) - breakTime,
BreakTime = breakTime,
};
}).OrderBy(x => x.CreationDate).ToList();
}
@@ -228,9 +244,9 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
double minutesDecimal = (starndardHoursesPerTotalDays - hours) * 60;
int minutes = (int)minutesDecimal;
TimeSpan totalLeaveSpan = TimeSpan.Zero;
TimeSpan starndardHoursesPerTotalDaysSapn = new TimeSpan(hours, minutes, 0);
if (leaveSearchResult.Count > 0)
if (leaveSearchResult.Count > 0 || hoursesleave.Count > 0)
{
if (leaveSearchResult.Any(x => x.HasShiftDuration))
{
@@ -261,8 +277,8 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
}
}
totalLeaveSpan = totalLeave;
}
else
{
int leavingDayCout = 0;
@@ -311,7 +327,9 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
{
sumSpans = sumSpans.Add(sumLeave);
}
}
totalLeaveSpan = sumLeave;
}
}
@@ -343,9 +361,9 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
//***********************************//
var dailyFix = TimeSpan.Parse("07:20");
TimeSpan mandatoryHoursTimeSpan = new TimeSpan(7, 20, 0).Multiply(mandatorDays);
TimeSpan Mandatory = sumSpansWhitOutleaves.Subtract(mandatoryHoursTimeSpan);
//var dailyFix = TimeSpan.Parse("07:20");
//TimeSpan mandatoryHoursTimeSpan = new TimeSpan(7, 20, 0).Multiply(mandatorDays);
//TimeSpan Mandatory = sumSpansWhitOutleaves.Subtract(mandatoryHoursTimeSpan);
double mandatoryWorkWithOutleaves = (sumSpansWhitOutleaves.TotalMinutes) / 60;
double overTimeWork = 0;
@@ -688,11 +706,30 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
}
}
#endregion
#endregion
#region Result
#region Result
LeaveSearchModel sickLeaveSearch = new LeaveSearchModel()
{
EmployeeId = employeeId,
WorkshopId = workshopId,
LeaveType = "استعلاجی",
PaidLeaveType = "روزانه",
StartLeaveGr = contractStart,
EndLeaveGr = contractEnd,
IsAccepted = true,
};
var sickLeaveSearchResult = _leaveRepository.search(sickLeaveSearch);
var res = new ComputingViewModel()
var sickLeaveTimeSpans = sickLeaveSearchResult.Select(x =>
{
var startLeave = contractStart > x.StartLeaveGr ? contractStart : x.StartLeaveGr;
var endLeave = contractEnd < x.EndLeaveGr ? contractEnd : x.EndLeaveGr;
return (endLeave - startLeave).Add(TimeSpan.FromDays(1));
});
var totalBreakTime = new TimeSpan(groupedRollCall.Sum(x => x.BreakTime.Ticks));
var res = new ComputingViewModel()
{
NumberOfWorkingDays = $"{groupedRollCall.Count}",
@@ -720,60 +757,70 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
TotalHolidayAndNotM = totalHolidaysAndNotM.ToString(),
DayliFeeComplete = dayliFeeComplete,
MarriedAllowance = MarriedAllowanceStr,
RotatingShiftValue = shiftPayValue
};
RotatingShiftValue = shiftPayValue,
#region SaveRollCall
GroupedRollCalls = groupedRollCall,
TotalWorkingTimeSpan = sumSpansWhitOutleaves,
TotalBreakTimeSpan = totalBreakTime,
TotalPresentTimeSpan = sumSpansWhitOutleaves + totalBreakTime,
TotalPaidLeave = totalLeaveSpan,
TotalSickLeave = new TimeSpan(sickLeaveTimeSpans.Sum(x=>x.Ticks)),
#endregion
};
#endregion
return res;
}
/// <summary>
/// محاسبه ساعات کارکرد پرسنل در صورت داشتن حضور غیاب
/// </summary>
/// <param name="employeeId"></param>
/// <param name="workshopId"></param>
/// <param name="contractStart"></param>
/// <param name="contractEnd"></param>
/// <returns></returns>
public (bool hasRollCall, TimeSpan sumOfSpan) GetRollCallWorkingSpan(long employeeId, long workshopId,
DateTime contractStart, DateTime contractEnd)
{
//bool hasRollcall =
// _rollCallEmployeeRepository.HasRollCallRecord(employeeId, workshopId, contractStart, contractEnd);
//if (!hasRollcall)
// return (false, new TimeSpan());
List<RollCallViewModel> rollCallResult;
List<GroupedRollCalls> groupedRollCall;
rollCallResult = _context.RollCalls.Where(x =>
x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.StartDate.Value.Date >= contractStart.Date &&
x.StartDate.Value.Date <= contractEnd.Date && x.EndDate != null).Select(x => new RollCallViewModel()
{
StartDate = x.StartDate,
EndDate = x.EndDate,
ShiftSpan = (x.EndDate.Value - x.StartDate.Value),
CreationDate = x.ShiftDate,
BreakTimeSpan = x.BreakTimeSpan
}).ToList();
groupedRollCall = rollCallResult.GroupBy(x => x.CreationDate.Date).Select(x => new GroupedRollCalls()
{
CreationDate = x.Key,
ShiftList = x.Select(s => new ShiftList() { Start = s.StartDate!.Value, End = s.EndDate!.Value }).ToList(),
HasFriday = x.Any(s => s.StartDate != null && s.EndDate != null && (s.StartDate.Value.DayOfWeek == DayOfWeek.Friday || s.EndDate.Value!.DayOfWeek == DayOfWeek.Friday)),
SumOneDaySpan = new TimeSpan(x.Sum(shift => shift.ShiftSpan.Ticks)) - CalculateBreakTime(x.First().BreakTimeSpan,
new TimeSpan(x.Sum(shift => shift.ShiftSpan.Ticks))),
BreakTime = CalculateBreakTime(x.First().BreakTimeSpan, new TimeSpan(x.Sum(shift => shift.ShiftSpan.Ticks))),
}).OrderBy(x => x.CreationDate).ToList();
/// <summary>
/// محاسبه ساعات کارکرد پرسنل در صورت داشتن حضور غیاب
/// </summary>
/// <param name="employeeId"></param>
/// <param name="workshopId"></param>
/// <param name="contractStart"></param>
/// <param name="contractEnd"></param>
/// <returns></returns>
public (bool hasRollCall, TimeSpan sumOfSpan) GetRollCallWorkingSpan(long employeeId, long workshopId,
DateTime contractStart, DateTime contractEnd)
{
//bool hasRollcall =
// _rollCallEmployeeRepository.HasRollCallRecord(employeeId, workshopId, contractStart, contractEnd);
//if (!hasRollcall)
// return (false, new TimeSpan());
List<RollCallViewModel> rollCallResult;
List<GroupedRollCalls> groupedRollCall;
TimeSpan sumSpans = new TimeSpan(groupedRollCall.Sum(x => x.SumOneDaySpan.Ticks));
return (true, sumSpans);
}
rollCallResult = _context.RollCalls.Where(x =>
x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.StartDate.Value.Date >= contractStart.Date &&
x.StartDate.Value.Date <= contractEnd.Date && x.EndDate != null).Select(x => new RollCallViewModel()
{
StartDate = x.StartDate,
EndDate = x.EndDate,
ShiftSpan = (x.EndDate.Value - x.StartDate.Value),
CreationDate = x.ShiftDate,
BreakTimeSpan = x.BreakTimeSpan
}).ToList();
groupedRollCall = rollCallResult.GroupBy(x => x.CreationDate.Date).Select(x => new GroupedRollCalls()
{
CreationDate = x.Key,
ShiftList = x.Select(s => new ShiftList() { Start = s.StartDate!.Value, End = s.EndDate!.Value }).ToList(),
HasFriday = x.Any(s => s.StartDate != null && s.EndDate != null && (s.StartDate.Value.DayOfWeek == DayOfWeek.Friday || s.EndDate.Value!.DayOfWeek == DayOfWeek.Friday)),
SumOneDaySpan = new TimeSpan(x.Sum(shift => shift.ShiftSpan.Ticks)) - CalculateBreakTime(x.First().BreakTimeSpan,
new TimeSpan(x.Sum(shift => shift.ShiftSpan.Ticks))),
BreakTime = CalculateBreakTime(x.First().BreakTimeSpan, new TimeSpan(x.Sum(shift => shift.ShiftSpan.Ticks))),
}).OrderBy(x => x.CreationDate).ToList();
TimeSpan sumSpans = new TimeSpan(groupedRollCall.Sum(x => x.SumOneDaySpan.Ticks));
return (true, sumSpans);
}
public async Task<ComputingViewModel> RotatingShiftReport(long workshopId, long employeeId, DateTime contractStart, DateTime contractEnd, string shiftwork, bool hasRollCall, CreateWorkingHoursTemp command, bool holidayWorking)
@@ -939,19 +986,19 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
//public static TimeSpan CalculateBreakTime(BreakTime breakTime, TimeSpan sumOneDaySpan)
//{
// if (breakTime.BreakTimeType != BreakTimeType.WithTime)
// return new TimeSpan();
public static TimeSpan CalculateBreakTime(BreakTime breakTime, TimeSpan sumOneDaySpan)
{
if (breakTime.BreakTimeType != BreakTimeType.WithTime)
return new TimeSpan();
// var breakTimeSpan = breakTime.BreakTimeValue.ToTimeSpan();
var breakTimeSpan = breakTime.BreakTimeValue.ToTimeSpan();
// if (breakTimeSpan * 2 >= sumOneDaySpan)
// return new TimeSpan();
if (breakTimeSpan * 2 >= sumOneDaySpan)
return new TimeSpan();
// return breakTimeSpan; ;
return breakTimeSpan; ;
//}
}
public static TimeSpan CalculateBreakTime(TimeSpan breakTimeSpan, TimeSpan sumOneDaySpan)
{
if (breakTimeSpan * 2 >= sumOneDaySpan)
@@ -2090,7 +2137,7 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
var starTimeSingel1 = Convert.ToDateTime(shift1Start);
var endTimeSingel2 = Convert.ToDateTime(shift1End);
bool hasRestTime = false;
bool hasRestTime = false;
shift1StartGr = new DateTime(cuurentDate.Year, cuurentDate.Month, cuurentDate.Day, starTimeSingel1.Hour, starTimeSingel1.Minute, 0);
@@ -2099,92 +2146,92 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
if (shift1EndGr.TimeOfDay < shift1StartGr.TimeOfDay)
shift1EndGr = shift1EndGr.AddDays(1);
var shiftEndWithoutRest = shift1EndGr;
var shiftEndWithoutRest = shift1EndGr;
var shiftSpan = (shift1EndGr - shift1StartGr);
if (restTime > TimeSpan.Zero && shiftSpan >= restTime)
{
hasRestTime = true;
shift1EndGr = shift1EndGr.Subtract(restTime);
shiftSpan = (shift1EndGr - shift1StartGr);
}
var shiftSpan = (shift1EndGr - shift1StartGr);
if (restTime > TimeSpan.Zero && shiftSpan >= restTime)
{
hasRestTime = true;
shift1EndGr = shift1EndGr.Subtract(restTime);
shiftSpan = (shift1EndGr - shift1StartGr);
if (!leaveSearchResult.Any(x => x.StartLeaveGr < shift1EndGr && x.EndLeaveGr > shift1StartGr && x.PaidLeaveType =="روزانه"))
{
var hourseLeaveTypeResult = leaveSearchResult.FirstOrDefault(x =>
x.StartLeaveGr < shift1EndGr && x.EndLeaveGr > shift1StartGr && x.PaidLeaveType == "ساعتی");
if (hourseLeaveTypeResult == null)
{
result.Add(new RollCallViewModel()
{
BreakTimeSpan = hasRestTime ? restTime : TimeSpan.Zero,
StartDate = shift1StartGr,
EndDate = shift1EndGr,
ShiftSpan = shiftSpan,
ShiftDate = shift1StartGr,
}
if (!leaveSearchResult.Any(x => x.StartLeaveGr < shift1EndGr && x.EndLeaveGr > shift1StartGr && x.PaidLeaveType == "روزانه"))
{
var hourseLeaveTypeResult = leaveSearchResult.FirstOrDefault(x =>
x.StartLeaveGr < shift1EndGr && x.EndLeaveGr > shift1StartGr && x.PaidLeaveType == "ساعتی");
if (hourseLeaveTypeResult == null)
{
result.Add(new RollCallViewModel()
{
BreakTimeSpan = hasRestTime ? restTime : TimeSpan.Zero,
StartDate = shift1StartGr,
EndDate = shift1EndGr,
ShiftSpan = shiftSpan,
ShiftDate = shift1StartGr,
ShiftEndWithoutRest = shiftEndWithoutRest
});
}
else
{
});
}
else
{
if (hourseLeaveTypeResult.StartLeaveGr <= shift1StartGr && hourseLeaveTypeResult.EndLeaveGr < shift1EndGr)
{
//leave <-------------------->
//shift <---------------------------------->
result.Add(new RollCallViewModel()
{
BreakTimeSpan = hasRestTime ? restTime : TimeSpan.Zero,
StartDate = hourseLeaveTypeResult.EndLeaveGr,
EndDate = shift1EndGr,
ShiftSpan = (shift1EndGr - hourseLeaveTypeResult.EndLeaveGr),
ShiftDate = shift1StartGr,
ShiftEndWithoutRest = shiftEndWithoutRest
if (hourseLeaveTypeResult.StartLeaveGr <= shift1StartGr && hourseLeaveTypeResult.EndLeaveGr < shift1EndGr)
{
//leave <-------------------->
//shift <---------------------------------->
result.Add(new RollCallViewModel()
{
BreakTimeSpan = hasRestTime ? restTime : TimeSpan.Zero,
StartDate = hourseLeaveTypeResult.EndLeaveGr,
EndDate = shift1EndGr,
ShiftSpan = (shift1EndGr - hourseLeaveTypeResult.EndLeaveGr),
ShiftDate = shift1StartGr,
ShiftEndWithoutRest = shiftEndWithoutRest
});
}
else if (hourseLeaveTypeResult.StartLeaveGr > shift1StartGr && hourseLeaveTypeResult.EndLeaveGr < shift1EndGr)
{
//leave <-------------------->
//shift <---------------------------------->
result.Add(new RollCallViewModel()
{
BreakTimeSpan = hasRestTime ? restTime : TimeSpan.Zero,
StartDate = shift1StartGr,
EndDate = hourseLeaveTypeResult.StartLeaveGr,
ShiftSpan = (hourseLeaveTypeResult.StartLeaveGr - shift1StartGr),
ShiftDate = shift1StartGr,
ShiftEndWithoutRest = hourseLeaveTypeResult.StartLeaveGr
});
}
else if (hourseLeaveTypeResult.StartLeaveGr > shift1StartGr && hourseLeaveTypeResult.EndLeaveGr < shift1EndGr)
{
//leave <-------------------->
//shift <---------------------------------->
result.Add(new RollCallViewModel()
{
BreakTimeSpan = hasRestTime ? restTime : TimeSpan.Zero,
StartDate = shift1StartGr,
EndDate = hourseLeaveTypeResult.StartLeaveGr,
ShiftSpan = (hourseLeaveTypeResult.StartLeaveGr - shift1StartGr),
ShiftDate = shift1StartGr,
ShiftEndWithoutRest = hourseLeaveTypeResult.StartLeaveGr
});
});
result.Add(new RollCallViewModel()
{
BreakTimeSpan = hasRestTime ? restTime : TimeSpan.Zero,
StartDate = hourseLeaveTypeResult.EndLeaveGr,
EndDate = shift1EndGr,
ShiftSpan = (shift1EndGr - hourseLeaveTypeResult.EndLeaveGr),
ShiftDate = shift1StartGr,
ShiftEndWithoutRest = shiftEndWithoutRest
result.Add(new RollCallViewModel()
{
BreakTimeSpan = hasRestTime ? restTime : TimeSpan.Zero,
StartDate = hourseLeaveTypeResult.EndLeaveGr,
EndDate = shift1EndGr,
ShiftSpan = (shift1EndGr - hourseLeaveTypeResult.EndLeaveGr),
ShiftDate = shift1StartGr,
ShiftEndWithoutRest = shiftEndWithoutRest
});
}
else if (hourseLeaveTypeResult.StartLeaveGr > shift1StartGr && hourseLeaveTypeResult.EndLeaveGr >= shift1EndGr)
{
//leave <-------------------->
//shift <---------------------------------->
});
}
else if (hourseLeaveTypeResult.StartLeaveGr > shift1StartGr && hourseLeaveTypeResult.EndLeaveGr >= shift1EndGr)
{
//leave <-------------------->
//shift <---------------------------------->
result.Add(new RollCallViewModel()
{
BreakTimeSpan = hasRestTime ? restTime : TimeSpan.Zero,
StartDate = shift1StartGr,
EndDate = hourseLeaveTypeResult.StartLeaveGr,
ShiftSpan = (hourseLeaveTypeResult.StartLeaveGr - shift1StartGr),
ShiftDate = shift1StartGr,
ShiftEndWithoutRest = hourseLeaveTypeResult.StartLeaveGr
result.Add(new RollCallViewModel()
{
BreakTimeSpan = hasRestTime ? restTime : TimeSpan.Zero,
StartDate = shift1StartGr,
EndDate = hourseLeaveTypeResult.StartLeaveGr,
ShiftSpan = (hourseLeaveTypeResult.StartLeaveGr - shift1StartGr),
ShiftDate = shift1StartGr,
ShiftEndWithoutRest = hourseLeaveTypeResult.StartLeaveGr
});
});
}
@@ -3021,13 +3068,13 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
var endFarvarding = new DateTime(2025, 4, 20);
if (contractStart>endFarvarding)
if (contractStart > endFarvarding)
{
customizeWorkshopEmployeeSettings=_context.CustomizeWorkshopEmployeeSettings
customizeWorkshopEmployeeSettings = _context.CustomizeWorkshopEmployeeSettings
.AsSplitQuery().AsNoTracking().FirstOrDefault(x =>
x.WorkshopId == workshopId && x.EmployeeId == employeeId);
customizeWorkshopSettings =_context.CustomizeWorkshopSettings.AsNoTracking().FirstOrDefault(x => x.WorkshopId == workshopId);
customizeWorkshopSettings = _context.CustomizeWorkshopSettings.AsNoTracking().FirstOrDefault(x => x.WorkshopId == workshopId);
}
else
@@ -3982,40 +4029,40 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
}).ToList();
}
public List<LoanInstallmentViewModel> LoanInstallmentForCheckout(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd)
{
return _context.Loans
.Where(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId)
.SelectMany(x => x.LoanInstallments)
.Where(i => i.InstallmentDate >= contractStart && i.InstallmentDate <= contractEnd && i.IsActive == IsActive.True)
.Select(x => new LoanInstallmentViewModel()
{
Id = x.Id,
Month = x.Month,
IsActive = x.IsActive,
Amount = x.AmountForMonth.ToMoney(),
Year = x.Year,
AmountDouble = x.AmountForMonth,
RemainingAmount = _context.Loans.SelectMany(l => l.LoanInstallments).Where(i => i.LoanId == x.LoanId && i.IsActive == IsActive.True && i.InstallmentDate > x.InstallmentDate)
.Sum(i => i.AmountForMonth).ToMoney(),
LoanAmount = _context.Loans.FirstOrDefault(l => l.id == x.LoanId).Amount.ToMoney()
}).ToList();
}
public List<LoanInstallmentViewModel> LoanInstallmentForCheckout(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd)
{
return _context.Loans
.Where(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId)
.SelectMany(x => x.LoanInstallments)
.Where(i => i.InstallmentDate >= contractStart && i.InstallmentDate <= contractEnd && i.IsActive == IsActive.True)
.Select(x => new LoanInstallmentViewModel()
{
Id = x.Id,
Month = x.Month,
IsActive = x.IsActive,
Amount = x.AmountForMonth.ToMoney(),
Year = x.Year,
AmountDouble = x.AmountForMonth,
RemainingAmount = _context.Loans.SelectMany(l => l.LoanInstallments).Where(i => i.LoanId == x.LoanId && i.IsActive == IsActive.True && i.InstallmentDate > x.InstallmentDate)
.Sum(i => i.AmountForMonth).ToMoney(),
LoanAmount = _context.Loans.FirstOrDefault(l => l.id == x.LoanId).Amount.ToMoney()
}).ToList();
}
public List<SalaryAidViewModel> SalaryAidsForCheckout(long employeeId, long workshopId, DateTime checkoutStart, DateTime checkoutEnd)
{
return _context.SalaryAids
.Where(x => x.CalculationDate >= checkoutStart && x.CalculationDate <= checkoutEnd && x.EmployeeId == employeeId && x.WorkshopId == workshopId).Select(x => new SalaryAidViewModel()
{
Amount = x.Amount.ToMoney(),
AmountDouble = x.Amount,
SalaryAidDateTimeFa = x.SalaryAidDateTime.ToFarsi(),
SalaryAidDateTimeGe = x.SalaryAidDateTime,
CalculationDateTimeGe = x.CalculationDate,
CalculationDateTimeFa = x.CalculationDate.ToFarsi(),
Id = x.id
}).ToList();
}
public List<SalaryAidViewModel> SalaryAidsForCheckout(long employeeId, long workshopId, DateTime checkoutStart, DateTime checkoutEnd)
{
return _context.SalaryAids
.Where(x => x.CalculationDate >= checkoutStart && x.CalculationDate <= checkoutEnd && x.EmployeeId == employeeId && x.WorkshopId == workshopId).Select(x => new SalaryAidViewModel()
{
Amount = x.Amount.ToMoney(),
AmountDouble = x.Amount,
SalaryAidDateTimeFa = x.SalaryAidDateTime.ToFarsi(),
SalaryAidDateTimeGe = x.SalaryAidDateTime,
CalculationDateTimeGe = x.CalculationDate,
CalculationDateTimeFa = x.CalculationDate.ToFarsi(),
Id = x.id
}).ToList();
}
private void CreateRewardForBirthDay(long employeeId, long workshopId, double amount, int month, int year,
DateTime contractStart)

View File

@@ -152,16 +152,16 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
public List<CheckoutDailyRollCallViewModel> GetEmployeeRollCallsForMonth(long employeeId, long workshopId, DateTime startMonthDay, DateTime endMonthDay)
{
var firstDayOfMonth = $"{startMonthDay.ToFarsi().Substring(0,8)}01".ToGeorgianDateTime();
var endFarvardin = "1404/01/31".ToGeorgianDateTime();
//گرفتن ساعت استراحت پرسنل از تنظیمات
#region breakTime
//BaseCustomizeEntity settings = _context.CustomizeWorkshopEmployeeSettings.AsSplitQuery().FirstOrDefault(x =>
// x.WorkshopId == workshopId && x.EmployeeId == employeeId);
////اگر ساعت استراحت پرسنل وجود نداشت صفر است
//var breakTime = settings == null ? new BreakTime(false, new TimeOnly()) : settings.BreakTime;
BaseCustomizeEntity settings = _context.CustomizeWorkshopEmployeeSettings.AsSplitQuery().FirstOrDefault(x =>
x.WorkshopId == workshopId && x.EmployeeId == employeeId);
//اگر ساعت استراحت پرسنل وجود نداشت صفر است
var breakTime = settings == null ? new BreakTime(false, new TimeOnly()) : settings.BreakTime;
#endregion
var rollCalls = _context.RollCalls.Where(x =>
var rollCalls = _context.RollCalls.Where(x =>
x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.StartDate != null && x.EndDate != null && x.RollCallModifyType != RollCallModifyType.Undefined &&
x.ShiftDate.Date >= startMonthDay && x.ShiftDate.Date <= endMonthDay).ToList();
@@ -224,26 +224,30 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
var rollCallTimeSpanPerDay =
new TimeSpan(x.Where(y => y.EndDate != null).Sum(y => (y.EndDate - y.StartDate)!.Value.Ticks));
var breakTimePerDay = RollCallMandatoryRepository.CalculateBreakTime(x.First().BreakTimeSpan, rollCallTimeSpanPerDay);
TimeSpan breakTimePerDay ;
if(startMonthDay>endFarvardin)
breakTimePerDay= RollCallMandatoryRepository.CalculateBreakTime(x.First().BreakTimeSpan, rollCallTimeSpanPerDay);
else
breakTimePerDay = RollCallMandatoryRepository.CalculateBreakTime(breakTime, rollCallTimeSpanPerDay);
return new CheckoutDailyRollCallViewModel()
{
StartDate1 = orderedRollcalls.FirstOrDefault().StartDate.Value.ToString("HH:mm"),
EndDate1 = orderedRollcalls.FirstOrDefault().EndDate.Value.ToString("HH:mm"),
{
StartDate1 = orderedRollcalls.FirstOrDefault().StartDate.Value.ToString("HH:mm"),
EndDate1 = orderedRollcalls.FirstOrDefault().EndDate.Value.ToString("HH:mm"),
StartDate2 = orderedRollcalls.Skip(1).FirstOrDefault()?.StartDate?.ToString("HH:mm") ?? "",
EndDate2 = orderedRollcalls.Skip(1).FirstOrDefault()?.EndDate?.ToString("HH:mm") ?? "",
StartDate2 = orderedRollcalls.Skip(1).FirstOrDefault()?.StartDate?.ToString("HH:mm") ?? "",
EndDate2 = orderedRollcalls.Skip(1).FirstOrDefault()?.EndDate?.ToString("HH:mm") ?? "",
TotalhourseSpan = rollCallTimeSpanPerDay - breakTimePerDay,
TotalhourseSpan = rollCallTimeSpanPerDay - breakTimePerDay,
BreakTimeTimeSpan = breakTimePerDay,
BreakTimeTimeSpan = breakTimePerDay,
DayOfWeek = x.Key.DayOfWeek.DayOfWeeKToPersian(),
RollCallDateFa = x.Key.Date.ToFarsi(),
DateTimeGr = x.Key.Date,
IsSliced = x.Count() > 2,
IsAbsent = false
};
DayOfWeek = x.Key.DayOfWeek.DayOfWeeKToPersian(),
RollCallDateFa = x.Key.Date.ToFarsi(),
DateTimeGr = x.Key.Date,
IsSliced = x.Count() > 2,
IsAbsent = false
};
});

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +1,3 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=Govermentlist/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Mcls/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View File

@@ -770,15 +770,28 @@
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn" />
</label>
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="802" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> صفحه اصلی </span> </label>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80217" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> تب انجام نشده </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80218" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> تب در حال انجام </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80219" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> تب آماده ارسال لیست </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80220" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> تب انجام بیمه </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children "><input type="checkbox" disabled="disabled" value="80210" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> ایجاد </span> </label>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children "><input type="checkbox" disabled="disabled" value="80210" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> ایجاد لیست بیمه </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children "><input type="checkbox" disabled="disabled" value="80211" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> حذف </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80212" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> تایید ارسال </span> </label>
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80212" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> مراحل تایید </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80213" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> ویرایش </span> </label>

View File

@@ -783,13 +783,26 @@
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="802" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> صفحه اصلی </span> </label>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children "><input type="checkbox" disabled="disabled" value="80210" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> ایجاد </span> </label>
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80217" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> تب انجام نشده </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80218" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> تب در حال انجام </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80219" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> تب آماده ارسال لیست </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80220" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> تب انجام بیمه </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children "><input type="checkbox" disabled="disabled" value="80210" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> ایجاد لیست بیمه </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children "><input type="checkbox" disabled="disabled" value="80211" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> حذف </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80212" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> تایید ارسال </span> </label>
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80212" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> مراحل تایید </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80213" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> ویرایش </span> </label>

View File

@@ -56,7 +56,7 @@ public class IndexModel : PageModel
private readonly IWorkshopApplication _workshopApplication;
private readonly IYearlySalaryApplication _yearlySalaryApplication;
private readonly IYearlySalaryRepository _yearlySalaryRepository;
public List<CheckoutViewModel> chekoutlist;
public List<ComputingViewModel> ComputingView;
@@ -485,7 +485,10 @@ public class IndexModel : PageModel
TotalHolidaysAndNotH = mandatoryCompute.TotalHolidayAndNotH,
TotalHolidaysAndNotM = mandatoryCompute.TotalHolidayAndNotM,
DailFeeComplete = mandatoryCompute.DayliFeeComplete,
Signature = checkout.Signature
Signature = checkout.Signature,
};
_checkoutApplication.Create(command);
//if (checkout.Signature == "1")
@@ -963,7 +966,19 @@ public class IndexModel : PageModel
TotalDayOfBunosesCompute = bunosesPay.Bunoses > 0 ? $"{bunosesPay.TotalDayCompute}" : "0",
HolidayWorking = workshop.WorkshopHolidayWorking,
ShiftWork = workingHours.ShiftWork,
};
TotalWorkingTimeSpan=mandatoryCompute.TotalWorkingTimeSpan,
TotalBreakTimeSpan=mandatoryCompute.TotalBreakTimeSpan,
TotalPresentTimeSpan=mandatoryCompute.TotalPresentTimeSpan,
TotalPaidLeave=mandatoryCompute.TotalPaidLeave,
TotalSickLeave=mandatoryCompute.TotalSickLeave,
GroupedRollCalls = mandatoryCompute.GroupedRollCalls,
};
_checkoutApplication.Create(command);
//var workshopId = $"{contract.WorkshopIds}";
@@ -1013,7 +1028,7 @@ public class IndexModel : PageModel
public IActionResult OnGetPrintOne(long id)
{
var res = _checkoutApplication.PrintOne(id);
var res = _checkoutApplication.PrintAll([id]).FirstOrDefault();
//var res = _contractApplication.PrintAll(ids);
if (res.HasRollCall) return Partial("PrintDetailsRollCall", res);

View File

@@ -1,7 +1,7 @@
@using _0_Framework.Application
@model CompanyManagment.App.Contracts.Checkout.CheckoutViewModel
@{
string adminVersion = _0_Framework.Application.Version.AdminVersion;
string adminVersion = _0_Framework.Application.Version.AdminVersion;
}
<link href="~/assetsadmin/page/checkouts/css/printdetailsrollcall.css?ver=@adminVersion" rel="stylesheet" />
@@ -19,18 +19,18 @@
<div class="modal-body print" id="printThis">
<div class="row">
<div class="col-md-12">
<fieldset style="border: 1px solid black;
<fieldset 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-xs-3 d-inline-block"></div>
<div class="col-xs-6 d-inline-block text-center">
<p style="font-size: 18px; font-family: 'IranNastaliq' !important; margin-top:0 !important;">بسمه تعالی</p>
<p style="font-size: 15px; font-weight: bold; margin: 2px;">فیش حقوقی و رسید پرداخت حقوق</p>
</div>
<div class="col-xs-3 d-inline-block"><fieldset style="border: 1px solid black; border-radius: 15px; padding: 1px 15px 1px 15px; margin-top: 5px; width: 70%; font-size: 12px; text-align: center;"> @Model.ContractNo</fieldset></div>
<div class="col-xs-6 d-inline-block text-center">
<p style="font-size: 18px; font-family: 'IranNastaliq' !important; margin-top:0 !important;">بسمه تعالی</p>
<p style="font-size: 15px; font-weight: bold; margin: 2px;">فیش حقوقی و رسید پرداخت حقوق</p>
</div>
<div class="col-xs-3 d-inline-block"></div>
</div>
@@ -54,336 +54,336 @@
{
<span>@Model.FathersName</span>
}
</div>
<div style="width: 22%; padding: 3px 0 !important; border-right: 1px solid #000000 !important;">
<span class="cusSpanTitle">به کد ملی<span>:</span></span>
@if (string.IsNullOrWhiteSpace(@Model.NationalCode))
{
<span style="margin-left: 15px; visibility: hidden"></span>
}
else
{
<span>
@Model.NationalCode
</span>
}
</div>
<div style="width: 22%; padding: 3px 0 !important; border-right: 1px solid #000000 !important;">
<span class="cusSpanTitle">متولد<span>:</span></span>
@if (string.IsNullOrWhiteSpace(@Model.DateOfBirth))
{
<span style="visibility: hidden">1401/01/01</span>
}
else
{
<span>@Model.DateOfBirth</span>
}
</div>
</div>
</div>
<div class="col-xs-12" style="font-size: 12px; text-align: justify; padding: 0 10px;">
<div style="display: flex;align-items: center;border-bottom: 1px solid #000000 !important;height: 23px; padding: 0;">
@{
if (@Model.EmployerList.FirstOrDefault().IsLegal == "حقیقی")
{
<div style="width: 50%; padding: 3px 0 !important;">
<div>
<span class="cusSpanTitle">نام کارگاه<span>:</span> </span>
<span>@Model.WorkshopName</span>
}
</div>
<div style="width: 22%; padding: 3px 0 !important; border-right: 1px solid #000000 !important;">
<span class="cusSpanTitle">به کد ملی<span>:</span></span>
@if (string.IsNullOrWhiteSpace(@Model.NationalCode))
{
<span style="margin-left: 15px; visibility: hidden"></span>
}
else
{
<span>
@Model.NationalCode
</span>
}
</div>
<div style="width: 22%; padding: 3px 0 !important; border-right: 1px solid #000000 !important;">
<span class="cusSpanTitle">متولد<span>:</span></span>
@if (string.IsNullOrWhiteSpace(@Model.DateOfBirth))
{
<span style="visibility: hidden">1401/01/01</span>
}
else
{
<span>@Model.DateOfBirth</span>
}
</div>
</div>
</div>
<div class="col-xs-12" style="font-size: 12px; text-align: justify; padding: 0 10px;">
<div style="display: flex;align-items: center;border-bottom: 1px solid #000000 !important;height: 23px; padding: 0;">
@{
if (@Model.EmployerList.FirstOrDefault().IsLegal == "حقیقی")
{
<div style="width: 50%; padding: 3px 0 !important;">
<div>
<span class="cusSpanTitle">نام کارگاه<span>:</span> </span>
<span>@Model.WorkshopName</span>
</div>
</div>
</div>
<div style="width: 50%; padding: 3px 0 !important; border-right: 1px solid #000000 !important;">
<span class="cusSpanTitle">نام کارفرما<span>:</span> </span>
@if (Model.EmployerList.Count > 1)
{
<div style="width: 50%; padding: 3px 0 !important; border-right: 1px solid #000000 !important;">
<span class="cusSpanTitle">نام کارفرما<span>:</span> </span>
@if (Model.EmployerList.Count > 1)
{
<span>
@Model.EmployerList[0].EmployerFullName <span>،</span>
<span>&nbsp;</span>@Model.EmployerList[1].EmployerFullName
@if (@Model.EmployerList.Count > 2)
{
<span>و غیره</span>
}
</span>
}
else
{
<span>
@Model.EmployerList.FirstOrDefault().EmployerFullName
</span>
}
</div>
}
else if (@Model.EmployerList.FirstOrDefault().IsLegal == "حقوقی")
{
<div style="width: 100%; padding: 3px 0 !important;">
<span class="cusSpanTitle">پـرسنل شرکت/موسسه<span>:</span> </span>
<span>
@Model.EmployerList[0].EmployerFullName <span>،</span>
<span>&nbsp;</span>@Model.EmployerList[1].EmployerFullName
@if (@Model.EmployerList.Count > 2)
{
<span>و غیره</span>
}
@Model.WorkshopName
</span>
}
else
{
<span>
@Model.EmployerList.FirstOrDefault().EmployerFullName
</span>
}
</div>
</div>
}
}
</div>
<div style="text-align: justify; padding: 0 6px;">
@{
var items = new List<string>();
if (Model.MonthlySalary != "0") items.Add("حقوق و مزد");
if (Model.ConsumableItems != "0") items.Add("کمک هزینه اقلام مصرفی خانوار");
if (Model.HousingAllowance != "0") items.Add("کمک هزینه مسکن");
if (!string.IsNullOrWhiteSpace(Model.OvertimePay) && Model.OvertimePay != "0") items.Add("فوق العاده اضافه کاری");
if (!string.IsNullOrWhiteSpace(Model.NightworkPay) && Model.NightworkPay != "0") items.Add("فوق العاده شب کاری");
if (!string.IsNullOrWhiteSpace(Model.FridayPay) && Model.FridayPay != "0") items.Add("فوق العاده جمعه کاری");
if (Model.MissionPay != "0") items.Add("فوق العاده ماموریت");
if (Model.ShiftPay != "0") items.Add("فوق العاده نوبت کاری");
if (Model.FamilyAllowance != "0") items.Add("کمک هزینه عائله مندی");
if (Model.MarriedAllowance != "0") items.Add("حق تاهل");
if (Model.RewardPay != "0") items.Add("پاداش");
if (Model.BonusesPay != "0") items.Add("عیدی و پاداش");
if (Model.YearsPay != "0") items.Add("سنوات");
if (Model.LeavePay != "0") items.Add("مزد مرخصی");
string finalText = "";
if (items.Count == 1)
{
finalText = items[0];
}
else if (items.Count > 1)
{
finalText = string.Join("<span>،</span> ", items.Take(items.Count - 1)) + " و " + items.Last();
}
}
else if (@Model.EmployerList.FirstOrDefault().IsLegal == "حقوقی")
{
<div style="width: 100%; padding: 3px 0 !important;">
<span class="cusSpanTitle">پـرسنل شرکت/موسسه<span>:</span> </span>
<span>
@Model.WorkshopName
</span>
</div>
}
}
<span>
کلیه حق السعی خود اعم از @Html.Raw(finalText) @Model.Month ماه سال @Model.Year برابر با قرارداد به شماره فوق را از کارفرما بصورت وجه نقد و واریز به حساب دریافت نموده ام.
</span>
</div>
</div>
<div style="text-align: justify; padding: 0 6px;">
@{
var items = new List<string>();
</div>
</div>
if (Model.MonthlySalary != "0") items.Add("حقوق و مزد");
if (Model.ConsumableItems != "0") items.Add("کمک هزینه اقلام مصرفی خانوار");
if (Model.HousingAllowance != "0") items.Add("کمک هزینه مسکن");
if (!string.IsNullOrWhiteSpace(Model.OvertimePay) && Model.OvertimePay != "0") items.Add("فوق العاده اضافه کاری");
if (!string.IsNullOrWhiteSpace(Model.NightworkPay) && Model.NightworkPay != "0") items.Add("فوق العاده شب کاری");
if (!string.IsNullOrWhiteSpace(Model.FridayPay) && Model.FridayPay != "0") items.Add("فوق العاده جمعه کاری");
if (Model.MissionPay != "0") items.Add("فوق العاده ماموریت");
if (Model.ShiftPay != "0") items.Add("فوق العاده نوبت کاری");
if (Model.FamilyAllowance != "0") items.Add("کمک هزینه عائله مندی");
if (Model.MarriedAllowance != "0") items.Add("حق تاهل");
if (Model.RewardPay != "0") items.Add("پاداش");
if (Model.BonusesPay != "0") items.Add("عیدی و پاداش");
if (Model.YearsPay != "0") items.Add("سنوات");
if (Model.LeavePay != "0") items.Add("مزد مرخصی");
string finalText = "";
if (items.Count == 1)
{
finalText = items[0];
}
else if (items.Count > 1)
{
finalText = string.Join("<span>،</span> ", items.Take(items.Count - 1)) + " و " + items.Last();
}
}
<div class="row m-t-20">
<fieldset style="border: 1px solid black !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 10px;overflow:hidden">
<table style="/* table-layout: fixed; */ width: 100%">
<span>
کلیه حق السعی خود اعم از @Html.Raw(finalText) @Model.Month ماه سال @Model.Year برابر با قرارداد به شماره فوق را از کارفرما بصورت وجه نقد و واریز به حساب دریافت نموده ام.
</span>
</div>
</div>
</div>
</div>
<div class="row m-t-20">
<fieldset style="border: 1px solid black !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 10px;overflow:hidden">
<table style="/* table-layout: fixed; */ width: 100%">
<tr style="border-bottom: 1px solid; height: 25px; border-collapse: separate; background-color: #cdcdcd !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
@* <th style="text-align: center; width: 8mm; font-size: 12px; padding: 2px; border-collapse: separate; border-radius: 0px 10px 0px 0px;"> </th> *@
<th colspan="4" style="text-align: center; position: relative ; font-size: 13px;padding-top:4px;border-left: 2px solid #000;"> مطالبات </th>
@* <th style="text-align: center;"> </th>
<tr style="border-bottom: 1px solid; height: 25px; border-collapse: separate; background-color: #cdcdcd !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
@* <th style="text-align: center; width: 8mm; font-size: 12px; padding: 2px; border-collapse: separate; border-radius: 0px 10px 0px 0px;"> </th> *@
<th colspan="4" style="text-align: center; position: relative ; font-size: 13px;padding-top:4px;border-left: 2px solid #000;"> مطالبات </th>
@* <th style="text-align: center;"> </th>
<th style="text-align: center; border-left: 2px solid #000; font-size: 12px"> </th> *@
<th colspan="3" style="text-align: center; font-size: 13px; position: relative; padding-top: 4px;"> کسورات </th>
@* <th style="text-align: center; font-size: 12px; border-collapse: separate; border-radius: 0px 0px 0px 0px;"> </th>
<th colspan="3" style="text-align: center; font-size: 13px; position: relative; padding-top: 4px;"> کسورات </th>
@* <th style="text-align: center; font-size: 12px; border-collapse: separate; border-radius: 0px 0px 0px 0px;"> </th>
<th style="text-align: center; font-size: 12px; border-collapse: separate; border-radius: 10px 0px 0px 0px;"> </th> *@
</tr>
</tr>
<tr style="border-bottom: 1px solid; background-color: #e1e1e1 !important ;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<th style="width: 5%; text-align: center; border-left: 1px solid #000; font-size: 12px;padding: 2px"> ردیف </th>
<th style="width: 23%; text-align: center; border-left: 1px solid #000; font-size: 12px"> شرح </th>
<th style="width: 10%; text-align: center; border-left: 1px solid #000; font-size: 9px"> ساعت/روز/تعداد </th>
<th style="width: 12%; text-align: center; border-left: 2px solid #000; font-size: 12px"> مبلغ(ریال) </th>
<th style="width: 28%; text-align: center; border-left: 1px solid #000; font-size: 12px"> شرح </th>
<th style="width: 10%; text-align: center; border-left: 1px solid #000; font-size: 9px"> ساعت/روز/تعداد </th>
<th style="width: 12%; text-align: center; font-size: 12px"> مبلغ(ریال) </th>
</tr>
<tr style="border-bottom: 1px solid; background-color: #e1e1e1 !important ;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<th style="width: 5%; text-align: center; border-left: 1px solid #000; font-size: 12px;padding: 2px"> ردیف </th>
<th style="width: 23%; text-align: center; border-left: 1px solid #000; font-size: 12px"> شرح </th>
<th style="width: 10%; text-align: center; border-left: 1px solid #000; font-size: 9px"> ساعت/روز/تعداد </th>
<th style="width: 12%; text-align: center; border-left: 2px solid #000; font-size: 12px"> مبلغ(ریال) </th>
<th style="width: 28%; text-align: center; border-left: 1px solid #000; font-size: 12px"> شرح </th>
<th style="width: 10%; text-align: center; border-left: 1px solid #000; font-size: 9px"> ساعت/روز/تعداد </th>
<th style="width: 12%; text-align: center; font-size: 12px"> مبلغ(ریال) </th>
</tr>
<tr style="font-size: 12px; ">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">1</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> حقوق و مزد </td>
<td style="text-align: center; border-left: 1px solid #000;"> @Model.SumOfWorkingDays </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.MonthlySalary == "0" ? "-" : Model.MonthlySalary) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> حق بیمه سهم کارگر </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center;"> @(Model.InsuranceDeduction == "0" ? "-" : Model.InsuranceDeduction) </td>
</tr>
<tr style="font-size: 12px; ">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">1</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> حقوق و مزد </td>
<td style="text-align: center; border-left: 1px solid #000;"> @Model.SumOfWorkingDays </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.MonthlySalary == "0" ? "-" : Model.MonthlySalary) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> حق بیمه سهم کارگر </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center;"> @(Model.InsuranceDeduction == "0" ? "-" : Model.InsuranceDeduction) </td>
</tr>
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">2</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> پایه سنوات </td>
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.BaseYearsPay == "0" ? "-" : Model.SumOfWorkingDays) </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.BaseYearsPay == "0" ? "-" : Model.BaseYearsPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> مالیات بر حقوق </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center;"> @(Model.TaxDeducation == "0" ? "-" : Model.TaxDeducation) </td>
</tr>
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">2</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> پایه سنوات </td>
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.BaseYearsPay == "0" ? "-" : Model.SumOfWorkingDays) </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.BaseYearsPay == "0" ? "-" : Model.BaseYearsPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> مالیات بر حقوق </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center;"> @(Model.TaxDeducation == "0" ? "-" : Model.TaxDeducation) </td>
</tr>
<tr style="font-size: 12px;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">3</td>
<td style="padding-right: 8px; border-left: 1px solid #000; white-space: nowrap;"> کمک هزینه اقلام مصرفی خانوار </td>
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.ConsumableItems == "0" ? "-" : Model.SumOfWorkingDays) </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.ConsumableItems == "0" ? "-" : Model.ConsumableItems) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> قسط تسهیلات </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center;"> @(Model.InstallmentDeduction == "0" ? "-" : Model.InstallmentDeduction) </td>
</tr>
<tr style="font-size: 12px;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">3</td>
<td style="padding-right: 8px; border-left: 1px solid #000; white-space: nowrap;"> کمک هزینه اقلام مصرفی خانوار </td>
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.ConsumableItems == "0" ? "-" : Model.SumOfWorkingDays) </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.ConsumableItems == "0" ? "-" : Model.ConsumableItems) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> قسط تسهیلات </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center;"> @(Model.InstallmentDeduction == "0" ? "-" : Model.InstallmentDeduction) </td>
</tr>
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">4</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> کمک هزینه مسکن </td>
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.HousingAllowance == "0" ? "-" : Model.SumOfWorkingDays) </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.HousingAllowance == "0" ? "-" : Model.HousingAllowance) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> مساعده </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center;"> @(Model.SalaryAidDeduction == "0" ? "-" : Model.SalaryAidDeduction) </td>
</tr>
<tr style="font-size: 12px;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">5</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده اضافه کاری </td>
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.OverTimeWorkValue == "00:00" || string.IsNullOrWhiteSpace(Model.OverTimeWorkValue)) ? "-" : Model.OverTimeWorkValue) </td>
<td style="text-align: center; border-left: 2px solid #000;"> @((Model.OvertimePay == "0" || string.IsNullOrWhiteSpace(Model.OvertimePay)) ? "-" : Model.OvertimePay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> غیبت </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center;"> @(Model.AbsenceDeduction == "0" ? "-" : Model.AbsenceDeduction) </td>
</tr>
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">6</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده شب کاری </td>
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.OverNightWorkValue == "00:00" || string.IsNullOrWhiteSpace(Model.OverNightWorkValue)) ? "-" : Model.OverNightWorkValue) </td>
<td style="text-align: center; border-left: 2px solid #000;"> @((Model.NightworkPay == "0" || string.IsNullOrWhiteSpace(Model.NightworkPay)) ? "-" : Model.NightworkPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
</tr>
<tr style="font-size: 12px;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">7</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده جمعه کاری </td>
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.FridayWorkValue == "0" || string.IsNullOrWhiteSpace(Model.FridayWorkValue)) ? "-" : Model.FridayWorkValue) </td>
<td style="text-align: center; border-left: 2px solid #000;"> @((Model.FridayPay == "0" || string.IsNullOrWhiteSpace(Model.FridayPay)) ? "-" : Model.FridayPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
</tr>
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">8</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده ماموریت </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.MissionPay == "0" ? "-" : Model.MissionPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
</tr>
<tr style="font-size: 12px;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">9</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده نوبت کاری </td>
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.RotatingShiftValue == "0" || string.IsNullOrWhiteSpace(Model.RotatingShiftValue)) ? "-" : "%" + Model.RotatingShiftValue) </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.ShiftPay == "0" ? "-" : Model.ShiftPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
</tr>
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">10</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> کمک هزینه عائله مندی </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.FamilyAllowance == "0" ? "-" : Model.FamilyAllowance) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
</tr>
<tr style="font-size: 12px;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">11</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> حق تاهل </td>
<td style="text-align: center; border-left: 1px solid #000;"> @Model.MaritalStatus </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.MarriedAllowance == "0" ? "-" : Model.MarriedAllowance) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
</tr>
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">12</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> پاداش </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.RewardPay == "0" ? "-" : Model.RewardPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
</tr>
<tr style="font-size: 12px;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">13</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> عیدی و پاداش </td>
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.BonusesPay == "0" ? "-" : Model.SumOfWorkingDays) </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.BonusesPay == "0" ? "-" : Model.BonusesPay) </td>
@{
if (Model.IsLeft)
{
<td style="text-align: center; background-color: #ffffff !important;" colspan="3" rowspan="3">
<div style="border-top: 1px solid #000;border-top-left-radius: 15px;border-top-right-radius: 15px; height: 65px;">
<div style="padding: 0 6px; text-align: start;display: block;align-items: center;height: 64px;margin: 6px;">
<span>طبق تصفیه حساب نهایی تنظیمی فوق، آخرین روز اشتغال بکار اینجانب</span>
<span>@Model.LastDayOfWork</span>
<span>بوده و قطع همکاری با کارفرما و کارگاه از تاریخ</span>
<span>@Model.LeftWorkDate</span>
<span>می باشد</span>
</div>
</div>
</td>
}
else
{
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">4</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> کمک هزینه مسکن </td>
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.HousingAllowance == "0" ? "-" : Model.SumOfWorkingDays) </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.HousingAllowance == "0" ? "-" : Model.HousingAllowance) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> مساعده </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center;"> @(Model.SalaryAidDeduction == "0" ? "-" : Model.SalaryAidDeduction) </td>
</tr>
<tr style="font-size: 12px;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">5</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده اضافه کاری </td>
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.OverTimeWorkValue == "00:00" || string.IsNullOrWhiteSpace(Model.OverTimeWorkValue)) ? "-" : Model.OverTimeWorkValue) </td>
<td style="text-align: center; border-left: 2px solid #000;"> @((Model.OvertimePay == "0" || string.IsNullOrWhiteSpace(Model.OvertimePay)) ? "-" : Model.OvertimePay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> غیبت </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center;"> @(Model.AbsenceDeduction == "0" ? "-" : Model.AbsenceDeduction) </td>
</tr>
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">6</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده شب کاری </td>
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.OverNightWorkValue == "00:00" || string.IsNullOrWhiteSpace(Model.OverNightWorkValue)) ? "-" : Model.OverNightWorkValue) </td>
<td style="text-align: center; border-left: 2px solid #000;"> @((Model.NightworkPay == "0" || string.IsNullOrWhiteSpace(Model.NightworkPay)) ? "-" : Model.NightworkPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
}
}
</tr>
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">14</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> سنوات </td>
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.YearsPay == "0" ? "-" : Model.SumOfWorkingDays)</td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.YearsPay == "0" ? "-" : Model.YearsPay) </td>
@{
if (!Model.IsLeft)
{
</tr>
<tr style="font-size: 12px;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">7</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده جمعه کاری </td>
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.FridayWorkValue == "0" || string.IsNullOrWhiteSpace(Model.FridayWorkValue)) ? "-" : Model.FridayWorkValue) </td>
<td style="text-align: center; border-left: 2px solid #000;"> @((Model.FridayPay == "0" || string.IsNullOrWhiteSpace(Model.FridayPay)) ? "-" : Model.FridayPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
}
}
</tr>
<tr style="font-size: 12px;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">15</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> مزد مرخصی </td>
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.LeavePay == "0" ? "-" : Model.SumOfWorkingDays) </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.LeavePay == "0" ? "-" : Model.LeavePay) </td>
@{
if (!Model.IsLeft)
{
</tr>
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">8</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده ماموریت </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.MissionPay == "0" ? "-" : Model.MissionPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
}
}
</tr>
<tr style="font-size: 12px; height: 20px; background-color: #dddcdc !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; border-bottom: 1px solid #000; border-top: 1px solid #000; ">
<td style="text-align: center; padding: 2px "></td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> جمع مطالبات </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.TotalClaims == "0" ? "-" : Model.TotalClaims) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> جمع کسورات </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center;"> @(Model.TotalDeductions == "0" ? "-" : Model.TotalDeductions) </td>
</tr>
<tr style="font-size: 12px; border-radius: 0px 0px 10px 10px !important; height: 20px; background-color: #efefef !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<td style="text-align: center; padding: 2px; border-radius: 0px 0px 10px 0px "></td>
<td style="padding-right: 8px; border-left: 1px solid #000; "> مبلغ قابل پرداخت </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.TotalPayment == "0" ? "-" : Model.TotalPayment) </td>
<td style="padding-right: 8px;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-radius:0px 0px 0px 10px"> </td>
</tr>
</table>
</fieldset>
</div>
</tr>
<tr style="font-size: 12px;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">9</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده نوبت کاری </td>
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.RotatingShiftValue == "0" || string.IsNullOrWhiteSpace(Model.RotatingShiftValue)) ? "-" : "%" + Model.RotatingShiftValue) </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.ShiftPay == "0" ? "-" : Model.ShiftPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
</tr>
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">10</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> کمک هزینه عائله مندی </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.FamilyAllowance == "0" ? "-" : Model.FamilyAllowance) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
</tr>
<tr style="font-size: 12px;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">11</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> حق تاهل </td>
<td style="text-align: center; border-left: 1px solid #000;"> @Model.MaritalStatus </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.MarriedAllowance == "0" ? "-" : Model.MarriedAllowance) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
</tr>
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">12</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> پاداش </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.RewardPay == "0" ? "-" : Model.RewardPay) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
</tr>
<tr style="font-size: 12px;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">13</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> عیدی و پاداش </td>
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.BonusesPay == "0" ? "-" : Model.SumOfWorkingDays) </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.BonusesPay == "0" ? "-" : Model.BonusesPay) </td>
@{
if (Model.IsLeft)
{
<td style="text-align: center; background-color: #ffffff !important;" colspan="3" rowspan="3">
<div style="border-top: 1px solid #000;border-top-left-radius: 15px;border-top-right-radius: 15px; height: 65px;">
<div style="padding: 0 6px; text-align: start;display: block;align-items: center;height: 64px;margin: 6px;">
<span>طبق تصفیه حساب نهایی تنظیمی فوق، آخرین روز اشتغال بکار اینجانب</span>
<span>@Model.LastDayOfWork</span>
<span>بوده و قطع همکاری با کارفرما و کارگاه از تاریخ</span>
<span>@Model.LeftWorkDate</span>
<span>می باشد</span>
</div>
</div>
</td>
}
else
{
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
}
}
</tr>
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">14</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> سنوات </td>
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.YearsPay == "0" ? "-" : Model.SumOfWorkingDays)</td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.YearsPay == "0" ? "-" : Model.YearsPay) </td>
@{
if (!Model.IsLeft)
{
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
}
}
</tr>
<tr style="font-size: 12px;">
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">15</td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> مزد مرخصی </td>
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.LeavePay == "0" ? "-" : Model.SumOfWorkingDays) </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.LeavePay == "0" ? "-" : Model.LeavePay) </td>
@{
if (!Model.IsLeft)
{
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center;"> </td>
}
}
</tr>
<tr style="font-size: 12px; height: 20px; background-color: #dddcdc !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; border-bottom: 1px solid #000; border-top: 1px solid #000; ">
<td style="text-align: center; padding: 2px "></td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> جمع مطالبات </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.TotalClaims == "0" ? "-" : Model.TotalClaims) </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> جمع کسورات </td>
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
<td style="text-align: center;"> @(Model.TotalDeductions == "0" ? "-" : Model.TotalDeductions) </td>
</tr>
<tr style="font-size: 12px; border-radius: 0px 0px 10px 10px !important; height: 20px; background-color: #efefef !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<td style="text-align: center; padding: 2px; border-radius: 0px 0px 10px 0px "></td>
<td style="padding-right: 8px; border-left: 1px solid #000; "> مبلغ قابل پرداخت </td>
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.TotalPayment == "0" ? "-" : Model.TotalPayment) </td>
<td style="padding-right: 8px;"> </td>
<td style="text-align: center; border-left: 1px solid #000;"> </td>
<td style="text-align: center; border-radius:0px 0px 0px 10px"> </td>
</tr>
</table>
</fieldset>
</div>
<div style="">
<div class="" style="margin-top: 8px;background-color: #F6F6F6 !important;border: 1px solid #000;border-radius: 10px;display: grid;gap: 8px;padding: 8px 0;-webkit-print-color-adjust: exact;print-color-adjust: exact;padding: 6px;grid-template-columns: repeat(2, minmax(0, 1fr));width: 100%;">
@@ -580,47 +580,47 @@
<div class="" style="margin: 10px 0 0 0;display: flex;gap: 0px;">
<div style="width: 65%;">
<div style="display: flex; gap: 10px;">
<fieldset style="border: 1px solid black !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden; padding: 0; display: flex; width: 50%;">
<div style="display: flex; gap: 10px;">
<fieldset style="border: 1px solid black !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden; padding: 0; display: flex; width: 50%;">
<div class="table-container">
<table style="width: 100%;">
<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>
<div class="table-container">
<table style="width: 100%;">
<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>
<tr style="text-align: center; font-size: 10px; padding: 1px 4px; height: 15px; border-bottom: 1px solid; border-collapse: separate; background-color: #cdcdcd !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
<th colspan="3" style="text-align: center; font-size: 11px;">مساعده</th>
</tr>
<tr style="text-align: center; font-size: 10px; padding: 1px 4px; height: 15px; border-bottom: 1px solid; border-collapse: separate; background-color: #cdcdcd !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
<th colspan="3" style="text-align: center; font-size: 11px;">مساعده</th>
</tr>
<tr style="border-bottom: 1px solid; background-color: #e1e1e1 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 9px; height: 15px;">
<th style="padding: 1px 4px; text-align: center; border-left: 1px solid black; min-width: 3rem; font-size: 11px;">تاریخ</th>
<th style="padding: 1px 4px; text-align: center; min-width: 4rem; font-size: 11px;">مبلغ</th>
</tr>
<tr style="border-bottom: 1px solid; background-color: #e1e1e1 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 9px; height: 15px;">
<th style="padding: 1px 4px; text-align: center; border-left: 1px solid black; min-width: 3rem; font-size: 11px;">تاریخ</th>
<th style="padding: 1px 4px; text-align: center; min-width: 4rem; font-size: 11px;">مبلغ</th>
</tr>
@for (int i = 0; i < 5; i++)
{
<tr class="trTable" style="text-align: right; font-size: 10px; height: 15px;">
<td style="font-size: 8px; text-align: center;border-left: 1px solid black">
@(Model.SalaryAidViewModels != null && i < Model.SalaryAidViewModels.Count
? Model.SalaryAidViewModels[i]?.SalaryAidDateTimeFa ?? ""
: "")
</td>
<td style="font-size: 8px; text-align: center;">
@(Model.SalaryAidViewModels != null && i < Model.SalaryAidViewModels.Count
? Model.SalaryAidViewModels[i]?.Amount ?? ""
: "")
</td>
</tr>
}
@for (int i = 0; i < 5; i++)
{
<tr class="trTable" style="text-align: right; font-size: 10px; height: 15px;">
<td style="font-size: 8px; text-align: center;border-left: 1px solid black">
@(Model.SalaryAidViewModels != null && i < Model.SalaryAidViewModels.Count
? Model.SalaryAidViewModels[i]?.SalaryAidDateTimeFa ?? ""
: "")
</td>
<td style="font-size: 8px; text-align: center;">
@(Model.SalaryAidViewModels != null && i < Model.SalaryAidViewModels.Count
? Model.SalaryAidViewModels[i]?.Amount ?? ""
: "")
</td>
</tr>
}
</table>
</table>
</div>
</div>
</fieldset>
</fieldset>
<fieldset style="border: 1px solid black !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden; padding: 0; display: flex; width: 50%;">
<div class="table-container">
@@ -680,7 +680,7 @@
</div>
</div>
</fieldset>
</fieldset>
</div>
</div>
</div>
@@ -690,7 +690,7 @@
<input type="hidden" asp-for="Id" value="@Model.Id" />
<input type="hidden" id="shiftWorkval" name="shiftWorkval" value="@Model.CreateWorkingHoursTemp.ShiftWork">
<input type="hidden" id="shiftWorkval" name="shiftWorkval" value="@Model.CreateWorkingHoursTemp.ShiftWork">

View File

@@ -297,7 +297,22 @@
<script>
$(document).ready(function () {
$('#workshops').on('submit', function (e) {
var $submitBtn = $(this).find('button[type="submit"]');
if ($submitBtn.prop('disabled')) {
e.preventDefault();
return;
}
$submitBtn.prop('disabled', true);
setTimeout(function () {
$submitBtn.prop('disabled', false);
}, 3000);
});
});
$(".select2-tag").select2({
language: "fa",
dir: "rtl"

View File

@@ -178,7 +178,7 @@ public class IndexModel : PageModel
double included = 0; //مشمول
double sumOfWorkingDays = 0;
double benefitsIncludedNonContinuous = 0; //مزایای ماهانه غیر مشمول
double sumOfSalaries = 0;
double sumOfSalaries = 0;
double sumOfDailyWage = 0;
double insuredShare = 0;
double employerShare = 0; //سهم بیمه کارفرما
@@ -192,12 +192,12 @@ public class IndexModel : PageModel
double countWithoutLeft = 0;
double sumOfBaseYears = 0;
double sumOfMarriedAllowance = 0;
double sumOfDailyWagePlusBaseYear = 0;
double sumOfBenefitIncludedAndNotIncluded = 0; //مشمول و غیر مشمول
double sumOfDailyWagePlusBaseYear = 0;
double sumOfBenefitIncludedAndNotIncluded = 0; //مشمول و غیر مشمول
double sumOfMonthlySalaryWithoutBaseYears = 0; //جمع حقوق ماهیانه بدون پایه سنوات
for (var i = 0; i < employeeDetailsForInsuranceList.Count; i++)
for (var i = 0; i < employeeDetailsForInsuranceList.Count; i++)
{
var leftWorkDay = "";
if (!string.IsNullOrWhiteSpace(employeeDetailsForInsuranceList[i].LeftWorkDate))
@@ -214,16 +214,16 @@ public class IndexModel : PageModel
}
//بدست آوردن جمع پایه سنواتی
var baseYear = employeeDetailsForInsuranceList[i].BaseYears *
employeeDetailsForInsuranceList[i].WorkingDays;
sumOfBaseYears += baseYear;
var baseYear = employeeDetailsForInsuranceList[i].BaseYears *
employeeDetailsForInsuranceList[i].WorkingDays;
sumOfBaseYears += baseYear;
//بدست آوردن جمع حق تاهل
sumOfMarriedAllowance += employeeDetailsForInsuranceList[i].MarriedAllowance;
//بدست آوردن جمع حق تاهل
sumOfMarriedAllowance += employeeDetailsForInsuranceList[i].MarriedAllowance;
// if (employeeDetailsForInsuranceList[i].IncludeStatus && (employeeDetailsForInsuranceList[i].JobId == 10 || employeeDetailsForInsuranceList[i].JobId == 17 || employeeDetailsForInsuranceList[i].JobId == 18 || employeeDetailsForInsuranceList[i].JobId == 16))// 10 --> karfarma
if (!employeeDetailsForInsuranceList[i].IncludeStatus &&
// if (employeeDetailsForInsuranceList[i].IncludeStatus && (employeeDetailsForInsuranceList[i].JobId == 10 || employeeDetailsForInsuranceList[i].JobId == 17 || employeeDetailsForInsuranceList[i].JobId == 18 || employeeDetailsForInsuranceList[i].JobId == 16))// 10 --> karfarma
if (!employeeDetailsForInsuranceList[i].IncludeStatus &&
(employeeDetailsForInsuranceList[i].JobCode == "027079" ||
employeeDetailsForInsuranceList[i].JobCode == "024398" ||
employeeDetailsForInsuranceList[i].JobCode == "011015" ||
@@ -251,14 +251,18 @@ public class IndexModel : PageModel
monthlyBenefits = monthlyBenefits + +employeeDetailsForInsuranceList[i].MonthlyBenefits;
sumOfIncluded = sumOfIncluded + employeeDetailsForInsuranceList[i].BenefitsIncludedContinuous;
sumOfDailyWagePlusBaseYear += employeeDetailsForInsuranceList[i].DailyWagePlusBaseYears;
sumOfDailyWagePlusBaseYear += employeeDetailsForInsuranceList[i].DailyWagePlusBaseYears;
//Mahan Changes
//مجموع حقوق ماهیانه خالص
sumOfMonthlySalaryWithoutBaseYears +=
GetRoundValueWhitGovermentlist(employeeDetailsForInsuranceList[i].DailyWage * employeeDetailsForInsuranceList[i].WorkingDays, typeOfInsuranceSendWorkshop);
if (leftWorkDay != "01") //اگر ترک کار آن یکم ماه نبود
if (leftWorkDay != "01") //اگر ترک کار آن یکم ماه نبود
sumOfBenefitIncludedAndNotIncluded += employeeDetailsForInsuranceList[i].IncludedAndNotIncluded;
benefitsIncludedNonContinuous += employeeDetailsForInsuranceList[i].BenefitsIncludedNonContinuous;
insuredShare = insuredShare + employeeDetailsForInsuranceList[i].InsuranceShare;
benefitsIncludedNonContinuous += employeeDetailsForInsuranceList[i].BenefitsIncludedNonContinuous;
insuredShare = insuredShare + employeeDetailsForInsuranceList[i].InsuranceShare;
}
employerShare = GetRoundValueWhitGovermentlist(sumOfIncluded * 20 / 100, typeOfInsuranceSendWorkshop);
@@ -301,6 +305,13 @@ public class IndexModel : PageModel
employerShare = GetRoundValueWhitGovermentlist(result, typeOfInsuranceSendWorkshop);
}
//اگر گارگاه کمک دولت بود بعد از اجرای فرمول ها
//بیست درصد از اختلاف ( مجموع حقوق خالص با مجموع مزایای مشمول ) به سهم کارفرما اضافه میشود
if (typeOfInsuranceSendWorkshop == "Govermentlist")
{
var result = ((sumOfIncluded - sumOfMonthlySalaryWithoutBaseYears) * 20 / 100);
employerShare += GetRoundValueWhitGovermentlist(result, typeOfInsuranceSendWorkshop);
}
#endregion
//sumOfIncluded مجموع حقوق و مزایای ماهیانه مشمول
@@ -399,18 +410,18 @@ public class IndexModel : PageModel
//جمع پایه سنواتی
SumOfBaseYears = sumOfBaseYears.ToMoney(),
//جمع حق تاهل
SumOfMarriedAllowance = sumOfMarriedAllowance.ToMoney(),
SumOfMarriedAllowance = sumOfMarriedAllowance.ToMoney(),
//جمع دستمزد روزانه + پایه سنوات روزانه
SumOfDailyWagePlusBaseYears = sumOfDailyWagePlusBaseYear.ToMoney(),
//جمع دستمزد روزانه + پایه سنوات روزانه
SumOfDailyWagePlusBaseYears = sumOfDailyWagePlusBaseYear.ToMoney(),
//جمع مزایای غیر مشمول
SumOfBenefitsIncludedNonContinuous = benefitsIncludedNonContinuous.ToMoney(),
SumOfBenefitsIncludedNonContinuous = benefitsIncludedNonContinuous.ToMoney(),
});
});
}
public IActionResult OnPostCreate(CreateInsuranceList command)
{
//var result =new OperationResult();
@@ -562,14 +573,14 @@ public class IndexModel : PageModel
odbf.Header.AddColumn(new DbfColumn("DSK_DISC", DbfColumn.DbfColumnType.Character, 100, 0));
//تعداد کارکنان
odbf.Header.AddColumn(new DbfColumn("DSK_NUM", DbfColumn.DbfColumnType.Number, 5, 0));
//مجموع روزهای کارکرد کارکنان
odbf.Header.AddColumn(new DbfColumn("DSK_TDD", DbfColumn.DbfColumnType.Number, 6, 0));
//مجموع روزهای کارکرد کارکنان
odbf.Header.AddColumn(new DbfColumn("DSK_TDD", DbfColumn.DbfColumnType.Number, 6, 0));
//مجموع دستمزد روزانه کارکنان
odbf.Header.AddColumn(new DbfColumn("DSK_TROOZ", DbfColumn.DbfColumnType.Number, 12, 0));
//مجموع دستمزد ماهانه کارکنان
odbf.Header.AddColumn(new DbfColumn("DSK_TMAH", DbfColumn.DbfColumnType.Number, 12, 0));
//مجموع مزایای ماهانه مشمول
odbf.Header.AddColumn(new DbfColumn("DSK_TMAZ", DbfColumn.DbfColumnType.Number, 12, 0));
//مجموع مزایای ماهانه مشمول
odbf.Header.AddColumn(new DbfColumn("DSK_TMAZ", DbfColumn.DbfColumnType.Number, 12, 0));
//مجموع دستمزد و مزایای ماهانه مشمول
odbf.Header.AddColumn(new DbfColumn("DSK_TMASH", DbfColumn.DbfColumnType.Number, 12, 0));
// مجموع کل دستمزد و مزایای ماهانه مشمول و غیر مشمول
@@ -589,11 +600,11 @@ public class IndexModel : PageModel
//ردیف پیمان
odbf.Header.AddColumn(new DbfColumn("MON_PYM", DbfColumn.DbfColumnType.Character, 3, 0));
//مجموع پایه سنواتی ها
odbf.Header.AddColumn(new DbfColumn("DSK_INC", DbfColumn.DbfColumnType.Character, 12, 0));
//مجموع حق تاهل ها
odbf.Header.AddColumn(new DbfColumn("DSK_SPOUSE", DbfColumn.DbfColumnType.Character, 12, 0));
var orec = new DbfRecord(odbf.Header);
//مجموع پایه سنواتی ها
odbf.Header.AddColumn(new DbfColumn("DSK_INC", DbfColumn.DbfColumnType.Character, 12, 0));
//مجموع حق تاهل ها
odbf.Header.AddColumn(new DbfColumn("DSK_SPOUSE", DbfColumn.DbfColumnType.Character, 12, 0));
var orec = new DbfRecord(odbf.Header);
//کد کارگاه
orec[0] = GetSpecifiedCharactes(createInsuranceList.InsuranceWorkshopInfo.InsuranceCode, 10);
@@ -615,12 +626,12 @@ public class IndexModel : PageModel
orec[8] = GetSpecifiedCharactes("", 100).ToIranSystem();
//تعداد کرکنان
orec[9] = createInsuranceList.SumOfEmployees.ToString();
//مجموع روزهای کارکرد کارکنان
orec[10] = createInsuranceList.SumOfWorkingDays.ToString();
//مجموع روزهای کارکرد کارکنان
orec[10] = createInsuranceList.SumOfWorkingDays.ToString();
//مجموع دستمزد روزانه کارکنان
orec[11] = createInsuranceList.SumOfDailyWage.ToString();
//مجموع دستمزد ماهانه کارکنان
orec[12] = createInsuranceList.SumOfSalaries.ToString();
//مجموع دستمزد ماهانه کارکنان
orec[12] = createInsuranceList.SumOfSalaries.ToString();
//مجموع مزایای ماهانه مشمول
orec[13] = createInsuranceList.SumOfBenefitsIncluded.ToString();
//مجموع دستمزد و مزایای ماهانه مشمول
@@ -631,7 +642,7 @@ public class IndexModel : PageModel
orec[16] = createInsuranceList.InsuredShare.ToString();
//مجموع حق بیمه سهم کارفرما
orec[17] = createInsuranceList.EmployerShare.ToString(); //"44911361";
//مجموع حق بیمه بیکاری
//مجموع حق بیمه بیکاری
orec[18] = createInsuranceList.UnEmploymentInsurance.ToString();
//نرخ حق بیمه
orec[19] = "23";
@@ -642,18 +653,18 @@ public class IndexModel : PageModel
//ردیف پیمان
orec[22] = GetSpecifiedCharactes(createInsuranceList.InsuranceWorkshopInfo.AgreementNumber, 12);
//مجموع پایه سنواتی ها
orec[23] = createInsuranceList.SumOfBaseYears.ToString();
//مجموع پایه سنواتی ها
orec[23] = createInsuranceList.SumOfBaseYears.ToString();
//مجموع حق تاهل ها
orec[24] = createInsuranceList.SumOfMarriedAllowance.ToString();
//مجموع حق تاهل ها
orec[24] = createInsuranceList.SumOfMarriedAllowance.ToString();
odbf.Write(orec);
odbf.Write(orec);
//odbf.Header.RecordCount = 50;
odbf.WriteHeader();
odbf.Close();
}
//ایجاد فایل پرسنل - DSW
if (createInsuranceList.EmployeeInsurancListDataList != null)
{
@@ -715,12 +726,12 @@ public class IndexModel : PageModel
// کد ملی
dsw.Header.AddColumn(new DbfColumn("PER_NATCOD", DbfColumn.DbfColumnType.Character, 10, 0));
// پایه سنوات
dsw.Header.AddColumn(new DbfColumn("DSW_INC", DbfColumn.DbfColumnType.Number, 12, 0));
// حق تاهل
dsw.Header.AddColumn(new DbfColumn("DSW_SPOUSE", DbfColumn.DbfColumnType.Number, 12, 0));
// پایه سنوات
dsw.Header.AddColumn(new DbfColumn("DSW_INC", DbfColumn.DbfColumnType.Number, 12, 0));
// حق تاهل
dsw.Header.AddColumn(new DbfColumn("DSW_SPOUSE", DbfColumn.DbfColumnType.Number, 12, 0));
foreach (var item in createInsuranceList.EmployeeInsurancListDataList)
foreach (var item in createInsuranceList.EmployeeInsurancListDataList)
{
var employee = createInsuranceList.EmployeeDetailsForInsuranceList.FirstOrDefault(p => p.EmployeeId == item.EmployeeId);
@@ -798,12 +809,12 @@ public class IndexModel : PageModel
//کد ملی
dswrec[26] = employee.NationalCode;
//پایه سنوات
dswrec[27] = item.BaseYears.ToString();
//حق تاهل
dswrec[28] = item.MarriedAllowance.ToString();
//پایه سنوات
dswrec[27] = item.BaseYears.ToString();
//حق تاهل
dswrec[28] = item.MarriedAllowance.ToString();
dsw.Write(dswrec);
dsw.Write(dswrec);
}
@@ -845,18 +856,18 @@ public class IndexModel : PageModel
return Partial("Edit", insurance);
}
//-2
/// <summary>
/// لود اطلاعات پرسنل در مودال ویرایش بیمه -- DSKWOR
/// محاسبه تب پرسنل
/// </summary>
/// <param name="searchModel"></param>
/// <returns></returns>
public IActionResult OnGetEmployeeListForEdit(EmployeeForEditInsuranceListSearchModel searchModel)
//-2
/// <summary>
/// لود اطلاعات پرسنل در مودال ویرایش بیمه -- DSKWOR
/// محاسبه تب پرسنل
/// </summary>
/// <param name="searchModel"></param>
/// <returns></returns>
public IActionResult OnGetEmployeeListForEdit(EmployeeForEditInsuranceListSearchModel searchModel)
{
// var result = _insuranceListApplication.SearchEmployeeListForEditByInsuranceListId(searchModel);
var result = _insuranceListApplication.GetEmployeeListForEditByInsuranceListId(searchModel);
return Partial("./EmployeeListForEdit", result);
// var result = _insuranceListApplication.SearchEmployeeListForEditByInsuranceListId(searchModel);
var result = _insuranceListApplication.GetEmployeeListForEditByInsuranceListId(searchModel);
return Partial("./EmployeeListForEdit", result);
}
//-3
@@ -899,7 +910,7 @@ public class IndexModel : PageModel
}
return new JsonResult(result);
}
}
#endregion
public IActionResult OnGetInsuranceSummary(long id)
@@ -925,7 +936,7 @@ public class IndexModel : PageModel
string benefitsIncludedContinuous, string jobId, string housingAllowance, string includeStatus,
string consumableItems, string endMonthCurrentDay, long employeeId, double maritalStatus, double baseYear)
{
if(workingDays == "0")
if (workingDays == "0")
return new JsonResult(new
{
monthlySalaryPlusBaseYear = "0",
@@ -939,15 +950,15 @@ public class IndexModel : PageModel
baseYears = "0",
});
var benefitsIncludedContinuousL = benefitsIncludedContinuous.MoneyToDouble();
bool isManager = jobId is "10" or "16" or "17" or "18" or "3498";
bool isManager = jobId is "10" or "16" or "17" or "18" or "3498";
//if (isManager && includeStatus !="1") شنبه
if (isManager)
maritalStatus = 0;
double sum = 0;
double sum = 0;
var employeeMaritalStatus = _employeeApplication.GetDetails(employeeId);
if (employeeMaritalStatus.MaritalStatus == "متاهل")
sum = consumableItems.MoneyToDouble() + housingAllowance.MoneyToDouble() + maritalStatus;
@@ -960,10 +971,10 @@ public class IndexModel : PageModel
var jobIdL = Convert.ToInt64(jobId);
var includeStatusL = Convert.ToInt64(includeStatus);
var dailyWageL = (dailyWage.MoneyToDouble()) + baseYear;
var dailyWageWithOutBaseYear = dailyWage.MoneyToDouble();
var dailyWageWithOutBaseYear = dailyWage.MoneyToDouble();
if (workingDaysL == endMonthCurrentDayL) benefitsIncludedContinuousL = sum;
if (workingDaysL == endMonthCurrentDayL) benefitsIncludedContinuousL = sum;
//farokhiChanges
if (employeeId == 42783)
benefitsIncludedContinuousL = 53082855;
@@ -986,24 +997,24 @@ public class IndexModel : PageModel
// benefitsIncludedContinuousL = 0;
//}
if (isManager && includeStatus != "1")
benefitsIncludedContinuousL = 0;
benefitsIncludedContinuousL = 0;
var monthlySalaryL = workingDaysL * dailyWageL;
var insuranceShareL = (benefitsIncludedContinuousL + monthlySalaryL) * 7 / 100;
insuranceShareL = _insuranceListApplication.GetRoundValue(insuranceShareL);
var monthlySalaryWithOutBaseYear = workingDaysL * dailyWageWithOutBaseYear;
//var persianBefore = "";
//var year = Convert.ToInt32(date.Substring(0, 4));
//var month = Convert.ToInt32(date.Substring(5, 2));
//var day = Convert.ToInt32(date.Substring(8, 2));
//var persianDate = new PersianDateTime(year, month, day);
//var persianBeforeDate = persianDate.AddDays(-1);
//persianBefore = persianBeforeDate.ToString("yyyy/MM/dd");
var monthlySalaryWithOutBaseYear = workingDaysL * dailyWageWithOutBaseYear;
//var persianBefore = "";
//var year = Convert.ToInt32(date.Substring(0, 4));
//var month = Convert.ToInt32(date.Substring(5, 2));
//var day = Convert.ToInt32(date.Substring(8, 2));
//var persianDate = new PersianDateTime(year, month, day);
//var persianBeforeDate = persianDate.AddDays(-1);
//persianBefore = persianBeforeDate.ToString("yyyy/MM/dd");
if (benefitsIncludedContinuousL == 0 && monthlySalaryL == 0 && insuranceShareL == 0 && dailyWageL == 0)
if (benefitsIncludedContinuousL == 0 && monthlySalaryL == 0 && insuranceShareL == 0 && dailyWageL == 0)
workingDaysL = 0;
if (benefitsIncludedContinuousL == 0 && monthlySalaryL == 0 && insuranceShareL == 0 &&
workingDaysL == 0) dailyWageL = 0;
workingDaysL == 0) dailyWageL = 0;
var includeStatusBool = includeStatus == "1";
double marridAllowance = 0;
@@ -1013,23 +1024,23 @@ public class IndexModel : PageModel
includeStatusBool, Convert.ToInt32(workingDays), maritalStatus, Convert.ToInt32(endMonthCurrentDay));
}
var baseYears = baseYear;
var baseYears = baseYear;
Console.WriteLine(baseYears);
return new JsonResult(new
{
monthlySalaryPlusBaseYear = monthlySalaryL.ToMoney(),
monthlySalary = monthlySalaryWithOutBaseYear.ToMoney(),
monthlySalaryPlusBaseYear = monthlySalaryL.ToMoney(),
monthlySalary = monthlySalaryWithOutBaseYear.ToMoney(),
benefitsIncludedContinuous = benefitsIncludedContinuousL.ToMoney(),
insuranceShare = insuranceShareL.ToMoney(),
workingDay = workingDaysL,
dailyWag = dailyWageWithOutBaseYear.ToMoney(),
dailyWagePlusBaseYear = dailyWageL,
dailyWagePlusBaseYear = dailyWageL,
marriedAllowance = marridAllowance.ToMoney(),
baseYears = baseYears.ToMoney(),
});
});
}
public double GetRoundValueWhitGovermentlist(double value, string type)
{
@@ -1073,7 +1084,7 @@ public class IndexModel : PageModel
{
var result = _employerApplication.GetEmployerWithFNameOrLName(searchText);
result = result.OrderBy(x => x.LName.Length).ToList();
return new JsonResult(new
return new JsonResult(new
{
IsSuccedded = true,
mylist = result
@@ -1115,8 +1126,8 @@ public class IndexModel : PageModel
}
public async Task<IActionResult> OnGetOperationsModal(long id)
{
var command = await _insuranceListApplication.GetInsuranceOperationDetails(id);
{
var command = await _insuranceListApplication.GetInsuranceOperationDetails(id);
return Partial("_Partials/OperationsModal", command);
}

View File

@@ -5,13 +5,13 @@
}
<h1>Upload File</h1>
@* <form asp-page-handler="Upload" id="1" method="post" enctype="multipart/form-data">
<form asp-page-handler="Upload" id="1" method="post" enctype="multipart/form-data">
<div>
<label asp-for="File">Choose a file:</label>
<input asp-for="File" type="file" required>
</div>
<button type="submit">Upload</button>
</form> *@
</form>
<form asp-page-handler="ShiftDate" id="8" method="post">

View File

@@ -233,7 +233,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.Checkouts
public IActionResult OnGetPrintOne(long id)
{
var res = _checkoutApplication.PrintOne(id);
var res = _checkoutApplication.PrintAll([id]).FirstOrDefault();
if (res.HasRollCall)
return Partial("PrintOneRollCall", res);
@@ -246,7 +246,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.Checkouts
public IActionResult OnGetPrintOneMobile(long id)
{
var res = _checkoutApplication.PrintOne(id);
var res = _checkoutApplication.PrintAll([id]).FirstOrDefault();
if (res.HasRollCall)
return Partial("PrintOneRollCall", res);

View File

@@ -100,7 +100,7 @@
<div class="card p-0">
<div class="card-section-btn bg-white">
<div class="content btn-group">
<a href="/apk/android" type="button" class="btn-download-android d-flex align-items-center justify-content-center">
<a href="/apk/android?@Guid.NewGuid()" type="button" class="btn-download-android d-flex align-items-center justify-content-center">
<svg width="30" height="30" fill="#ffffff" viewBox="-1 0 24 24" xmlns="http://www.w3.org/2000/svg">
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>

View File

@@ -197,7 +197,7 @@
@if (Model.HasApkToDownload)
{
<div class="d-md-none d-block" style="position: static; margin-top:100px;" id="downloadAppLogin">
<a href="/apk/android" type="button" class="btn-login d-block mx-auto w-100 text-white px-3 py-2 d-flex align-items-center">
<a href="/apk/android?@Guid.NewGuid()" type="button" class="btn-login d-block mx-auto w-100 text-white px-3 py-2 d-flex align-items-center">
<svg width="18" height="18" fill="#ffffff" viewBox="-1 0 24 24" xmlns="http://www.w3.org/2000/svg">
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>

View File

@@ -6,8 +6,11 @@
<!--<StartupObject>ServiceHost.Program</StartupObject>-->
</PropertyGroup>
<PropertyGroup>
<RazorCompileOnBuild>true</RazorCompileOnBuild>
</PropertyGroup>
<!--<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<!--<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<Optimize>True</Optimize>
</PropertyGroup>