...
This commit is contained in:
@@ -80,7 +80,7 @@ namespace Back.Services
|
||||
return await _CODRepo
|
||||
.Get(w => w.ID == CodID && w.CompanyID == CompanyID && !w.IsDeleted).FirstOrDefaultAsync();
|
||||
}
|
||||
public async Task<bool> ExistCodByCustomerID(int CodID, int CompanyID)
|
||||
public async Task<bool> ExistCodByCompanyID(int CodID, int CompanyID)
|
||||
{
|
||||
return await _CODRepo
|
||||
.Get(w => w.ID == CodID && w.CompanyID == CompanyID && !w.IsDeleted).AnyAsync();
|
||||
|
32
Back/Services/servInvoiceItem.cs
Normal file
32
Back/Services/servInvoiceItem.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Back.Data.Contracts;
|
||||
using Back.Data.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Back.Services
|
||||
{
|
||||
public class servInvoiceItem
|
||||
{
|
||||
private readonly IAsyncRepository<InvoiceItem> _invoiceitemRepo;
|
||||
public servInvoiceItem(IAsyncRepository<InvoiceItem> invoiceitemRepo)
|
||||
{
|
||||
_invoiceitemRepo = invoiceitemRepo;
|
||||
}
|
||||
public async Task<bool> Add(InvoiceItem item)
|
||||
{
|
||||
return await _invoiceitemRepo.AddBoolResultAsync(item);
|
||||
}
|
||||
public async Task<bool> Update(InvoiceItem item)
|
||||
{
|
||||
return await _invoiceitemRepo.UpdateAsync(item);
|
||||
}
|
||||
public async Task<bool> Exist(int companyID,int invoiceID,int invoiceitemID)
|
||||
{
|
||||
return await _invoiceitemRepo.Get(w => w.InvoiceID == invoiceID && w.ID == invoiceitemID && w.invoice.CompanyID == companyID).AnyAsync();
|
||||
}
|
||||
|
||||
public async Task<InvoiceItem> Getinvoiceitem(int companyID, int invoiceID, int invoiceitemID)
|
||||
{
|
||||
return await _invoiceitemRepo.Get(w => w.InvoiceID == invoiceID && w.ID == invoiceitemID && w.invoice.CompanyID == companyID).FirstOrDefaultAsync();
|
||||
}
|
||||
}
|
||||
}
|
@@ -20,7 +20,7 @@ namespace Back.Services
|
||||
}
|
||||
public async Task<bool> ExistSuccessfulorSendorpendingInvoice(Invoice invoice)
|
||||
{
|
||||
return _repoSentTax.Get(w => w.InvoiceType == invoice.invoiceType && w.InvoiceID == invoice.ID &&
|
||||
return _repoSentTax.Get(w => /*w.InvoiceType == invoice.invoiceType &&*/ w.InvoiceID == invoice.ID &&
|
||||
(w.SentStatus == SentStatus.Successful || w.SentStatus == SentStatus.Send || w.SentStatus == SentStatus.pending)).Any();
|
||||
}
|
||||
public async Task<bool> CheckingTheCompanyKeyInformation(int CompanyID, string UniqeMemory, string PrivateKey, string EconomicCode)
|
||||
|
Reference in New Issue
Block a user