Add detailed response structure for institution plan calculator

This commit is contained in:
MahanCh
2025-09-02 16:44:52 +03:30
parent 5355e74830
commit 60ed37b965
2 changed files with 20 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

View File

@@ -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