Exemple #1
0
 public OrderTagGroup GetMandantoryOrderTagGroup(Order order)
 {
     if (order.Locked) return null;
     var ots = _applicationState.GetOrderTagGroups(order.MenuItemId);
     return ots.Where(x => x.MinSelectedItems > 0).FirstOrDefault(orderTagGroup => order.GetOrderTagValues(x => x.OrderTagGroupId == orderTagGroup.Id).Count() < orderTagGroup.MinSelectedItems);
 }
Exemple #2
0
 public bool CanDeselectOrder(Order order)
 {
     if (!order.DecreaseInventory || order.Locked) return true;
     var ots = _applicationState.GetOrderTagGroups(order.MenuItemId);
     return ots.Where(x => x.MinSelectedItems > 0).All(orderTagGroup => order.GetOrderTagValues(x => x.OrderTagGroupId == orderTagGroup.Id).Count() >= orderTagGroup.MinSelectedItems);
 }