private void UpdateGiftLineItemWarehouse() { var warehouseCode = WarehouseRepository.GetDefaultWarehouse().Code; foreach (OrderForm orderForm in OrderGroup.OrderForms) { foreach (Shipment shipment in orderForm.Shipments) { var fulfillmentWarehouse = FulfillmentWarehouseProcessor.GetFulfillmentWarehouse(shipment); if (fulfillmentWarehouse != null) { warehouseCode = fulfillmentWarehouse.Code; } var giftItemCollection = Shipment.GetShipmentLineItems(shipment).Where(x => x.IsGift); foreach (var giftItem in giftItemCollection) { giftItem.WarehouseCode = warehouseCode; } } } }