Example #1
0
    private static void PerformAdjustStock(Warehouse toWarehouse)
    {
        int     quantity = 0;
        decimal price    = 0;

        Console.WriteLine("---- ADJUST STOCK ----");

        Stock stock = FindStockItem(toWarehouse);

        if (stock == null)
        {
            return;
        }

        quantity = ReadInteger($"Quantity of {stock.Name} to adjust: ");
        price    = ReadDecimal("Price: ");



        StockAdjustmentTransaction adj = new StockAdjustmentTransaction(stock, quantity, price);

        toWarehouse.ExecuteTransaction(adj);
        adj.PrintSummary();
    }