Ok here is what I did to achieve the desired output.
- Created a new Module and override the Convert Classes (ConvertToCsv / ConvertToXml) from
vendor/magento/module-ui/Model/Export/
- Replaced following code
foreach ($items as $item) {
$this->metadataProvider->convertDate($item, $component->getName());
$stream->writeCsv($this->metadataProvider->getRowData($item, $fields, $options));
}
With
foreach ($items as $item) {
// Add currency
$item['base_grand_total'] = $item['base_currency_code'].$item['base_grand_total'];
$item['grand_total'] = $item['order_currency_code'].$item['grand_total'];
$item['subtotal'] = $item['base_currency_code'].$item['subtotal'];
$item['shipping_and_handling'] = $item['base_currency_code'].$item['shipping_and_handling'];
$this->metadataProvider->convertDate($item, $component->getName());
$stream->writeCsv($this->metadataProvider->getRowData($item, $fields, $options));
}
It did the trick for me - hope someone will find it useful or someone will provide a better solution.