Merge branch 'Feature/institution-contract/verification-modifies' into Main

This commit is contained in:
2025-12-29 19:15:37 +03:30
9 changed files with 29 additions and 11 deletions

View File

@@ -23,6 +23,8 @@ public class InstitutionContractWorkshopGroup : EntityBase
!InitialWorkshops.Cast<InstitutionContractWorkshopBase>()
.SequenceEqual(CurrentWorkshops.Cast<InstitutionContractWorkshopBase>());
public bool IsInPersonContract => InitialWorkshops.Any(x => x.Services.ContractInPerson);
public InstitutionContractWorkshopGroup(long institutionContractId,
List<InstitutionContractWorkshopInitial> initialDetails)
{

View File

@@ -38,7 +38,6 @@ public class ExcelColumnConfig
// فعلاً تمام ستون‌ها فعال هستند
VisibleColumns = new List<ExcelColumnType>
{
ExcelColumnType.RowNumber,
ExcelColumnType.PhysicalContract,
ExcelColumnType.ContractNo,
ExcelColumnType.Representative,
@@ -286,11 +285,20 @@ public class InstitutionContractExcelGenerator
switch (columnType)
{
case ExcelColumnType.RowNumber:
// TODO: مقدار ردیف رو از user input دریافت کن
break;
case ExcelColumnType.PhysicalContract:
// TODO: مقدار قرارداد فیزیکی رو دریافت کن
var physicalText = contract.IsOldContract
? (contract.HasSigniture ? "موجود" : "ناموجود")
: (contract.IsInPersonContract ? "الکترونیکی حضوری" : "الکترونیکی غیر حضوری");
cell.Value = physicalText;
cell.Style.Font.Bold = true;
cell.Style.Font.Color.SetColor(physicalText switch
{
"موجود" => Color.Green,
"ناموجود" => Color.Red,
"الکترونیکی حضوری" => Color.Purple,
_ => Color.Blue
});
break;
case ExcelColumnType.ContractNo:
cell.Value = contract.ContractNo;

View File

@@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
<ItemGroup>

View File

@@ -13,6 +13,7 @@ public class GetInstitutionVerificationDetailsViewModel
public string ContractStart { get; set; }
public string ContractEnd { get; set; }
public List<GetInstitutionVerificationDetailsWorkshopsViewModel> Workshops { get; set; }
public string OneMonthPrice { get; set; }
public string TotalPrice { get; set; }
public string TaxPrice { get; set; }
public string PaymentPrice { get; set; }

View File

@@ -7,5 +7,4 @@ public class GetInstitutionVerificationDetailsWorkshopsViewModel
public WorkshopServicesViewModel OldServices { get; set; }
public WorkshopServicesViewModel Services { get; set; }
public string Price { get; set; }
}

View File

@@ -1650,6 +1650,11 @@ public class InstitutionContractApplication : IInstitutionContractApplication
if (institutionContract.VerificationStatus == InstitutionContractVerificationStatus.Verified)
return op.Failed("قرارداد مالی قبلا تایید شده است");
if (!institutionContract.WorkshopGroup.IsInPersonContract)
{
return op.Failed("قرارداد مالی غیر حضوری نمی تواند به صورت دستی تایید شود");
}
var transaction = await _institutionContractRepository.BeginTransactionAsync();
await SetPendingWorkflow(institutionContractId,InstitutionContractSigningType.Physical);

View File

@@ -1869,6 +1869,9 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
ContractNo = query.contract.ContractNo,
CreationDate = query.contract.CreationDate.ToFarsi(),
TaxPrice = query.contract.ValueAddedTax.ToMoney(),
OneMonthPrice = query.contract.IsInstallment?
query.contract.Installments.OrderBy(x => x.InstallmentDateGr).First().Amount.ToMoney():
query.contract.ContractAmount.ToMoney(),
TotalPrice = (query.contract.TotalAmount - query.contract.ValueAddedTax).ToMoney(),
PaymentPrice = query.contract.TotalAmount.ToMoney(),
IsInstallment = query.contract.IsInstallment,
@@ -1902,8 +1905,8 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
},
Name = x.WorkshopName,
PersonnelCount = x.PersonnelCount,
Price = x.Price.ToMoney()
}).ToList(),
SecondParty = new InstitutionContratVerificationParty()
{
Address = query.contract.Address,
@@ -3385,8 +3388,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
InsuranceInPerson = x.Services.InsuranceInPerson,
RollCall = x.Services.RollCall,
RollCallInPerson = x.Services.RollCallInPerson
},
Price = x.Price.ToMoney()
}
}).ToList()
};
res.Add(item);

View File

@@ -177,7 +177,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
{
checkout.SetUpdateNeeded();
if (!_context.CheckoutWarningMessages.Any(x =>
x.CheckoutId == checkout.id && x.TypeOfCheckoutWarning !=
x.CheckoutId == checkout.id && x.TypeOfCheckoutWarning ==
TypeOfCheckoutWarning.InsuranceEmployeeShare))
{
var createWarrning =

View File

@@ -11,7 +11,7 @@
},
"ServiceHost": {
"commandName": "Project",
"launchBrowser": false,
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation"