...
This commit is contained in:
@@ -24,6 +24,7 @@ namespace Back.Services.Warehouse
|
||||
Count = item.Count,
|
||||
info = item.info,
|
||||
Type = item.Type,
|
||||
InvoiceID = item.InvoiceID,
|
||||
Deleted=false
|
||||
};
|
||||
var returnmodel = await _ReceiptRepo.AddAsync(model);
|
||||
@@ -66,6 +67,22 @@ namespace Back.Services.Warehouse
|
||||
model.Deleted = true;
|
||||
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<RemittanceDto?> Get(int itemID, int CompanyID)
|
||||
{
|
||||
|
Reference in New Issue
Block a user