public IHttpActionResult DownloadWarehousePackageReport([FromUri] OrderAdminSearchCriteria searchCriteria, [FromUri] OrderType orderType)
        {
            try
            {
                var template = orderType == OrderType.Cash
                    ? _appSettings.WarehousePackageDiscountOrderTemplate
                    : _appSettings.WarehousePackagePVOrderTemplate;
                var    path    = System.Web.Hosting.HostingEnvironment.MapPath(template);
                byte[] content = { };
                using (var file = File.Open(path, FileMode.Open))
                {
                    searchCriteria.OrderStatus = OrderStatus.Packaged;
                    switch (orderType)
                    {
                    case OrderType.PV:
                        content = _orderReportService.GetWarehousePackagePVOrderReport(_workContext.User, file,
                                                                                       searchCriteria);
                        break;

                    case OrderType.Cash:
                        content = _orderReportService.GetWarehousePackageDiscountOrderReport(_workContext.User, file,
                                                                                             searchCriteria);
                        break;

                    default:
                        throw new ArgumentOutOfRangeException(nameof(orderType), orderType, null);
                    }
                }
                var stream = new MemoryStream(content);
                var result = new HttpExtension.FileActionResult(stream, $"WarehousePackageOrderReport_{orderType}_{DateTime.Now.ToString("dd-MM-yyyy")}.xlsx");
                return(result);
            }
            catch (StaffingPurchaseException ex)
            {
                return(new HttpExtension.StaffPurchaseExceptionActionResult(ex.Message));
            }
            catch (Exception ex)
            {
                _logger.Error("Failed to download Warehouse Package Report", ex);
                return(new HttpExtension.StaffPurchaseExceptionActionResult(_resourceManager.GetString("OrderReport.FailedToReport")));
            }
        }