This commit is contained in:
mmrbnjd
2024-05-16 23:40:32 +03:30
parent 354316abba
commit 3ca7f9deb0
25 changed files with 7727 additions and 101 deletions

View File

@@ -8,9 +8,11 @@ namespace Back.Services
public class servTaxPayer
{
private readonly IAsyncRepository<SentTax> _repoSentTax;
public servTaxPayer(IAsyncRepository<SentTax> repoSentTax)
private readonly IAsyncRepository<Pattern> _repoPattern;
public servTaxPayer(IAsyncRepository<SentTax> repoSentTax, IAsyncRepository<Pattern> repoPattern)
{
_repoSentTax = repoSentTax;
_repoPattern = repoPattern;
}
public async Task<bool> ExistSuccessfulorSendorpendingInvoiceinCompanyID(int CompanyID)
{
@@ -27,6 +29,10 @@ namespace Back.Services
&& (w.SentStatus == SentStatus.Successful || w.SentStatus == SentStatus.Send || w.SentStatus == SentStatus.pending)
&& w.invoice.CompanyID != CompanyID).AnyAsync();
}
public async Task<List<IdName<int>>> GetPatterns()
{
return await _repoPattern.Get(w=>w.Status).Select(s => new IdName<int> { ID = s.ID, Title = s.Title }).ToListAsync();
}
}
}