diff --git a/CompanyManagment.Application/FinancialStatmentApplication.cs b/CompanyManagment.Application/FinancialStatmentApplication.cs index 1a64763c..9e8db296 100644 --- a/CompanyManagment.Application/FinancialStatmentApplication.cs +++ b/CompanyManagment.Application/FinancialStatmentApplication.cs @@ -106,8 +106,11 @@ public class FinancialStatmentApplication : IFinancialStatmentApplication debtor = command.DeptorString.MoneyToDouble(); } - - var tDateGr = command.TdateFa.ToGeorgianDateTime(); + + if (!command.TdateFa.TryToGeorgianDateTime(out var tDateGr)) + { + return op.Failed("تاریخ وارد شده صحیح نمی باشد"); + } if (_financialStatmentRepository.Exists(x => x.ContractingPartyId == command.ContractingPartyId)) { var financialStatment = _financialStatmentRepository.GetDetailsByContractingPartyId(command.ContractingPartyId);