Commit 430458f3 by Julien Jorry

Fix issue with export operations

parent f3b60d71
...@@ -188,7 +188,7 @@ class FluxController extends AbstractController ...@@ -188,7 +188,7 @@ class FluxController extends AbstractController
'Type parent' => 'flux.parenttype', 'Type parent' => 'flux.parenttype',
'Type' => 'flux.type', 'Type' => 'flux.type',
'Moyen' => 'flux.moyen', 'Moyen' => 'flux.moyen',
'Référence' => 'reference', 'Référence' => 'flux.reference',
]; ];
$source = new DoctrineORMQuerySourceIterator($query, $fields); $source = new DoctrineORMQuerySourceIterator($query, $fields);
...@@ -198,10 +198,10 @@ class FluxController extends AbstractController ...@@ -198,10 +198,10 @@ class FluxController extends AbstractController
$format $format
); );
foreach ($this->source as $data) { foreach ($source as $data) {
$data['createdAt'] = (new \Datetime($data['createdAt']))->format('d/m/Y H:i:s'); $data['Date'] = (new \Datetime($data['Date']))->format('d/m/Y H:i:s');
$data['flux.type'] = $this->translator->trans($data['flux.type'], [], 'flux'); $data['Type'] = $this->translator->trans($data['Type'], [], 'flux');
$data['montant'] = number_format($number, 2, '.', $data['montant']); $data['Montant'] = number_format($data['Montant'], 2, '.', '');
} }
return $this->getResponse( return $this->getResponse(
...@@ -261,10 +261,10 @@ class FluxController extends AbstractController ...@@ -261,10 +261,10 @@ class FluxController extends AbstractController
$format $format
); );
foreach ($this->source as $data) { foreach ($source as $data) {
$data['createdAt'] = (new \Datetime($data['createdAt']))->format('d/m/Y H:i:s'); $data['Date'] = (new \Datetime($data['Date']))->format('d/m/Y H:i:s');
$data['type'] = $this->translator->trans($data['type'], [], 'flux'); $data['Type'] = $this->translator->trans($data['Type'], [], 'flux');
$data['montant'] = number_format($number, 2, '.', $data['montant']); $data['Montant'] = number_format($data['Montant'], 2, '.', '');
} }
return $this->getResponse( return $this->getResponse(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment