...
This commit is contained in:
@@ -25,7 +25,7 @@ namespace Back.Services.Warehouse
|
||||
}
|
||||
public async Task<PagingDto<CirculationDto>> Circulation(int CompanyID,string date="",int CODID=0,int PageIndex=1,int PageSize=5)
|
||||
{
|
||||
var RequestRemittance = _RemittanceRepo.Get(w => w.cODItem.CompanyID == CompanyID)
|
||||
var RequestRemittance = _RemittanceRepo.Get(w => w.cODItem.CompanyID == CompanyID && !w.Deleted)
|
||||
.Select(s=>new CirculationDto
|
||||
{
|
||||
CODID=s.CODID,
|
||||
@@ -42,7 +42,7 @@ namespace Back.Services.Warehouse
|
||||
if (CODID!=0)
|
||||
RequestRemittance = RequestRemittance.Where(w => w.CODID == CODID);
|
||||
//-----------
|
||||
var RequestReceipt = _ReceiptRepo.Get(w => w.cODItem.CompanyID == CompanyID)
|
||||
var RequestReceipt = _ReceiptRepo.Get(w => w.cODItem.CompanyID == CompanyID && !w.Deleted)
|
||||
.Select(s => new CirculationDto
|
||||
{
|
||||
CODID = s.CODID,
|
||||
@@ -64,10 +64,10 @@ namespace Back.Services.Warehouse
|
||||
//list.AddRange(await RequestRemittance.ToListAsync());
|
||||
//return await list.OrderByDescending(o=>o.Date).AsQueryable().Paging(PageIndex, PageSize);
|
||||
}
|
||||
public async Task<int> Inventory(int CompanyID,int CODID)
|
||||
public async Task<decimal> Inventory(int CompanyID,int CODID)
|
||||
{
|
||||
var CReceipt=await _ReceiptRepo.Get(w => w.cODItem.CompanyID == CompanyID && w.CODID == CODID && w.ForSale ).SumAsync(s => s.Count);
|
||||
var CRemittance=await _RemittanceRepo.Get(w => w.cODItem.CompanyID == CompanyID && w.CODID == CODID ).SumAsync(s => s.Count);
|
||||
var CReceipt=await _ReceiptRepo.Get(w => w.cODItem.CompanyID == CompanyID && w.CODID == CODID && w.ForSale && !w.Deleted).SumAsync(s => s.Count);
|
||||
var CRemittance=await _RemittanceRepo.Get(w => w.cODItem.CompanyID == CompanyID && w.CODID == CODID && !w.Deleted).SumAsync(s => s.Count);
|
||||
return CReceipt - CRemittance;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user