Merge branch 'Feature/InstitutionContract/add-registration-style' into Main
This commit is contained in:
@@ -30,6 +30,8 @@ public class InstitutionContractExtenstionTemp
|
||||
public InstitutionContractExtensionPlanDetail ThreeMonths { get; set; }
|
||||
public InstitutionContractExtensionPlanDetail SixMonths { get; set; }
|
||||
public InstitutionContractExtensionPlanDetail TwelveMonths { get; set; }
|
||||
public InstitutionContractExtensionPaymentMonthly MonthlyPayment { get; set; }
|
||||
public InstitutionContractExtensionPaymentOneTime OneTimePayment { get; set; }
|
||||
|
||||
public bool HasContractInPerson { get; set; }
|
||||
|
||||
@@ -56,15 +58,21 @@ public class InstitutionContractExtenstionTemp
|
||||
HasContractInPerson = hasContractInPerson;
|
||||
}
|
||||
|
||||
public void SetSelectedDuration(InstitutionContractDuration duration)
|
||||
public void SetAmountAndDuration(InstitutionContractDuration duration,InstitutionContractExtensionPaymentMonthly monthly,
|
||||
InstitutionContractExtensionPaymentOneTime oneTime)
|
||||
{
|
||||
Duration = duration;
|
||||
MonthlyPayment = monthly;
|
||||
OneTimePayment = oneTime;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class InstitutionContractExtenstionTempPlan
|
||||
{
|
||||
public InstitutionContractExtenstionTempPlan(string contractStart, string contractEnd, string oneMonthPaymentDiscounted, string oneMonthDiscount, string oneMonthOriginalPayment, string totalPayment, string dailyCompenseation, string obligation)
|
||||
public InstitutionContractExtenstionTempPlan(string contractStart, string contractEnd,
|
||||
string oneMonthPaymentDiscounted, string oneMonthDiscount, string oneMonthOriginalPayment,
|
||||
string totalPayment, string dailyCompensation, string obligation)
|
||||
{
|
||||
ContractStart = contractStart;
|
||||
ContractEnd = contractEnd;
|
||||
@@ -72,7 +80,7 @@ public class InstitutionContractExtenstionTempPlan
|
||||
OneMonthDiscount = oneMonthDiscount;
|
||||
OneMonthOriginalPayment = oneMonthOriginalPayment;
|
||||
TotalPayment = totalPayment;
|
||||
DailyCompenseation = dailyCompenseation;
|
||||
DailyCompensation = dailyCompensation;
|
||||
Obligation = obligation;
|
||||
}
|
||||
|
||||
@@ -82,7 +90,7 @@ public class InstitutionContractExtenstionTempPlan
|
||||
public string OneMonthDiscount { get; set; }
|
||||
public string OneMonthOriginalPayment { get; set; }
|
||||
public string TotalPayment { get; set; }
|
||||
public string DailyCompenseation { get; set; }
|
||||
public string DailyCompensation { get; set; }
|
||||
public string Obligation { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ public interface IInstitutionContractApplication
|
||||
Task<InstitutionContractExtensionPlanResponse> GetExtenstionInstitutionPlan(InstitutionContractExtensionPlanRequest request);
|
||||
Task<InstitutionContractExtensionPaymentResponse> GetExtenstionPaymentMethod(
|
||||
InstitutionContractExtensionPaymentRequest request);
|
||||
//TODO:calculate Payment method
|
||||
|
||||
//TODO:Complete Data.
|
||||
|
||||
|
||||
|
||||
@@ -2044,7 +2044,6 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
|
||||
var duration = request.Duration;
|
||||
|
||||
institutionTemp.SetSelectedDuration(duration);
|
||||
|
||||
var selectedPlan = duration switch
|
||||
{
|
||||
@@ -2062,7 +2061,9 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
? CalculateInPersonPayment(selectedPlan, baseAmount, vatOrDiscount, request.Duration)
|
||||
: CalculateOnlinePayment(baseAmount, vatOrDiscount);
|
||||
|
||||
institutionTemp.SetAmountAndDuration(duration,res.Monthly,res.OneTime);
|
||||
|
||||
await _institutionExtensionTemp.ReplaceOneAsync(x => x.Id == institutionTemp.Id, institutionTemp);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user