This commit is contained in:
mmrbnjd
2024-06-10 17:26:31 +03:30
parent 82bcfc1ffe
commit 2db5daa9b8
14 changed files with 953 additions and 469 deletions

View File

@@ -3,7 +3,6 @@ using Back.Data.Contracts;
using Back.Data.Models;
using Microsoft.EntityFrameworkCore;
using Back.Common;
using Shared;
using Microsoft.OpenApi.Extensions;
using Shared.DTOs.Serch;
@@ -77,6 +76,14 @@ namespace Back.Services
.ThenInclude(inc => inc.CODUnit)
.FirstOrDefaultAsync();
}
public async Task<SentTax> GetSentTax(int CompanyID, int ID)
{
return await _repoSentTax.Get(w=>w.ID== ID && w.invoice.CompanyID==CompanyID).FirstOrDefaultAsync();
}
public async Task<bool> UpdateSentTax(SentTax sent)
{
return await _repoSentTax.UpdateAsync(sent);
}
public async Task<bool> AddSentTax(SentTax sentTax)
{
return await _repoSentTax.AddBoolResultAsync(sentTax);
@@ -221,13 +228,13 @@ namespace Back.Services
return await request.OrderByDescending(o=>o.ID)
.Select(s => new SentTaxDto
{
Date = s.Date.ShamciToFormatShamciinFront(),
Date = s.Date.ShamciToFormatShamci(),
Time = s.Time,
ID = s.ID,
InvoiceID = s.InvoiceID,
SentStatus=s.SentStatus,
msgInvoiceType = s.InvoiceType.GetDisplayName(),
msgSentStatus = s.SentStatus.GetDisplayName()
msgInvoiceType = s.InvoiceType.GetEnumDisplayName(),
msgSentStatus = s.SentStatus.GetEnumDisplayName()
}).Paging(itemSerchGetSentTax.PageIndex, itemSerchGetSentTax.PageSize);
}