...
This commit is contained in:
@@ -33,6 +33,7 @@ namespace Back.Services.Warehouse
|
||||
ForSale = item.ForSale,
|
||||
info = item.info,
|
||||
Type = item.Type,
|
||||
InvoiceID=item.InvoiceID,
|
||||
Deleted = false
|
||||
};
|
||||
var returnmodel = await _ReceiptRepo.AddAsync(model);
|
||||
@@ -88,7 +89,9 @@ namespace Back.Services.Warehouse
|
||||
var models = await _ReceiptRepo.Get(w => w.InvoiceID == InvoiceID && w.cODItem.CompanyID == CompanyID && !w.Deleted).ToListAsync();
|
||||
foreach (var model in models)
|
||||
model.Deleted = true;
|
||||
return await _ReceiptRepo.UpdateRangeAsync(models);
|
||||
if (models.Any())
|
||||
return await _ReceiptRepo.UpdateRangeAsync(models);
|
||||
return true;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -73,8 +73,9 @@ namespace Back.Services.Warehouse
|
||||
var models = await _ReceiptRepo.Get(w => w.InvoiceID == InvoiceID && w.cODItem.CompanyID == CompanyID && !w.Deleted).ToListAsync();
|
||||
foreach (var model in models)
|
||||
model.Deleted = true;
|
||||
if(models.Any())
|
||||
return await _ReceiptRepo.UpdateRangeAsync(models);
|
||||
|
||||
return true;
|
||||
}
|
||||
public async Task<bool> DeleteByCODIDAndInvoiceID(int InvoiceID, int CODID, int CompanyID)
|
||||
{
|
||||
|
Reference in New Issue
Block a user