Skip to content

Commit

Permalink
Merge pull request #3 from Pitoune/sylius-beta.2
Browse files Browse the repository at this point in the history
Fix compatibility with Sylius beta 2
  • Loading branch information
Pierre Ducoudray authored May 22, 2017
2 parents b796769 + 5630eaa commit ba3ee7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Controller/ReportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand All @@ -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);

Expand Down

0 comments on commit ba3ee7f

Please sign in to comment.