Esempio n. 1
0
        public bool OrdersDeleteWithInventoryReturn(string orderBvin, Catalog.CatalogService catalogService)
        {
            Order o = Orders.FindForCurrentStore(orderBvin);
            if (o == null) return true;

            // return items to inventory
            foreach(LineItem li in o.Items)
            {
                catalogService.InventoryAdjustAvailableQuantity(li.ProductId, li.VariantId, li.Quantity);                
            }

            return Orders.Delete(orderBvin);
        }