TemporaryClientRegister - Chekout-Bonuses Bug Fixed
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
namespace CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||
|
||||
public class ReviewAndPaymentViewModel
|
||||
{
|
||||
@@ -14,12 +16,6 @@ public class ReviewAndPaymentViewModel
|
||||
/// </summary>
|
||||
public string TotalPayment1MonthStr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا یک ماهه انتخاب شده است
|
||||
/// </summary>
|
||||
public bool IsSelected1 { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -34,10 +30,6 @@ public class ReviewAndPaymentViewModel
|
||||
/// </summary>
|
||||
public string TotalPayment3MonthsStr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا 3 ماهه انتخاب شده است
|
||||
/// </summary>
|
||||
public bool IsSelected3 { get; set; }
|
||||
|
||||
|
||||
|
||||
@@ -53,10 +45,7 @@ public class ReviewAndPaymentViewModel
|
||||
/// </summary>
|
||||
public string TotalPayment6MonthsStr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا 6 ماهه انتخاب شده است
|
||||
/// </summary>
|
||||
public bool IsSelected6 { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -73,8 +62,53 @@ public class ReviewAndPaymentViewModel
|
||||
/// </summary>
|
||||
public string TotalPayment12MonthsStr { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// آیا 12 ماهه انتخاب شده است
|
||||
/// مبلغ پرداخت یکجا
|
||||
/// Double
|
||||
/// </summary>
|
||||
public bool IsSelected12 { get; set; }
|
||||
public double OneTimePaymentDouble { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت یکجا
|
||||
/// string
|
||||
/// </summary>
|
||||
public string OneTimePaymentStr { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت مرحله ای
|
||||
/// Double
|
||||
/// </summary>
|
||||
public double MonthlyPaymentDouble { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت مرحله ای
|
||||
/// string
|
||||
/// </summary>
|
||||
public string MonthlyPaymentStr { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// بازه قرداد
|
||||
/// با عدد مشخص میشود
|
||||
/// مثلا یک ماه عدد 1
|
||||
/// </summary>
|
||||
public string PeriodModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مدل پرداخت
|
||||
/// پر میشود OneTime پرداخت یکجا با کلمه
|
||||
/// پر میشود Monthly پرداخت مرحله ای با کلمه
|
||||
/// </summary>
|
||||
public string PaymentModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست کارگاه های ایجاد شده
|
||||
/// </summary>
|
||||
public List<WorkshopTempViewModel> WorkshopTempViewList { get; set; }
|
||||
}
|
||||
@@ -328,5 +328,52 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
|
||||
}
|
||||
|
||||
|
||||
public
|
||||
/// <summary>
|
||||
/// بررسی و پرداخت
|
||||
/// اطلاعات کامل مبالغ
|
||||
/// </summary>
|
||||
/// <param name="contractingPartyTempId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<ReviewAndPaymentViewModel> GetTotalPaymentAndWorkshopList(long contractingPartyTempId)
|
||||
{
|
||||
//دریافت کارگاه ها
|
||||
var workshops = await _workshopTempRepository.GetWorkshopTemp(contractingPartyTempId);
|
||||
|
||||
double totalPayment1MonthDouble = 0;
|
||||
|
||||
//بدست آوردن جمع کل برای یک ماه
|
||||
foreach (var workshop in workshops)
|
||||
{
|
||||
totalPayment1MonthDouble += workshop.WorkshopServicesAmount;
|
||||
}
|
||||
|
||||
|
||||
var result = new ReviewAndPaymentViewModel();
|
||||
|
||||
result.TotalPayment1MonthDouble = totalPayment1MonthDouble;
|
||||
result.TotalPayment1MonthStr = totalPayment1MonthDouble.ToMoney();
|
||||
|
||||
result.TotalPayment3MonthsDouble = totalPayment1MonthDouble * 3;
|
||||
result.TotalPayment3MonthsStr = result.TotalPayment3MonthsDouble.ToMoney();
|
||||
|
||||
result.TotalPayment6MonthsDouble = totalPayment1MonthDouble * 6;
|
||||
result.TotalPayment6MonthsStr = result.TotalPayment6MonthsDouble.ToMoney();
|
||||
|
||||
result.TotalPayment12MonthsDouble = totalPayment1MonthDouble * 12;
|
||||
result.TotalPayment12MonthsStr = result.TotalPayment12MonthsDouble.ToMoney();
|
||||
|
||||
|
||||
result.PeriodModel = "1";
|
||||
result.PaymentModel = "OneTime";
|
||||
|
||||
result.OneTimePaymentDouble = totalPayment1MonthDouble;
|
||||
result.OneTimePaymentStr = totalPayment1MonthDouble.ToMoney();
|
||||
|
||||
result.MonthlyPaymentDouble = totalPayment1MonthDouble;
|
||||
result.MonthlyPaymentStr = totalPayment1MonthDouble.ToMoney();
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1327,7 +1327,7 @@ public class YearlySalaryRepository : RepositoryBase<long, YearlySalary>, IYearl
|
||||
}
|
||||
else
|
||||
{
|
||||
double foundMonthlySalary = foundCheckout.MonthlySalary;
|
||||
double foundMonthlySalary = foundCheckout.MonthlySalary + foundCheckout.BaseYearsPay;
|
||||
int foundTotaldays = Convert.ToInt32(foundCheckout.SumOfWorkingDays);
|
||||
double foundDayliWage = foundMonthlySalary / foundTotaldays;
|
||||
double foundYearsPay = ((foundDayliWage * 30) / 365) * foundTotaldays;
|
||||
@@ -1399,7 +1399,7 @@ public class YearlySalaryRepository : RepositoryBase<long, YearlySalary>, IYearl
|
||||
}
|
||||
else
|
||||
{
|
||||
double foundMonthlySalary = foundCheckout.MonthlySalary;
|
||||
double foundMonthlySalary = foundCheckout.MonthlySalary + foundCheckout.BaseYearsPay;
|
||||
int foundTotaldays = Convert.ToInt32(foundCheckout.SumOfWorkingDays);
|
||||
double foundDayliWage = foundMonthlySalary / foundTotaldays;
|
||||
double foundYearsPay = ((foundDayliWage * 30) / 365) * foundTotaldays;
|
||||
@@ -3240,7 +3240,7 @@ public class YearlySalaryRepository : RepositoryBase<long, YearlySalary>, IYearl
|
||||
}
|
||||
else
|
||||
{
|
||||
double foundMonthlySalary = foundCheckout.MonthlySalary;
|
||||
double foundMonthlySalary = foundCheckout.MonthlySalary + foundCheckout.BaseYearsPay;
|
||||
int foundTotaldays = Convert.ToInt32(foundCheckout.SumOfWorkingDays);
|
||||
double foundDayliWage = foundMonthlySalary / foundTotaldays;
|
||||
double foundYearsPay = ((foundDayliWage * 60) / 365) * foundTotaldays;
|
||||
@@ -3311,7 +3311,7 @@ public class YearlySalaryRepository : RepositoryBase<long, YearlySalary>, IYearl
|
||||
}
|
||||
else
|
||||
{
|
||||
double foundMonthlySalary = foundCheckout.MonthlySalary;
|
||||
double foundMonthlySalary = foundCheckout.MonthlySalary + foundCheckout.BaseYearsPay;
|
||||
int foundTotaldays = Convert.ToInt32(foundCheckout.SumOfWorkingDays);
|
||||
double foundDayliWage = foundMonthlySalary / foundTotaldays;
|
||||
double foundYearsPay = ((foundDayliWage * 60) / 365) * foundTotaldays;
|
||||
@@ -3396,7 +3396,7 @@ public class YearlySalaryRepository : RepositoryBase<long, YearlySalary>, IYearl
|
||||
}
|
||||
else
|
||||
{
|
||||
double foundMonthlySalary = foundCheckout.MonthlySalary;
|
||||
double foundMonthlySalary = foundCheckout.MonthlySalary + foundCheckout.BaseYearsPay;
|
||||
int foundTotaldays = Convert.ToInt32(foundCheckout.SumOfWorkingDays);
|
||||
double foundDayliWage = foundMonthlySalary / foundTotaldays;
|
||||
double foundBonuses = ((foundDayliWage * 60) / 365) * foundTotaldays;
|
||||
@@ -3465,7 +3465,7 @@ public class YearlySalaryRepository : RepositoryBase<long, YearlySalary>, IYearl
|
||||
}
|
||||
else
|
||||
{
|
||||
double foundMonthlySalary = foundCheckout.MonthlySalary;
|
||||
double foundMonthlySalary = foundCheckout.MonthlySalary + foundCheckout.BaseYearsPay;
|
||||
int foundTotaldays = Convert.ToInt32(foundCheckout.SumOfWorkingDays);
|
||||
double foundDayliWage = foundMonthlySalary / foundTotaldays;
|
||||
double foundBonuses = ((foundDayliWage * 60) / 365) * foundTotaldays;
|
||||
|
||||
@@ -571,7 +571,7 @@ public class IndexModel : PageModel
|
||||
foundMandatoryCompute.SalaryCompute.MoneyToDouble(), foundMandatoryCompute.SumTime44, foundMandatoryCompute.OfficialHoliday,
|
||||
int.Parse(foundMandatoryCompute.NumberOfFriday), foundMandatoryCompute.TotalHolidayAndNotH, foundMandatoryCompute.TotalHolidayAndNotM,
|
||||
foundMandatoryCompute.Basic, foundMandatoryCompute.FridayStartToEnd, foundMandatoryCompute.DayliFeeComplete, hasRollCall, workshop.WorkshopHolidayWorking);
|
||||
double foundMontlySalary = MontlyYearsBunos.MontlyWage;
|
||||
double foundMontlySalary = MontlyYearsBunos.MontlyWage + MontlyYearsBunos.BasicYears;
|
||||
int foundTotaldays = Convert.ToInt32(MontlyYearsBunos.SumOfWorkingDay);
|
||||
double foundDayliWage = foundMontlySalary / foundTotaldays;
|
||||
if (bunosesPay.NotCompleted)
|
||||
|
||||
Reference in New Issue
Block a user