tax
This commit is contained in:
@@ -63,7 +63,7 @@ namespace Back.Services
|
||||
tdis = item.tdis,
|
||||
tvam = item.tvam,
|
||||
Udate = item.Udate.ShamciToFormatShamci(),
|
||||
|
||||
inno = item.inno,
|
||||
InvoiceSendTaxs = item.sentTax.OrderBy(o => o.ID).Select(s => new SentTaxDto()
|
||||
{
|
||||
Date = s.Date.ShamciToFormatShamci(),
|
||||
@@ -116,7 +116,7 @@ namespace Back.Services
|
||||
.Get(w => w.CompanyID == CompanyID && !w.IsDeleted/* && !w.BillReference.HasValue*/);
|
||||
|
||||
if (itemSerch.InvoiceID != null)
|
||||
invok = invok.Where(w => w.ID == itemSerch.InvoiceID);
|
||||
invok = invok.Where(w => w.ID == itemSerch.InvoiceID || w.inno == itemSerch.InvoiceID.ToString());
|
||||
|
||||
if (itemSerch.CustomerID != null)
|
||||
invok = invok.Where(w => w.CustomerID == itemSerch.CustomerID);
|
||||
|
@@ -176,6 +176,11 @@ namespace Back.Services
|
||||
SetValue(item, ref InvoiceItem);
|
||||
|
||||
}
|
||||
// سریال صورتحساب
|
||||
var innoS=await _invoiceRepo.Get(w => w.CompanyID == InvoiceItem.CompanyID).Select(s => s.inno).ToListAsync();
|
||||
var result = Enumerable.Range(1, 1000000000) .Except(innoS.Select(t => t).ToList().Select(int.Parse).ToList()).FirstOrDefault();
|
||||
InvoiceItem.inno = result.ToString("0000000000");
|
||||
|
||||
if (await _invoiceRepo.UpdateAsync(InvoiceItem))
|
||||
{
|
||||
foreach (var Bitem in FildItems.Bodys)
|
||||
|
Reference in New Issue
Block a user