compute insuranceEmployeeShare on checkout
This commit is contained in:
11070
CompanyManagment.EFCore/Migrations/20251027125514_hasInsuranceShareTheSameAsList_checkoutTable.Designer.cs
generated
Normal file
11070
CompanyManagment.EFCore/Migrations/20251027125514_hasInsuranceShareTheSameAsList_checkoutTable.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class hasInsuranceShareTheSameAsList_checkoutTable : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "HasInsuranceShareTheSameAsList",
|
||||
table: "Checkouts",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "HasInsuranceShareTheSameAsList",
|
||||
table: "Checkouts");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -415,6 +415,9 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Property<bool>("HasAmountConflict")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("HasInsuranceShareTheSameAsList")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("HasRollCall")
|
||||
.HasColumnType("bit");
|
||||
|
||||
|
||||
@@ -524,6 +524,8 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
|
||||
entity.SetLoanInstallment(command.LoanInstallments, command.InstallmentDeduction);
|
||||
entity.SetCheckoutRollCall(command.CheckoutRollCall);
|
||||
entity.SetEmployeeMandatoryHours(command.EmployeeMandatoryHours);
|
||||
if(command.HasInsuranceShareTheSameAsList)
|
||||
entity.SetInsuranceShare();
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user