This commit is contained in:
mmrbnjd
2024-10-22 12:31:34 +03:30
parent afd1a5ef8f
commit e748993044
4 changed files with 115 additions and 29 deletions

View File

@@ -5,6 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Back.Common;
using Microsoft.OpenApi.Extensions;
using Shared.DTOs.Serch;
using System.ComponentModel.Design;
namespace Back.Services
{
@@ -371,12 +372,25 @@ namespace Back.Services
resvaltype.SetValue(obj, _val);
}
}
}
// }
// }
}
public async Task<bool> AnyCodInTaxPayerHaveBeenSentSuccessfully(int CODID, int CompanyID)
{
return await _repoSentTax.Get(w => w.invoice.invoiceDetails.Any(a => a.CODID == CODID)
&& w.invoice.CompanyID==CompanyID
&& (w.SentStatus == SentStatus.Successful || w.SentStatus == SentStatus.Send
|| w.SentStatus == SentStatus.pending || w.SentStatus == SentStatus.IN_PROGRESS)).AnyAsync();
}
public async Task<bool> AnyCusInTaxPayerHaveBeenSentSuccessfully(int CusID, int CompanyID)
{
return await _repoSentTax.Get(w => w.invoice.CustomerID==CusID
&& w.invoice.CompanyID == CompanyID
&& (w.SentStatus == SentStatus.Successful || w.SentStatus == SentStatus.Send
|| w.SentStatus == SentStatus.pending || w.SentStatus == SentStatus.IN_PROGRESS)).AnyAsync();
}
}
}