cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.2.0 Export report Problem

SOLVED
   Did you know you can see the translated content as per your choice?

Magento 2.2.0 Export report Problem

Magento 2.2.0 export report for sale CSV file Download but Rupees symbol problem.

 

Output

₹0.00

 

Please Give me Solution for that.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Magento 2.2.0 Export report Problem

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

 

View solution in original post

2 REPLIES 2

Re: Magento 2.2.0 Export report Problem

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)

Re: Magento 2.2.0 Export report Problem

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