feat: update institution plan calculator to return review and payment view model
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user