fix: validate Georgian date conversion in financial statement application

This commit is contained in:
2025-10-22 12:07:26 +03:30
parent 45002b88c4
commit c9b61c3fc6

View File

@@ -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);