From 0ebca7c613bc47ef9450c7dc04ec7341660a09e0 Mon Sep 17 00:00:00 2001 From: mahan Date: Sat, 27 Sep 2025 11:22:52 +0330 Subject: [PATCH] add seprate tax for institutionContractController create --- .../ReviewAndPaymentViewModel.cs | 4 +++- .../TemporaryClientRegistrationApplication.cs | 9 ++++++--- .../Admin/Controllers/institutionContractController.cs | 8 ++++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/CompanyManagment.App.Contracts/TemporaryClientRegistration/ReviewAndPaymentViewModel.cs b/CompanyManagment.App.Contracts/TemporaryClientRegistration/ReviewAndPaymentViewModel.cs index a723ec66..d3e2a661 100644 --- a/CompanyManagment.App.Contracts/TemporaryClientRegistration/ReviewAndPaymentViewModel.cs +++ b/CompanyManagment.App.Contracts/TemporaryClientRegistration/ReviewAndPaymentViewModel.cs @@ -46,7 +46,9 @@ public class ReviewAndPaymentViewModel /// مالیات بر ارزش افزوده /// string /// - public string ValueAddedTaxStr { get; set; } + public string MonthlyValueAddedTaxStr { get; set; } + + public string OneTimeValueAddedTaxStr { get; set; } /// /// لیست اقساط ماهیانه diff --git a/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs b/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs index cb26fcda..35931e8e 100644 --- a/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs +++ b/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs @@ -561,7 +561,6 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati { var tenPercent = sumOfWorkshopsPaymentDouble * 10 / 100; //مالیات - result.ValueAddedTaxStr = tenPercent.ToMoney(); //پرداخت یکجا #region OneTimePaymentResult @@ -571,11 +570,14 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati //مبلغ بدون مالیات و با تخفیف result.OneTimeWithoutTaxPaymentStr = discountOneTimePeyment.ToMoney(); + var oneTimeValueAddedTax = (discountOneTimePeyment * 10) / 100; + result.OneTimeValueAddedTaxStr = oneTimeValueAddedTax.ToMoney(); //مبلغ با مالیات - var oneTimePayment = discountOneTimePeyment + tenPercent; + var oneTimePayment = discountOneTimePeyment + oneTimeValueAddedTax; result.OneTimeTotalPaymentStr = oneTimePayment.ToMoney(); result.DiscountedAmountForOneMonth = roundAmount2.ToMoney(); + #endregion @@ -589,6 +591,7 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati result.MonthlyWithoutTaxPaymentStr = sumOfWorkshopsPaymentDouble.ToMoney(); // مبلغ با مالیات + result.MonthlyValueAddedTaxStr= tenPercent.ToMoney(); var monthlyTotalPaymentDouble = sumOfWorkshopsPaymentDouble + tenPercent; result.MonthlyTotalPaymentStr = monthlyTotalPaymentDouble.ToMoney(); var installmentList = new List(); @@ -669,7 +672,7 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati result.Discount = oneMonthDiscountAmount.ToMoney(); result.DiscountedAmountForOneMonth = (roundAmount2 - oneMonthDiscountAmount).ToMoney(); var taxDouble = (discountedPayment * 10)/100; - result.ValueAddedTaxStr =taxDouble.ToMoney(); + result.OneTimeValueAddedTaxStr =taxDouble.ToMoney(); result.OneTimeWithoutTaxPaymentStr = discountedPayment.ToMoney(); result.OneTimeTotalPaymentStr =( discountedPayment + taxDouble).ToMoney(); } diff --git a/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs b/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs index 93522bac..34ad5fa5 100644 --- a/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs +++ b/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs @@ -633,7 +633,7 @@ public class institutionContractController : AdminBaseController { TotalAmountWithTax = res.OneTimeTotalPaymentStr, OneTimeTotalAmountWithoutTax = res.OneTimeWithoutTaxPaymentStr, - TotalTax = res.ValueAddedTaxStr, + OneTimeValueAddedTaxStr = res.OneTimeValueAddedTaxStr, Installments = res.MonthlyInstallments, OneTimeTotalAmount = res.OneTimeTotalPaymentStr, MonthlyTotalAmount = res.MonthlyTotalPaymentStr, @@ -641,7 +641,7 @@ public class institutionContractController : AdminBaseController ContractStart = res.ContractStartFa, ContractEnd = res.ContractEndFa, Discount = res.Discount, - ValueAddedTax = res.ValueAddedTaxStr, + MonthlyValueAddedTaxStr = res.MonthlyValueAddedTaxStr, DailyCompensation = res.DailyCompensation, Obligation = res.OneTimeTotalPaymentStr, PaymentForOneMonth = res.SumOfWorkshopsPayment, @@ -729,12 +729,12 @@ public class InstitutionPlanCalculatorResponse public string TotalAmountWithTax { get; set; } public string OneTimeTotalAmountWithoutTax { get; set; } public string OneTimeTotalAmount { get; set; } - public string TotalTax { get; set; } + public string OneTimeValueAddedTaxStr { get; set; } public string MonthlyTotalAmount { get; set; } public string MonthlyTotalAmountWithoutTax { get; set; } public string ContractStart { get; set; } public string ContractEnd { get; set; } - public string ValueAddedTax { get; set; } + public string MonthlyValueAddedTaxStr { get; set; } public string DailyCompensation { get; set; } public string Obligation { get; set; } public string PaymentForOneMonth { get; set; }