Magento 2.2.0 export report for sale CSV file Download but Rupees symbol problem.
Output
₹0.00
Please Give me Solution for that.
Solved! Go to Solution.
Problem solution
Remove ₹ symbol for report export.
Magento\module-backed\Block\Widget\Grid\Extended.php
getCsvFile function $this->_getExportTotals() get totel of csv export remove ₹ symbole.
$demo_array = array(); if ($this->getCountTotals()) { $data = $this->_getExportTotals(); $count = count($this->_getExportTotals()); for ($i=0; $i < $count ; $i++) { # code... if($i == 0){ $demo_array[$i] = $data[$i]; } $demo_array[$i] = ltrim($data[$i],'₹'); } $stream->writeCsv($demo_array); }
And Other function _exportCsvItem to
foreach ($this->getColumns() as $column) { if (!$column->getIsSystem()) { $row[] = ltrim($column->getRowFieldExport($item),'₹'); } }
Then cash clear and export report propar forment show
Thanks
Hi @teammercywell,
I'm not sure how much this will help but maybe you could check this post: http://www.inrsymbol.in/inr-rupee-symbol-html-unicode.html
There they are talking about some alternative ways to print the symbol with HTML. (Is not about Magento the post)
Problem solution
Remove ₹ symbol for report export.
Magento\module-backed\Block\Widget\Grid\Extended.php
getCsvFile function $this->_getExportTotals() get totel of csv export remove ₹ symbole.
$demo_array = array(); if ($this->getCountTotals()) { $data = $this->_getExportTotals(); $count = count($this->_getExportTotals()); for ($i=0; $i < $count ; $i++) { # code... if($i == 0){ $demo_array[$i] = $data[$i]; } $demo_array[$i] = ltrim($data[$i],'₹'); } $stream->writeCsv($demo_array); }
And Other function _exportCsvItem to
foreach ($this->getColumns() as $column) { if (!$column->getIsSystem()) { $row[] = ltrim($column->getRowFieldExport($item),'₹'); } }
Then cash clear and export report propar forment show
Thanks