Corrected the total amount sent in expense pending dashboard
This commit is contained in:
parent
b1af96b923
commit
60eefa78c0
@ -841,7 +841,7 @@ namespace Marco.Pms.Services.Controllers
|
||||
var approveExpenses = expenses.Where(e => (hasApprovePermission || e.CreatedById == loggedInEmployee.Id) && e.StatusId == Approve).ToList();
|
||||
var processPendingExpenses = expenses.Where(e => (hasProcessPermission || e.CreatedById == loggedInEmployee.Id) && e.StatusId == ProcessPending).ToList();
|
||||
var submitedExpenses = expenses.Where(e => e.StatusId != Draft && e.CreatedById == loggedInEmployee.Id).ToList();
|
||||
var totalCount = expenses.Where(e => e.StatusId != Draft).Count();
|
||||
var totalAmount = expenses.Where(e => e.StatusId != Draft).Sum(e => e.Amount);
|
||||
|
||||
if (hasManagePermission)
|
||||
{
|
||||
@ -872,7 +872,7 @@ namespace Marco.Pms.Services.Controllers
|
||||
Count = submitedExpenses.Count,
|
||||
TotalAmount = submitedExpenses.Sum(e => e.Amount)
|
||||
},
|
||||
TotalAmount = totalCount
|
||||
TotalAmount = totalAmount
|
||||
};
|
||||
_logger.LogInfo(
|
||||
"GetPendingExpenseListAsync completed. TenantId={TenantId}",
|
||||
|
Loading…
x
Reference in New Issue
Block a user