/// <summary> /// Returns available quantity. /// </summary> /// <param name="batch">The batch.</param> /// <returns></returns> public static double AvailableQuantity(this Batch batch) { return(batch.FGQuantityAvailable.Value); }
/// <summary> /// Check if <paramref name="quantity" /> is availables in the specified batch. /// </summary> /// <param name="batch">The batch.</param> /// <param name="quantity">The requested quantity.</param> /// <returns></returns> public static bool Available(this Batch batch, double quantity) { return(batch.FGQuantityAvailable >= quantity); }