From 60ed37b965d5e1a137c3ced181739e145951aa29 Mon Sep 17 00:00:00 2001 From: MahanCh Date: Tue, 2 Sep 2025 16:44:52 +0330 Subject: [PATCH] Add detailed response structure for institution plan calculator --- .../TemporaryClientRegistrationApplication.cs | 2 +- .../institutionContractController.cs | 21 +++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs b/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs index ec61ca7d..66399e98 100644 --- a/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs +++ b/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs @@ -1,4 +1,4 @@ -using System; + using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; diff --git a/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs b/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs index f314a4f3..07e5a2e7 100644 --- a/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs +++ b/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs @@ -610,7 +610,24 @@ public class institutionContractController : AdminBaseController [FromBody] InstitutionPlanCalculatorRequest request) { var res = await _temporaryClientRegistration.GetTotalPaymentAndWorkshopList(request.TotalAmountMonth,duration: request.Duration,request.HasInPersonContract); - + var result = new InstitutionPlanCalculatorResponse() + { + TotalAmountWithTax = res.OneTimeTotalPaymentStr, + OneTimeTotalAmountWithoutTax = res.OneTimeWithoutTaxPaymentStr, + TotalTax = res.ValueAddedTaxStr, + Installments = res.MonthlyInstallments, + OneTimeTotalAmount = res.OneTimeTotalPaymentStr, + MonthlyTotalAmount = res.MonthlyTotalPaymentStr, + MonthlyTotalAmountWithoutTax = res.MonthlyWithoutTaxPaymentStr, + ContractStart = res.ContractStartFa, + ContractEnd = res.ContractEndFa, + Discount = res.Discount, + ValueAddedTax = res.ValueAddedTaxStr, + DailyCompensation = "0", + Obligation = res.OneTimeTotalPaymentStr, + PaymentForOneMonth = res.SumOfWorkshopsPayment + + }; return res; } @@ -670,7 +687,7 @@ public class InstitutionPlanCalculatorResponse public string ValueAddedTax { get; set; } public string DailyCompensation { get; set; } public string Obligation { get; set; } - + public string PaymentForOneMonth { get; set; } } public class WorkshopServiceCalculatorResponse