feat: update institution plan calculator to return review and payment view model

This commit is contained in:
MahanCh
2025-09-02 13:23:02 +03:30
parent a6c1ae7971
commit 3e4c57d813

View File

@@ -606,27 +606,12 @@ public class institutionContractController : AdminBaseController
}
[HttpPost("create/institution-plan-calculator")]
public async Task<ActionResult<InstitutionPlanCalculatorResponse>> InstitutionPlanCalculator(
public async Task<ActionResult<ReviewAndPaymentViewModel>> InstitutionPlanCalculator(
[FromBody] InstitutionPlanCalculatorRequest request)
{
var res = await _temporaryClientRegistration.GetTotalPaymentAndWorkshopList(request.TotalAmountMonth,duration: request.Duration,request.HasInPersonContract);
var response = new InstitutionPlanCalculatorResponse
{
Installments = res.MonthlyInstallments,
OneTimeTotalAmountWithoutTax = res.OneTimeWithoutTaxPaymentStr,
MonthlyTotalAmountWithoutTax = res.MonthlyWithoutTaxPaymentStr,
OneTimeTotalAmount = res.OneTimeTotalPaymentStr,
MonthlyTotalAmount= res.MonthlyTotalPaymentStr,
TotalTax = res.ValueAddedTaxStr,
ContractStart = res.ContractStartFa,
ContractEnd = res.ContractEndFa,
Discount = res.Discount??"0",
ValueAddedTax = res.ValueAddedTaxStr,
TotalAmountWithTax = res.OneTimeTotalPaymentStr,
DailyCompensation = res.DailyCompensation,
Obligation = res.Obligation
};
return response;
return res;
}
/// <summary>