protected override void UpdateTotals() { TotalQuantity = ItemsShowing.Sum(x => x.Quantity); TotalSales = ItemsShowing.Sum(x => x.Amount); TotalCost = ItemsShowing.Sum(x => x.Cost); TotalProfit = ItemsShowing.Sum(x => x.Profit); AverageCostPercent = totalSales == 0 ? 0 : totalCost / totalSales; }
protected override void UpdateTotals() { TotalCost = ItemsShowing.Sum(x => x.Cost); TotalRealCost = ItemsShowing.Sum(x => x.RealCost);; }
protected override void UpdateTotals() { TotalSales = ItemsShowing.Sum(x => x.Amount); TotalClients = ItemsShowing.Sum(x => x.Clients); SpendingByClient = totalClients == 0 ? 0 : totalSales / totalClients; }