From 5630eaa3a9533774551ab64c60b821750ec3a87f Mon Sep 17 00:00:00 2001 From: Pierre Ducoudray Date: Mon, 22 May 2017 16:10:02 +0200 Subject: [PATCH] Fix compatibility with Sylius beta 2 --- Controller/ReportController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Controller/ReportController.php b/Controller/ReportController.php index 8ff176e..d7c4513 100644 --- a/Controller/ReportController.php +++ b/Controller/ReportController.php @@ -65,7 +65,7 @@ public function renderAction(Request $request) */ public function embedAction(Request $request, $report, array $configuration = []) { - $currencyProvider = $this->get('sylius.currency_provider'); + $currency = $this->get('sylius.context.currency')->getCurrencyCode(); if (!$report instanceof ReportInterface) { $report = $this->getReportRepository()->findOneBy(['code' => $report]); @@ -76,7 +76,7 @@ public function embedAction(Request $request, $report, array $configuration = [] } $configuration = empty($configuration) ? $report->getDataFetcherConfiguration() : $configuration; - $configuration['baseCurrency'] = $currencyProvider->getDefaultCurrencyCode(); + $configuration['baseCurrency'] = $currency; $data = $this->getReportDataFetcher()->fetch($report, $configuration);