...
This commit is contained in:
@@ -129,7 +129,7 @@ namespace Back.Services
|
||||
return await _invoiceRepo.Get(w => w.ID == InvoiceID && w.CompanyID == CompanyID && !w.IsDeleted).AnyAsync();
|
||||
|
||||
}
|
||||
public async Task<bool> AddInvoice(Invoice invoice, bool calculate = true)
|
||||
public async Task<int> AddInvoice(Invoice invoice, bool calculate = true)
|
||||
{
|
||||
invoice.Cdate = DateTime.Now.ConvertMiladiToShamsi();
|
||||
invoice.Udate = DateTime.Now.ConvertMiladiToShamsi();
|
||||
@@ -137,12 +137,17 @@ namespace Back.Services
|
||||
if (calculate)
|
||||
{
|
||||
if (await _checkPermission.ExtensionofAccess(invoice.CompanyID.Value, 3, "-1"))
|
||||
return await _invoiceRepo.AddBoolResultAsync(invoice);
|
||||
return false;
|
||||
{
|
||||
var item= await _invoiceRepo.AddAsync(invoice);
|
||||
return item.ID;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return await _invoiceRepo.AddBoolResultAsync(invoice);
|
||||
var item = await _invoiceRepo.AddAsync(invoice);
|
||||
return item.ID;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user