From 859f8ea8ca844e45e5127faa916000264fc0d1a5 Mon Sep 17 00:00:00 2001 From: MahanCh Date: Sat, 23 Aug 2025 15:04:42 +0330 Subject: [PATCH] feat: update financial response models to use string type for amounts --- .../ReviewAndPaymentViewModel.cs | 2 +- .../TemporaryClientRegistrationApplication.cs | 4 +-- .../institutionContractController.cs | 26 +++++++++---------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CompanyManagment.App.Contracts/TemporaryClientRegistration/ReviewAndPaymentViewModel.cs b/CompanyManagment.App.Contracts/TemporaryClientRegistration/ReviewAndPaymentViewModel.cs index 34f5924a..731e9c56 100644 --- a/CompanyManagment.App.Contracts/TemporaryClientRegistration/ReviewAndPaymentViewModel.cs +++ b/CompanyManagment.App.Contracts/TemporaryClientRegistration/ReviewAndPaymentViewModel.cs @@ -83,7 +83,7 @@ public class ReviewAndPaymentViewModel /// مالیات بر ارزش افزوده /// string /// - public string ValueAddedTaxSt { get; set; } + public string ValueAddedTaxStr { get; set; } diff --git a/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs b/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs index 6bd2113e..eddbc722 100644 --- a/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs +++ b/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs @@ -405,7 +405,7 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati var tenPercent = result.SumOfWorkshopsPaymentDouble * 10 / 100; //مالیات result.ValueAddedTaxDouble = tenPercent; - result.ValueAddedTaxSt = tenPercent.ToMoney(); + result.ValueAddedTaxStr = tenPercent.ToMoney(); //پرداخت یکجا #region OneTimePaymentResult @@ -549,7 +549,7 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati var tenPercent = result.SumOfWorkshopsPaymentDouble * 10 / 100; //مالیات result.ValueAddedTaxDouble = tenPercent; - result.ValueAddedTaxSt = tenPercent.ToMoney(); + result.ValueAddedTaxStr = tenPercent.ToMoney(); //پرداخت یکجا #region OneTimePaymentResult diff --git a/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs b/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs index 673d0cfe..864b410b 100644 --- a/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs +++ b/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs @@ -600,7 +600,7 @@ public class institutionContractController : AdminBaseController var result = new WorkshopServiceCalculatorResponse { - TotalAmount = response.OnlineAndInPersonSumAmountDouble + TotalAmount = response.OnlineAndInPersonSumAmountStr }; return result; } @@ -614,11 +614,11 @@ public class institutionContractController : AdminBaseController var response = new InstitutionPlanCalculatorResponse { Installments = res.MonthlyInstallments, - OneTimeTotalAmountWithoutTax = res.OneTimeWithoutTaxPaymentDouble, - MonthlyTotalAmountWithoutTax = res.MonthlyWithoutTaxPaymentDouble, - OneTimeTotalAmount = res.OneTimeTotalPaymentDouble, - MonthlyTotalAmount= res.MonthlyTotalPaymentDouble, - TotalTax = res.ValueAddedTaxDouble, + OneTimeTotalAmountWithoutTax = res.OneTimeWithoutTaxPaymentStr, + MonthlyTotalAmountWithoutTax = res.MonthlyWithoutTaxPaymentStr, + OneTimeTotalAmount = res.OneTimeTotalPaymentStr, + MonthlyTotalAmount= res.MonthlyTotalPaymentStr, + TotalTax = res.ValueAddedTaxStr, }; return response; } @@ -666,18 +666,18 @@ public class institutionContractController : AdminBaseController public class InstitutionPlanCalculatorResponse { - public double TotalAmountWithTax { get; set; } - public double OneTimeTotalAmountWithoutTax { get; set; } - public double TotalTax { get; set; } + public string TotalAmountWithTax { get; set; } + public string OneTimeTotalAmountWithoutTax { get; set; } + public string TotalTax { get; set; } public List Installments { get; set; } - public double OneTimeTotalAmount { get; set; } - public double MonthlyTotalAmount { get; set; } - public double MonthlyTotalAmountWithoutTax { get; set; } + public string OneTimeTotalAmount { get; set; } + public string MonthlyTotalAmount { get; set; } + public string MonthlyTotalAmountWithoutTax { get; set; } } public class WorkshopServiceCalculatorResponse { - public double TotalAmount { get; set; } + public string TotalAmount { get; set; } } public record InstitutionPlanCalculatorRequest(List workshopList,