add is installment to institutioncontract
This commit is contained in:
@@ -125,6 +125,9 @@ public class InstitutionContract : EntityBase
|
||||
[NotMapped]
|
||||
public bool VerifyCodeExpired => VerifyCodeCreation.AddMinutes(5) <= DateTime.Now;
|
||||
|
||||
public bool IsInstallment { get; set; }
|
||||
|
||||
|
||||
public InstitutionContractVerificationStatus VerificationStatus { get; private set; }
|
||||
|
||||
public InstitutionContractWorkshopGroup WorkshopGroup { get; private set; }
|
||||
@@ -209,8 +212,10 @@ public class InstitutionContract : EntityBase
|
||||
public void SetInstallments(List<InstitutionContractInstallment> installments)
|
||||
{
|
||||
Installments = installments;
|
||||
IsInstallment = true;
|
||||
}
|
||||
|
||||
|
||||
public void SetVerifyCode(string code)
|
||||
{
|
||||
VerifyCode = code;
|
||||
|
||||
@@ -231,6 +231,7 @@ public class GetInstitutionVerificationDetailsViewModel
|
||||
public string TaxPrice { get; set; }
|
||||
public string PaymentPrice { get; set; }
|
||||
public List<InstitutionContractInstallmentViewModel> Installments { get; set; }
|
||||
public bool IsInstallment { get; set; }
|
||||
}
|
||||
|
||||
public class InstitutionContratVerificationParty
|
||||
|
||||
10934
CompanyManagment.EFCore/Migrations/20250928122228_add is installment to institutioncontract.Designer.cs
generated
Normal file
10934
CompanyManagment.EFCore/Migrations/20250928122228_add is installment to institutioncontract.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 addisinstallmenttoinstitutioncontract : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsInstallment",
|
||||
table: "InstitutionContracts",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsInstallment",
|
||||
table: "InstitutionContracts");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3108,6 +3108,9 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<bool>("IsInstallment")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<double>("Obligation")
|
||||
.HasColumnType("float");
|
||||
|
||||
|
||||
@@ -1700,6 +1700,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
TaxPrice = query.contract.ValueAddedTax.ToMoney(),
|
||||
TotalPrice = (query.contract.TotalAmount - query.contract.ValueAddedTax).ToMoney(),
|
||||
PaymentPrice = query.contract.TotalAmount.ToMoney(),
|
||||
IsInstallment = query.contract.IsInstallment,
|
||||
Installments = query.contract.Installments.OrderBy(x=>x.InstallmentDateGr)
|
||||
.Select(x =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user