diff --git a/CompanyManagment.App.Contracts/TemporaryClientRegistration/ReviewAndPaymentViewModel.cs b/CompanyManagment.App.Contracts/TemporaryClientRegistration/ReviewAndPaymentViewModel.cs
index a966ccf7..c2c2ea70 100644
--- a/CompanyManagment.App.Contracts/TemporaryClientRegistration/ReviewAndPaymentViewModel.cs
+++ b/CompanyManagment.App.Contracts/TemporaryClientRegistration/ReviewAndPaymentViewModel.cs
@@ -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
///
public string TotalPayment1MonthStr { get; set; }
- ///
- /// آیا یک ماهه انتخاب شده است
- ///
- public bool IsSelected1 { get; set; }
-
-
///
@@ -34,10 +30,6 @@ public class ReviewAndPaymentViewModel
///
public string TotalPayment3MonthsStr { get; set; }
- ///
- /// آیا 3 ماهه انتخاب شده است
- ///
- public bool IsSelected3 { get; set; }
@@ -53,10 +45,7 @@ public class ReviewAndPaymentViewModel
///
public string TotalPayment6MonthsStr { get; set; }
- ///
- /// آیا 6 ماهه انتخاب شده است
- ///
- public bool IsSelected6 { get; set; }
+
@@ -73,8 +62,53 @@ public class ReviewAndPaymentViewModel
///
public string TotalPayment12MonthsStr { get; set; }
+
+
+
+
///
- /// آیا 12 ماهه انتخاب شده است
+ /// مبلغ پرداخت یکجا
+ /// Double
///
- public bool IsSelected12 { get; set; }
+ public double OneTimePaymentDouble { get; set; }
+
+ ///
+ /// مبلغ پرداخت یکجا
+ /// string
+ ///
+ public string OneTimePaymentStr { get; set; }
+
+
+
+ ///
+ /// مبلغ پرداخت مرحله ای
+ /// Double
+ ///
+ public double MonthlyPaymentDouble { get; set; }
+
+ ///
+ /// مبلغ پرداخت مرحله ای
+ /// string
+ ///
+ public string MonthlyPaymentStr { get; set; }
+
+
+ ///
+ /// بازه قرداد
+ /// با عدد مشخص میشود
+ /// مثلا یک ماه عدد 1
+ ///
+ public string PeriodModel { get; set; }
+
+ ///
+ /// مدل پرداخت
+ /// پر میشود OneTime پرداخت یکجا با کلمه
+ /// پر میشود Monthly پرداخت مرحله ای با کلمه
+ ///
+ public string PaymentModel { get; set; }
+
+ ///
+ /// لیست کارگاه های ایجاد شده
+ ///
+ public List WorkshopTempViewList { get; set; }
}
\ No newline at end of file
diff --git a/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs b/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs
index 5095e290..66bd63b3 100644
--- a/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs
+++ b/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs
@@ -328,5 +328,52 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
}
- public
+ ///
+ /// بررسی و پرداخت
+ /// اطلاعات کامل مبالغ
+ ///
+ ///
+ ///
+ public async Task 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;
+
+ }
+
}
\ No newline at end of file
diff --git a/CompanyManagment.EFCore/Repository/YearlySalaryRepository.cs b/CompanyManagment.EFCore/Repository/YearlySalaryRepository.cs
index e8502055..15a84047 100644
--- a/CompanyManagment.EFCore/Repository/YearlySalaryRepository.cs
+++ b/CompanyManagment.EFCore/Repository/YearlySalaryRepository.cs
@@ -1327,7 +1327,7 @@ public class YearlySalaryRepository : RepositoryBase, 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, 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, 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, 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, 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, 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;
diff --git a/ServiceHost/Areas/Admin/Pages/Company/Checkouts/Index.cshtml.cs b/ServiceHost/Areas/Admin/Pages/Company/Checkouts/Index.cshtml.cs
index 1fd81766..02f2452d 100644
--- a/ServiceHost/Areas/Admin/Pages/Company/Checkouts/Index.cshtml.cs
+++ b/ServiceHost/Areas/Admin/Pages/Company/Checkouts/Index.cshtml.cs
@@ -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)