public static void FinancialReport() { List <Item> Items = StockManager.getAllItems(); List <Transaction> Transactions = StockManager.getAllTransactions(); decimal globaltotal = 0; Console.WriteLine("\nFinancial Report"); Console.WriteLine("\t{0, -3} {1, -10} {2, -5}", "ID", "Name", "Expenditure"); foreach (Item item in Items) { int id = item.getID(); decimal total = 0; foreach (Transaction transaction in Transactions) { if (transaction.getItem().getID() == id) { total += transaction.getPrice(); } } DisplayItemFinance(id.ToString(), item.getItemName(), total.ToString()); globaltotal += total; } Console.WriteLine("\n\tTotal Expenditure is: " + globaltotal.ToString()); }
public static void InventoryReport() { List <Item> Items = StockManager.getAllItems(); Console.WriteLine("\nInventory Report"); Console.WriteLine("\t{0, -3} {1, -15} {2, -3}", "ID", "Name", "Quantity"); foreach (Item item in Items) { DisplayItem(item); } }