...
This commit is contained in:
@@ -83,6 +83,23 @@ namespace Back.Services.Warehouse
|
||||
return await _ReceiptRepo.UpdateAsync(model);
|
||||
|
||||
}
|
||||
public async Task<bool> DeleteByInvoiceID(int InvoiceID, int CompanyID)
|
||||
{
|
||||
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);
|
||||
|
||||
|
||||
}
|
||||
//public async Task<bool> DeleteByCODIDAndInvoiceID(int InvoiceID,int CODID, int CompanyID)
|
||||
//{
|
||||
// var model = await _ReceiptRepo.Get(w => w.InvoiceID == InvoiceID && w.CODID==CODID && w.cODItem.CompanyID == CompanyID && !w.Deleted).FirstOrDefaultAsync();
|
||||
// model.Deleted = true;
|
||||
// return await _ReceiptRepo.UpdateAsync(model);
|
||||
|
||||
|
||||
//}
|
||||
public async Task<ReceiptDto?> Get(int itemID, int CompanyID)
|
||||
{
|
||||
return await _ReceiptRepo.Get(w => w.ID == itemID && w.cODItem.CompanyID == CompanyID && !w.Deleted)
|
||||
|
Reference in New Issue
Block a user