...
This commit is contained in:
@@ -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();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user